/* public/css/style.css (Versão Final, Corrigida e Organizada) */

/* --- 1. VARIÁVEIS GLOBAIS E RESET --- */
:root {
    --brand-primary: #007aff;
    --text-primary-dark: #f0f0f0;
    --text-secondary-dark: #a0a0a0;
    --glass-bg: rgba(22, 22, 22, 0.5);
    --glass-border: rgba(255, 255, 255, 0.2);
    --focus-ring: rgba(0, 122, 255, 0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- 2. PÁGINA DE LOGIN (AUTH) --- */
.auth-body {
    background: #111;
    background: linear-gradient(135deg, #0a192f, #111, #2a0a2f);
    overflow: hidden;
    position: relative;
}
.auth-body::before, .auth-body::after {
    content: ''; position: absolute; border-radius: 50%; filter: blur(90px); z-index: 0;
}
.auth-body::before {
    width: 400px; height: 400px; background: rgba(0, 122, 255, 0.2); top: -100px; left: -100px;
}
.auth-body::after {
    width: 300px; height: 300px; background: rgba(192, 0, 255, 0.2); bottom: -100px; right: -100px;
}
.auth-container {
    display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; position: relative; z-index: 1;
}
.login-form {
    position: relative; width: 100%; max-width: 400px; padding: 60px 40px 40px 40px; text-align: center;
    background: var(--glass-bg); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border); border-radius: 16px; box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}
.avatar-icon {
    position: absolute; top: -40px; left: 50%; transform: translateX(-50%); width: 80px; height: 80px;
    background: #222; border: 3px solid var(--glass-border); border-radius: 50%; display: flex;
    justify-content: center; align-items: center; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.avatar-icon i { font-size: 36px; color: var(--text-secondary-dark); }
.login-form h2 { color: var(--text-primary-dark); font-size: 24px; font-weight: 700; margin-bottom: 10px; }
.login-form p { color: var(--text-secondary-dark); margin-bottom: 30px; }
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: none; }
.input-wrapper { position: relative; }
.form-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-secondary-dark); }
.toggle-password { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: var(--text-secondary-dark); cursor: pointer; }
.input-wrapper input {
    width: 100%; padding: 14px 15px 14px 50px; font-size: 16px; background: transparent;
    border: 1px solid var(--glass-border); border-radius: 8px; color: var(--text-primary-dark); transition: all 0.2s;
}
.input-wrapper input[type="password"] { padding-right: 50px; }
.input-wrapper input::placeholder { color: var(--text-secondary-dark); }
.input-wrapper input:focus {
    outline: none; background: rgba(0, 0, 0, 0.2); border-color: var(--brand-primary); box-shadow: 0 0 0 3px var(--focus-ring);
}
.form-options { text-align: right; margin-bottom: 25px; }
.form-options a { color: var(--brand-primary); text-decoration: none; font-size: 14px; }
.form-options a:hover { text-decoration: underline; }
.btn-login {
    width: 100%; padding: 14px; background: var(--brand-primary); color: #fff; border: none;
    border-radius: 8px; font-size: 16px; font-weight: 700; cursor: pointer; transition: all 0.2s;
}
.btn-login:hover { background: #0062cc; }
.btn-login:active { transform: scale(0.98); }

/* --- 3. LAYOUT GERAL DO SISTEMA (PÁGINAS INTERNAS) --- */
.system-body { display: flex; background-color: #f8f9fa; }
.sidebar {
    width: 260px; height: 100vh; position: fixed; top: 0; left: 0; background-color: #111827;
    color: #d1d5db; display: flex; flex-direction: column; transition: width 0.3s ease-in-out; z-index: 1000;
}
.sidebar-header {
    display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.logo-icon {
    width: 32px; height: 32px; background-color: var(--brand-primary); border-radius: 6px;
    display: flex; justify-content: center; align-items: center; font-weight: 700;
}
.logo-text { font-size: 18px; font-weight: 700; white-space: nowrap; }
.toggle-btn { background: transparent; border: none; color: #9ca3af; cursor: pointer; font-size: 18px; transition: transform 0.3s; }
.sidebar-nav { flex-grow: 1; padding: 20px 10px; }
.nav-link {
    display: flex; align-items: center; padding: 12px 10px; border-radius: 6px; margin-bottom: 5px;
    color: #d1d5db; text-decoration: none; gap: 15px; white-space: nowrap; transition: background-color 0.2s, color 0.2s;
}
.nav-link:hover { background-color: rgba(255, 255, 255, 0.05); color: #fff; }
.nav-link.active { background-color: var(--brand-primary); color: #fff; }
.nav-link i { font-size: 18px; width: 20px; text-align: center; }
.sidebar-footer { padding: 20px 10px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.sidebar-collapsed .sidebar { width: 80px; }
.sidebar-collapsed .logo-text, .sidebar-collapsed .nav-text { display: none; }
.sidebar-collapsed .toggle-btn { transform: rotate(180deg); }
.sidebar-collapsed .main-container { margin-left: 80px; }
.main-container {
    flex-grow: 1; margin-left: 260px; display: flex; flex-direction: column; min-height: 100vh; transition: margin-left 0.3s ease-in-out;
}
.main-header {
    display: flex; justify-content: space-between; align-items: center; padding: 15px 30px;
    background-color: #fff; border-bottom: 1px solid #e5e7eb;
}
.header-search { position: relative; }
.header-search i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #9ca3af; }
.header-search input {
    width: 350px; padding: 10px 15px 10px 40px; border-radius: 8px; border: 1px solid #e5e7eb; background-color: #f8f9fa;
}
.header-profile { display: flex; align-items: center; gap: 20px; }
.header-profile i { font-size: 20px; color: #6b7280; cursor: pointer; }
.profile-avatar { width: 40px; height: 40px; border-radius: 50%; }
.profile-info { line-height: 1.2; }
.profile-info strong { font-size: 14px; }
.profile-info span { font-size: 12px; color: #6b7280; }
.content-area { flex-grow: 1; padding: 30px; }
.main-footer {
    padding: 15px 30px; background-color: #fff; border-top: 1px solid #e5e7eb; text-align: center; font-size: 14px; color: #6b7280;
}

/* --- 4. COMPONENTES COMUNS (BOTÕES, TABELAS, WIDGETS) --- */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.page-header h1 { font-size: 28px; }
.btn-primary {
    display: flex; align-items: center; gap: 8px; padding: 10px 20px; background-color: var(--brand-primary);
    color: #fff; text-decoration: none; border-radius: 8px; font-weight: 500; transition: background-color 0.2s;
}
.btn-primary:hover { background-color: #0062cc; }
.table-container { background-color: #fff; border-radius: 8px; border: 1px solid #e5e7eb; overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px; text-align: left; border-bottom: 1px solid #e5e7eb; }
th { background-color: #f9fafb; font-size: 12px; text-transform: uppercase; color: #6b7280; }
td { font-size: 14px; color: #374151; }
tr:last-child td { border-bottom: none; }
.status-badge { padding: 4px 8px; border-radius: 12px; font-size: 12px; font-weight: 700; }
.status-pending { background-color: #fef3c7; color: #92400e; }
.status-completed { background-color: #d1fae5; color: #065f46; }
.status-progress { background-color: #dbeafe; color: #1e40af; }
.action-btn {
    display: inline-block; width: 32px; height: 32px; line-height: 32px; text-align: center;
    border-radius: 50%; color: #6b7280; background-color: #f3f4f6; margin-right: 5px; transition: all 0.2s;
}
.action-btn:hover { color: #fff; }
.action-btn.view:hover { background-color: #3b82f6; }
.action-btn.edit:hover { background-color: #f59e0b; }
.action-btn.delete:hover { background-color: #ef4444; }
.dashboard-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 30px; }
.widget { background-color: #ffffff; padding: 25px; border-radius: 8px; border: 1px solid #e5e7eb; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.widget h3 { font-size: 16px; color: #6b7280; margin-bottom: 15px; }
.widget .widget-number { font-size: 36px; font-weight: 700; color: #1f2937; margin-bottom: 15px; }
.widget a { color: var(--brand-primary); text-decoration: none; font-weight: 500; }
.widget.new-item {
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    border-style: dashed; cursor: pointer; transition: background-color 0.2s;
}
.widget.new-item:hover { background-color: #f9fafb; }
.widget.new-item i { font-size: 24px; color: #9ca3af; margin-bottom: 10px; }
.dashboard-recent-activity h2 { margin-bottom: 15px; }
.dashboard-recent-activity ul { list-style: none; }
.dashboard-recent-activity li { padding: 10px 0; border-bottom: 1px solid #e5e7eb; }
.dashboard-recent-activity .activity-time { display: inline-block; width: 80px; color: #6b7280; font-weight: 500; }

/* --- 5. ESTILOS ESPECÍFICOS DA PÁGINA DE PERFIL --- */
.profile-container { display: flex; gap: 30px; align-items: flex-start; }
.profile-sidebar {
    flex-basis: 280px; flex-shrink: 0; background-color: #fff; border: 1px solid #e5e7eb;
    border-radius: 8px; padding: 30px; text-align: center;
}
.profile-avatar-large-wrapper { display: inline-block; position: relative; cursor: pointer; border-radius: 50%; }
.profile-avatar-large {
    width: 150px; height: 150px; border-radius: 50%; margin: 0 auto 20px auto;
    overflow: hidden; border: 4px solid #e5e7eb;
}
.profile-avatar-large img { width: 100%; height: 100%; object-fit: cover; }
.avatar-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); /* CORREÇÃO AQUI */
    color: #fff; display: flex; flex-direction: column; justify-content: center; align-items: center;
    border-radius: 50%; opacity: 0; transition: opacity 0.3s;
}
.profile-avatar-large-wrapper:hover .avatar-overlay { opacity: 1; }
.avatar-overlay i { font-size: 24px; margin-bottom: 5px; }
.profile-sidebar h3 { font-size: 20px; margin-bottom: 5px; }
.profile-sidebar p { color: #6b7280; }
.profile-content { flex-grow: 1; background-color: #fff; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.tabs { display: flex; border-bottom: 1px solid #e5e7eb; }
.tab-link {
    padding: 15px 25px; cursor: pointer; border: none; background-color: transparent; font-size: 16px;
    font-weight: 500; color: #6b7280; border-bottom: 3px solid transparent; transition: all 0.2s;
}
.tab-link:hover { color: var(--brand-primary); }
.tab-link.active { color: var(--brand-primary); border-bottom-color: var(--brand-primary); }
.tab-content-wrapper { padding: 30px; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.form-row { display: flex; gap: 20px; margin-bottom: 20px; }
.form-group-inline { flex: 1; }
.form-group-inline label { display: block; font-size: 14px; font-weight: 500; color: #374151; margin-bottom: 8px; }
.form-group-inline input { width: 100%; padding: 10px; border: 1px solid #d1d5db; border-radius: 6px; }
.form-group-inline input:disabled { background-color: #f3f4f6; cursor: not-allowed; }
.form-group-inline small { font-size: 12px; color: #6b7280; }
.form-actions { text-align: right; margin-top: 30px; border-top: 1px solid #e5e7eb; padding-top: 20px; }

/* --- 6. RESPONSIVIDADE GERAL --- */
@media (max-width: 768px) {
    .sidebar { width: 0; overflow: hidden; }
    .main-container { margin-left: 0; }
    .header-search { display: none; }
    .profile-container { flex-direction: column; }
    .profile-sidebar { flex-basis: auto; width: 100%; }
}
