  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

  :root {
    --primary: #1B5E20;
    --primary-light: #2E7D32;
    --primary-dark: #0D3B12;
    --accent: #F9A825;
    --accent-light: #FDD835;
    --bg: #F5F7FA;
    --card: #FFFFFF;
    --text: #1A1A2E;
    --text-light: #64748B;
    --border: #E2E8F0;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
    --sidebar-width: 260px;
    --sidebar-bg: #111827;
    --sidebar-hover: rgba(255,255,255,0.07);
    --sidebar-active: rgba(255,255,255,0.12);
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  ::-webkit-scrollbar { width: 6px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: #C4C9D1; border-radius: 3px; }

  body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
  }

  /* ===== LOGIN SCREEN ===== */
  .login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0D3B12 0%, #1B5E20 40%, #2E7D32 100%);
    position: relative;
    overflow: hidden;
  }

  .login-screen::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
    top: -200px; right: -200px;
  }

  .login-screen::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: rgba(255,255,255,0.02);
    border-radius: 50%;
    bottom: -100px; left: -100px;
  }

  .login-box {
    background: white;
    border-radius: 20px;
    padding: 48px 40px;
    width: 420px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
    text-align: center;
  }

  .login-logo {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px; color: white; font-weight: 800;
  }

  .login-title { font-size: 24px; font-weight: 700; color: var(--primary-dark); margin-bottom: 4px; }
  .login-subtitle { font-size: 14px; color: var(--text-light); margin-bottom: 32px; }

  .login-field {
    margin-bottom: 16px;
    text-align: left;
  }

  .login-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
  }

  .login-field input, .login-field select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    background: #F8FAFC;
  }

  .login-field input:focus, .login-field select:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(27,94,32,0.1);
  }

  .login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s;
    font-family: inherit;
  }

  .login-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(27,94,32,0.3); }

  .profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .badge-admin { background: #FEE2E2; color: #DC2626; }
  .badge-gerente { background: #DBEAFE; color: #2563EB; }
  .badge-marketing { background: #D1FAE5; color: #059669; }
  .badge-rh { background: #EDE9FE; color: #7C3AED; }
  .badge-operacional { background: #FEF3C7; color: #D97706; }
  .badge-loja { background: #FCE7F3; color: #DB2777; }

  /* ===== MAIN APP ===== */
  .app { display: none; min-height: 100vh; }
  .app.active { display: flex; }

  /* Sidebar */
  .sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: white;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid rgba(255,255,255,0.06);
  }

  .sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .sidebar-logo {
    width: 44px; height: 44px;
    background: var(--primary);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 800;
  }

  .sidebar-brand { font-size: 15px; font-weight: 700; line-height: 1.2; }
  .sidebar-brand small { font-size: 11px; font-weight: 400; opacity: 0.7; display: block; }

  .sidebar-section {
    padding: 16px 12px 4px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.5;
    font-weight: 600;
  }

  .sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    margin: 2px 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.85;
    position: relative;
  }

  .sidebar-item:hover { background: var(--sidebar-hover); opacity: 1; }
  .sidebar-item.active { background: var(--sidebar-active); opacity: 1; font-weight: 600; position: relative; }
  .sidebar-item.active::before { content:''; position:absolute; left:0; top:6px; bottom:6px; width:3px; background:var(--primary-light); border-radius:0 2px 2px 0; }
  .sidebar-item.locked { opacity: 0.35; cursor: not-allowed; }
  .sidebar-item.locked:hover { background: none; }

  .sidebar-item .icon { width: 20px; text-align: center; font-size: 16px; }
  .sidebar-item .lock-icon { position: absolute; right: 12px; font-size: 12px; opacity: 0.6; }

  .sidebar-item .notif-badge {
    position: absolute;
    right: 12px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
  }

  .sidebar-user {
    margin-top: auto;
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .sidebar-avatar {
    width: 38px; height: 38px;
    background: var(--primary);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px; color: var(--primary-dark);
  }

  .sidebar-userinfo { flex: 1; }
  .sidebar-username { font-size: 13px; font-weight: 600; }
  .sidebar-userrole { font-size: 11px; opacity: 0.6; }

  .logout-btn {
    background: none; border: none; color: white; opacity: 0.5;
    cursor: pointer; font-size: 18px; padding: 4px;
  }
  .logout-btn:hover { opacity: 1; }

  /* Sidebar Submenu Styles */
  .sidebar-item-parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .sidebar-item-parent .expand-arrow {
    font-size: 14px;
    transition: transform 0.2s;
    margin-left: auto;
    width: 16px;
    text-align: center;
  }

  .sidebar-item-parent.expanded .expand-arrow {
    transform: rotate(90deg);
  }

  .sidebar-submenu {
    display: none;
    flex-direction: column;
    margin: 4px 0;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    overflow: hidden;
  }

  .sidebar-submenu.show {
    display: flex;
    overflow: visible;
    height: auto;
  }

  .sidebar-subitem {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 20px 8px 40px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 13px;
    font-weight: 400;
    opacity: 0.75;
    border-left: 3px solid transparent;
  }

  .sidebar-subitem:hover {
    background: rgba(255,255,255,0.08);
    opacity: 1;
  }

  .sidebar-subitem.admin-only.hidden-item {
    display: none !important;
  }

  .sidebar-subitem.active {
    background: rgba(255,255,255,0.12);
    opacity: 1;
    font-weight: 500;
    border-left-color: var(--accent);
  }

  .sidebar-subitem .icon {
    width: 16px;
    text-align: center;
    font-size: 14px;
  }

  /* Sidebar Colapsada */
  .sidebar.collapsed {
    width: 64px;
    overflow-x: hidden;
  }
  .sidebar.collapsed .sidebar-header { padding: 16px 10px; justify-content: center; }
  .sidebar.collapsed .sidebar-brand { display: none; }
  .sidebar.collapsed .sidebar-logo { width: 36px; height: 36px; font-size: 16px; border-radius: 8px; }
  .sidebar.collapsed .sidebar-section { display: none; }
  .sidebar.collapsed .sidebar-item {
    padding: 12px 0; margin: 2px 6px; justify-content: center; gap: 0;
    font-size: 0 !important; overflow: hidden; white-space: nowrap; text-indent: -9999px;
    width: 52px; height: 42px; box-sizing: border-box;
  }
  .sidebar.collapsed .sidebar-item .icon { font-size: 18px !important; width: auto; text-indent: 0; display: flex; align-items: center; justify-content: center; }
  .sidebar.collapsed .sidebar-item > div { display: none !important; }
  .sidebar.collapsed .sidebar-item > span:not(.icon):not(.notif-badge) { display: none !important; }
  .sidebar.collapsed .sidebar-item .notif-badge { position: absolute; right: 2px; top: 2px; padding: 1px 4px; font-size: 8px !important; min-width: 14px; }
  .sidebar.collapsed .sidebar-item-parent .expand-arrow { display: none; }
  .sidebar.collapsed .sidebar-submenu { display: none !important; }
  .sidebar.collapsed .sidebar-user { padding: 12px 8px; justify-content: center; }
  .sidebar.collapsed .sidebar-userinfo { display: none; }
  .sidebar.collapsed .sidebar-avatar { width: 32px; height: 32px; font-size: 13px; }
  .sidebar.collapsed .logout-btn { display: none; }
  .sidebar.collapsed .sidebar-subitem { display: none; }
  .sidebar.collapsed .sidebar-toggle-btn i { transform: rotate(180deg); }

  /* Tooltip no hover quando colapsada */
  .sidebar.collapsed .sidebar-item { position: relative; }
  .sidebar.collapsed .sidebar-item:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 68px;
    top: 50%;
    transform: translateY(-50%);
    background: #1F2937;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 200;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    pointer-events: none;
  }

  /* Botao toggle */
  .sidebar-toggle-btn {
    position: absolute;
    top: 20px;
    right: -14px;
    width: 28px;
    height: 28px;
    background: var(--sidebar-bg);
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 101;
    font-size: 12px;
    transition: all 0.2s;
    opacity: 0;
  }
  .sidebar:hover .sidebar-toggle-btn { opacity: 1; }
  .sidebar-toggle-btn:hover { background: var(--primary); border-color: var(--primary); }

  /* Transicao suave */
  .sidebar { transition: width 0.25s ease; }
  .main { transition: margin-left 0.25s ease; }

  /* Main Content */
  .main {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
  }
  body.sidebar-collapsed .main { margin-left: 64px; }

  .topbar {
    background: white;
    padding: 16px 32px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
  }

  .topbar-left { display: flex; align-items: center; gap: 16px; }
  .topbar-title { font-size: 20px; font-weight: 700; color: var(--primary-dark); }
  .topbar-breadcrumb { font-size: 13px; color: var(--text-light); }

  .topbar-right { display: flex; align-items: center; gap: 16px; }

  .topbar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
  }

  .topbar-search input {
    border: none; background: none; font-size: 13px; font-family: inherit;
    width: 200px; outline: none; color: var(--text);
  }

  .topbar-icon {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    transition: background 0.15s;
    font-size: 18px;
    color: var(--text-light);
  }

  .topbar-icon:hover { background: var(--bg); }

  .topbar-icon .dot {
    position: absolute;
    top: 8px; right: 8px;
    width: 8px; height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid white;
  }

  /* Content Area */
  .content { padding: 28px 32px; }

  .page { display: none; }
  .page.active { display: block; }

  /* Dashboard Cards */
  .welcome-banner {
    background: var(--sidebar-bg);
    color: white;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
  }

  .welcome-banner::after {
    content: '';
    position: absolute;
    right: 0; top: 0; bottom: 0; width: 300px;
    background: linear-gradient(135deg, transparent, rgba(27,94,32,0.2));
  }

  .welcome-banner h2 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
  .welcome-banner p { font-size: 14px; opacity: 0.85; max-width: 600px; }

  .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
  }

  .stat-card {
    background: white;
    border-radius: 14px;
    padding: 20px;
    border: 1px solid var(--border);
    transition: transform 0.15s, box-shadow 0.15s;
  }

  .stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.06); }

  .stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
  }

  .stat-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
  }

  .stat-icon.green { background: #D1FAE5; color: #059669; }
  .stat-icon.blue { background: #DBEAFE; color: #2563EB; }
  .stat-icon.amber { background: #FEF3C7; color: #D97706; }
  .stat-icon.red { background: #FEE2E2; color: #DC2626; }
  .stat-icon.purple { background: #EDE9FE; color: #7C3AED; }

  .stat-trend { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; }
  .stat-trend.up { color: #059669; background: #D1FAE5; }
  .stat-trend.down { color: #DC2626; background: #FEE2E2; }

  .stat-value { font-size: 28px; font-weight: 800; color: var(--primary-dark); }
  .stat-label { font-size: 13px; color: var(--text-light); margin-top: 2px; }

  .grid-2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
  }

  .grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
  }

  .card {
    background: white;
    border-radius: 14px;
    border: 1px solid var(--border);
    overflow: hidden;
  }

  .card-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .card-header h3 { font-size: 15px; font-weight: 700; }
  .card-header .see-all { font-size: 12px; color: var(--primary); font-weight: 600; cursor: pointer; }

  .card-body { padding: 16px 20px; }

  /* News Items */
  .news-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #F1F5F9;
  }

  .news-item:last-child { border-bottom: none; }

  .news-thumb {
    width: 56px; height: 56px;
    border-radius: 10px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
  }

  .news-content { flex: 1; }
  .news-content h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
  .news-content p { font-size: 12px; color: var(--text-light); line-height: 1.5; }
  .news-meta { font-size: 11px; color: var(--text-light); margin-top: 4px; opacity: 0.7; }

  /* Quick Links */
  .quick-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #F1F5F9;
    cursor: pointer;
    transition: all 0.15s;
  }

  .quick-link:last-child { border-bottom: none; }
  .quick-link:hover { padding-left: 6px; }

  .quick-link .ql-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
  }

  .quick-link span { font-size: 13px; font-weight: 500; }
  .quick-link .arrow { margin-left: auto; color: var(--text-light); font-size: 14px; }

  /* Birthday */
  .birthday-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
  }

  .birthday-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; color: white;
  }

  .birthday-info { flex: 1; }
  .birthday-info h4 { font-size: 13px; font-weight: 600; }
  .birthday-info p { font-size: 12px; color: var(--text-light); }

  /* Module Page */
  .module-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
  }

  .module-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
  }

  .module-title h2 { font-size: 22px; font-weight: 700; }
  .module-title p { font-size: 14px; color: var(--text-light); }

  .module-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
  }

  .module-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
  }

  .module-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: var(--primary);
  }

  .module-card .mc-icon {
    width: 50px; height: 50px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    margin: 0 auto 14px;
  }

  .module-card h4 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
  .module-card p { font-size: 12px; color: var(--text-light); line-height: 1.5; }

  /* Calendar Events */
  .event-item {
    display: flex;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #F1F5F9;
  }

  .event-item:last-child { border-bottom: none; }

  .event-date {
    width: 48px;
    text-align: center;
    flex-shrink: 0;
  }

  .event-date .day { font-size: 22px; font-weight: 800; color: var(--primary); }
  .event-date .month { font-size: 11px; color: var(--text-light); text-transform: uppercase; font-weight: 600; }

  .event-info h4 { font-size: 13px; font-weight: 600; }
  .event-info p { font-size: 12px; color: var(--text-light); }

  /* Table */
  .data-table {
    width: 100%;
    border-collapse: collapse;
  }

  .data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #F8FAFC;
    border-bottom: 1px solid var(--border);
  }

  .data-table td {
    padding: 14px 16px;
    font-size: 13px;
    border-bottom: 1px solid #F1F5F9;
  }

  .status-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
  }

  .status-pill.green { background: #D1FAE5; color: #059669; }
  .status-pill.amber { background: #FEF3C7; color: #D97706; }
  .status-pill.red { background: #FEE2E2; color: #DC2626; }
  .status-pill.blue { background: #DBEAFE; color: #2563EB; }

  /* Access Control Page */
  .access-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .access-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
  }

  .access-card h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .perm-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #F1F5F9;
    font-size: 13px;
  }

  .perm-row:last-child { border-bottom: none; }

  .toggle {
    width: 40px; height: 22px;
    background: #CBD5E1;
    border-radius: 11px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
  }

  .toggle.on { background: var(--success); }

  .toggle::after {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    background: white;
    border-radius: 50%;
    top: 2px; left: 2px;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  }

  .toggle.on::after { transform: translateX(18px); }

  /* Locked Module Overlay */
  .locked-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
  }

  .locked-overlay .lock-big { font-size: 64px; margin-bottom: 20px; opacity: 0.3; }
  .locked-overlay h2 { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
  .locked-overlay p { font-size: 14px; color: var(--text-light); max-width: 400px; }

  .locked-overlay .request-btn {
    margin-top: 20px;
    padding: 12px 28px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
  }

  /* RH Holerite mockup */
  .holerite-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 16px;
  }

  .holerite-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
  }

  .holerite-header h4 { font-size: 16px; font-weight: 700; }

  .download-btn {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
  }

  .holerite-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid #F8FAFC;
  }

  .holerite-row.total {
    font-weight: 700;
    font-size: 15px;
    border-top: 2px solid var(--border);
    margin-top: 8px;
    padding-top: 12px;
  }

  /* Responsive */
  @media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .module-cards { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
  }

  /* Animations */
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .page.active { animation: fadeIn 0.3s ease; }

  /* Notification popup */
  .notification-popup {
    display: none;
    position: fixed;
    top: 70px;
    right: 32px;
    background: white;
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
    width: 360px;
    z-index: 200;
    max-height: 400px;
    overflow-y: auto;
  }

  .notification-popup.show { display: block; }

  .notif-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 15px;
  }

  .notif-item {
    display: flex;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid #F1F5F9;
    cursor: pointer;
    transition: background 0.15s;
  }

  .notif-item:hover { background: #F8FAFC; }

  .notif-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
  }

  .notif-text { flex: 1; }
  .notif-text p { font-size: 13px; line-height: 1.4; }
  .notif-text .notif-time { font-size: 11px; color: var(--text-light); margin-top: 2px; }

  /* ===== BUSCA GLOBAL ===== */
  .search-modal { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.4); backdrop-filter:blur(4px); z-index:300; align-items:flex-start; justify-content:center; padding-top:120px; }
  .search-modal.show { display:flex; }
  .search-modal-box { background:white; border-radius:16px; width:540px; max-width:95vw; box-shadow:0 20px 60px rgba(0,0,0,0.2); overflow:hidden; }
  .search-modal-input { padding:16px 20px; border-bottom:1px solid var(--border); display:flex; align-items:center; gap:12px; }
  .search-modal-input input { border:none; outline:none; font-size:16px; font-family:inherit; flex:1; color:var(--text); }
  .search-results { max-height:360px; overflow-y:auto; padding:8px; }
  .search-result-item { display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:10px; cursor:pointer; transition:background 0.15s; }
  .search-result-item:hover { background:var(--bg); }

  /* ===== PONTO ELETRÔNICO ===== */
  .ponto-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:24px; }
  .ponto-btn { padding:20px; border-radius:14px; border:2px solid var(--border); background:white; cursor:pointer; text-align:center; transition:all 0.2s; font-family:inherit; }
  .ponto-btn:hover:not(.done) { border-color:var(--primary); transform:translateY(-2px); box-shadow:0 4px 12px rgba(0,0,0,0.08); }
  .ponto-btn.done { background:#D1FAE5; border-color:#10B981; cursor:default; }
  .ponto-btn.next { border-color:var(--primary); box-shadow:0 0 0 3px rgba(27,94,32,0.1); }
  .ponto-btn .ponto-icon { font-size:28px; margin-bottom:8px; display:block; }
  .ponto-btn .ponto-label { font-size:11px; font-weight:600; color:var(--text-light); text-transform:uppercase; letter-spacing:0.5px; }
  .ponto-btn .ponto-time { font-size:24px; font-weight:800; color:var(--primary-dark); margin-top:4px; }

  /* ===== GAMIFICAÇÃO ===== */
  .gamif-bar { height:10px; border-radius:5px; background:#E2E8F0; overflow:hidden; margin:8px 0; }
  .gamif-bar-fill { height:100%; border-radius:5px; transition:width 0.6s ease; }
  .gamif-score { width:90px; height:90px; border-radius:50%; display:flex; flex-direction:column; align-items:center; justify-content:center; font-weight:800; margin:0 auto; }

  /* ===== FEED DE ATIVIDADES ===== */
  .feed-item { display:flex; gap:12px; padding:12px 0; border-bottom:1px solid #F1F5F9; }
  .feed-item:last-child { border-bottom:none; }
  .feed-dot { width:10px; height:10px; border-radius:50%; margin-top:5px; flex-shrink:0; }
  .feed-text { flex:1; font-size:13px; line-height:1.5; }
  .feed-time { font-size:11px; color:var(--text-light); margin-top:2px; }

  /* ===== MODO ESCURO ===== */
  body.dark-mode { --bg:#0F172A; --card:#1E293B; --text:#E2E8F0; --text-light:#94A3B8; --border:#334155; --primary-dark:#86EFAC; }
  body.dark-mode .topbar { background:#1E293B; border-color:#334155; }
  body.dark-mode .card, body.dark-mode .stat-card, body.dark-mode .module-card, body.dark-mode .holerite-card, body.dark-mode .access-card { background:#1E293B; border-color:#334155; }
  body.dark-mode .topbar-search { background:#334155; border-color:#475569; }
  body.dark-mode .topbar-search input { color:#E2E8F0; }
  body.dark-mode .data-table th { background:#1E293B; }
  body.dark-mode .login-field input { background:#334155; border-color:#475569; color:#E2E8F0; }
  body.dark-mode .ponto-btn { background:#1E293B; border-color:#334155; }
  body.dark-mode .ponto-btn.done { background:#064E3B; border-color:#059669; }

  /* Dark mode - Módulos dinâmicos */
  body.dark-mode { --bg-secondary:#1E293B; --card-bg:#1E293B; }
  body.dark-mode select, body.dark-mode input[type='text'], body.dark-mode input[type='email'],
  body.dark-mode input[type='datetime-local'], body.dark-mode textarea {
    background:#334155!important; border-color:#475569!important; color:#E2E8F0!important;
  }
  body.dark-mode select option { background:#1E293B; color:#E2E8F0; }
  body.dark-mode button[style*='background:var(--bg-secondary'] { background:#334155!important; color:#E2E8F0!important; border-color:#475569!important; }
  body.dark-mode button[style*='background:#f0f0f0'], body.dark-mode button[style*='background:#f5f5f5'] { background:#334155!important; color:#E2E8F0!important; }
  body.dark-mode [style*='color:var(--text,#333)'], body.dark-mode [style*='color:#333'] { color:#E2E8F0!important; }
  body.dark-mode [style*='background:var(--bg-secondary,#f0f0f0)'] { background:#334155!important; }
  body.dark-mode [style*='background:var(--bg-secondary,#f5f5f5)'] { background:#334155!important; }
  body.dark-mode [style*='background:var(--card-bg,#fff)'] { background:#1E293B!important; }
  body.dark-mode [style*='background:#f5f5f5'] { background:#1E293B!important; }
  body.dark-mode [style*='background:#f8faf8'] { background:#1E293B!important; }
  body.dark-mode [style*='background:white'] { background:#1E293B!important; }
  body.dark-mode [style*='background:#F1F5F9'] { background:#334155!important; }
  body.dark-mode [style*='color:var(--text-light)'] { color:#94A3B8!important; }
  body.dark-mode [style*='color:var(--text,#333)'] { color:#E2E8F0!important; }
  body.dark-mode [style*='border:1px solid var(--border,#ddd)'] { border-color:#475569!important; }
  body.dark-mode [style*='border:1px solid var(--border,#eee)'] { border-color:#475569!important; }
  body.dark-mode [style*='border:1.5px solid var(--border,#eee)'] { border-color:#475569!important; }
  body.dark-mode [style*='border:1px solid #eee'] { border-color:#475569!important; }
  body.dark-mode [style*='border-bottom:1px solid #eee'] { border-color:#475569!important; }
  body.dark-mode [style*='border-bottom:1px solid var(--border'] { border-color:#475569!important; }
  body.dark-mode .data-table td { border-color:#334155; color:#E2E8F0; }
  body.dark-mode .data-table tr:hover { background:#334155; }
  body.dark-mode code { background:#334155!important; color:#E2E8F0!important; }
  body.dark-mode h4, body.dark-mode h3, body.dark-mode h2 { color:#E2E8F0; }
  body.dark-mode p { color:#94A3B8; }
  body.dark-mode label { color:#CBD5E1!important; }
  body.dark-mode .model-tab { background:#334155!important; color:#E2E8F0!important; border-color:#475569!important; }
  body.dark-mode [style*='background:#EFF6FF'] { background:#1E3A5F!important; }
  body.dark-mode [style*='background:#D1FAE5'] { background:#064E3B!important; }
  body.dark-mode [style*='background:#FEF3C7'] { background:#78350F!important; }
  body.dark-mode [style*='background:#FEF2F2'] { background:#7F1D1D!important; }
  body.dark-mode [style*='background:#EDE9FE'] { background:#3B0764!important; }
  body.dark-mode [style*='background:#FCE7F3'] { background:#831843!important; }
  body.dark-mode [style*='background:#DBEAFE'] { background:#1E3A5F!important; }
  body.dark-mode [style*='background:#FEE2E2'] { background:#7F1D1D!important; }
  body.dark-mode [style*='background:#FFFBEB'] { background:#78350F!important; }
  body.dark-mode [style*='background:#f8fafc'] { background:#1E293B!important; }
  body.dark-mode [style*='background:#f0f0f0'] { background:#334155!important; }
  body.dark-mode .card-header { border-color:#334155; }
  body.dark-mode [id*='Modal'] > div > div { background:#1E293B!important; }

  /* ===== LOADING SPINNER ===== */
  .loading-spinner { width:32px; height:32px; border:3px solid var(--border); border-top-color:var(--primary); border-radius:50%; animation:spin 0.8s linear infinite; margin:24px auto; }
  @keyframes spin { to { transform:rotate(360deg); } }

  /* ===== MOBILE ===== */
  .mobile-menu-btn { display:none; background:none; border:none; font-size:20px; color:var(--text-light); cursor:pointer; padding:8px; }
  @media (max-width: 768px) {
    .sidebar { transform:translateX(-100%); transition:transform 0.3s; z-index:200; }
    .sidebar.mobile-open { transform:translateX(0); }
    .main { margin-left:0; }
    .content { padding:16px; }
    .stats-grid { grid-template-columns:1fr 1fr; }
    .module-cards { grid-template-columns:1fr; }
    .grid-2 { grid-template-columns:1fr; }
    .ponto-grid { grid-template-columns:1fr 1fr; }
    .mobile-menu-btn { display:block !important; }
    .topbar { padding:12px 16px; }
    .topbar-search { display:none; }
  }

  /* ===== CHAT IA ===== */
  .chat-ia-container {
    display: flex;
    height: calc(100vh - 140px);
    gap: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--card);
  }
  .chat-ia-sidebar {
    width: 280px;
    min-width: 280px;
    background: var(--bg);
    border-right: 1px solid var(--border);
    padding: 20px 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .chat-ia-sidebar h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-bottom: 8px;
  }
  .chat-chip {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 12.5px;
    color: var(--text);
    cursor: pointer;
    transition: all .2s;
    line-height: 1.4;
  }
  .chat-chip:hover {
    border-color: #7C3AED;
    background: rgba(124,58,237,0.04);
    transform: translateX(2px);
  }
  .chat-ia-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  .chat-ia-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .chat-msg {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 13.5px;
    line-height: 1.6;
    word-wrap: break-word;
  }
  .chat-msg.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #7C3AED, #6D28D9);
    color: white;
    border-bottom-right-radius: 4px;
  }
  .chat-msg.assistant {
    align-self: flex-start;
    background: linear-gradient(135deg, #F3F0FF, #EDE9FE);
    color: var(--text);
    border-bottom-left-radius: 4px;
    border: 1px solid #DDD6FE;
  }
  .chat-msg.assistant pre {
    background: rgba(0,0,0,0.06);
    border-radius: 8px;
    padding: 10px 12px;
    margin: 8px 0;
    overflow-x: auto;
    font-size: 12px;
    font-family: 'Courier New', monospace;
  }
  .chat-msg.assistant code {
    background: rgba(0,0,0,0.06);
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 12px;
  }
  .chat-ia-input-bar {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    align-items: flex-end;
    background: var(--card);
  }
  .chat-ia-input-bar textarea {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13.5px;
    font-family: inherit;
    resize: none;
    max-height: 120px;
    line-height: 1.5;
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: border-color .2s;
  }
  .chat-ia-input-bar textarea:focus {
    border-color: #7C3AED;
  }
  .chat-ia-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #7C3AED, #6D28D9);
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s, opacity .15s;
    flex-shrink: 0;
  }
  .chat-ia-send-btn:hover { transform: scale(1.05); }
  .chat-ia-send-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
  .chat-typing {
    align-self: flex-start;
    display: flex;
    gap: 5px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #F3F0FF, #EDE9FE);
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    border: 1px solid #DDD6FE;
  }
  .chat-typing span {
    width: 8px; height: 8px;
    background: #7C3AED;
    border-radius: 50%;
    animation: chatBounce .6s infinite alternate;
  }
  .chat-typing span:nth-child(2) { animation-delay: .2s; }
  .chat-typing span:nth-child(3) { animation-delay: .4s; }
  @keyframes chatBounce {
    to { opacity: .3; transform: translateY(-4px); }
  }
  /* Tiny bar chart */
  .tiny-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 180px;
    padding: 10px 0;
  }
  .tiny-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
  .tiny-bar {
    width: 100%;
    max-width: 32px;
    background: linear-gradient(180deg, #059669, #10B981);
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    transition: height .5s ease;
  }
  .tiny-bar-label {
    font-size: 9px;
    color: var(--text-light);
    text-align: center;
  }
  .tiny-bar-value {
    font-size: 9px;
    font-weight: 600;
    color: var(--text);
  }
  @media(max-width:768px) {
    .chat-ia-sidebar { display: none; }
    .chat-ia-container { height: calc(100vh - 120px); }
    .chat-msg { max-width: 90%; }
  }
