/* ============================================================
   Sistema RH - Identidade Visual inspirada em Preciso Imprimir
   Paleta: Azul profundo + Laranja vibrante + Cinza neutro
   ============================================================ */

:root {
  --primary:       #0D47A1;
  --primary-dark:  #0A3580;
  --primary-light: #1565C0;
  --accent:        #FF6B00;
  --accent-light:  #FF8C33;
  --accent-dark:   #E65C00;
  --success:       #1B873A;
  --success-light: #E8F5E9;
  --warning:       #E65100;
  --warning-light: #FFF3E0;
  --danger:        #C62828;
  --danger-light:  #FFEBEE;
  --info:          #0277BD;
  --info-light:    #E1F5FE;
  --bg:            #F0F4FF;
  --surface:       #FFFFFF;
  --surface2:      #F8FAFF;
  --border:        #DDE5F0;
  --text:          #0D1B3E;
  --text-2:        #4A5680;
  --text-3:        #8A96B3;
  --sidebar-bg:    #0D1B3E;
  --sidebar-hover: rgba(255,107,0,0.12);
  --sidebar-active:#FF6B00;
  --sidebar-text:  rgba(255,255,255,0.85);
  --sidebar-text2: rgba(255,255,255,0.45);
  --shadow-sm:     0 1px 4px rgba(13,27,62,0.08);
  --shadow:        0 4px 16px rgba(13,27,62,0.10);
  --shadow-lg:     0 8px 32px rgba(13,27,62,0.14);
  --radius:        10px;
  --radius-lg:     16px;
  --sidebar-w:     260px;
  --topbar-h:      64px;
  --transition:    0.2s ease;
}

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

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============ SIDEBAR ============ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  position: fixed; top: 0; left: 0; bottom: 0;
  display: flex; flex-direction: column;
  z-index: 1000;
  transition: width var(--transition), transform var(--transition);
  overflow: hidden;
}

.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  min-height: var(--topbar-h);
}

.sidebar-logo { display: flex; align-items: center; gap: 0.75rem; }

.logo-icon {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: 10px;
  display: grid; place-items: center;
  color: #fff;
  font-size: 1rem; font-weight: 800;
  flex-shrink: 0;
}

/* Logo de imagem na sidebar */
.logo-img-wrap {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: rgba(255,255,255,0.12);
  border-radius: 10px;
  overflow: hidden;
  padding: 3px;
}
.sidebar-logo-img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  display: block;
  /* Manter visível em fundo escuro: logo claro/escuro funciona */
  filter: brightness(0) invert(1); /* inverte para branco */
}
/* Quando collapsed, manter só o ícone */
.sidebar.collapsed .logo-text { display: none; }
.sidebar.collapsed .sidebar-logo { justify-content: center; }

.logo-text { display: flex; flex-direction: column; }
.logo-name { font-size: 0.95rem; font-weight: 800; color: #fff; line-height: 1.1; }
.logo-company { font-size: 0.7rem; color: var(--sidebar-text2); font-weight: 500; }

.sidebar-toggle {
  background: none; border: none; color: var(--sidebar-text2); cursor: pointer;
  font-size: 1.1rem; padding: 0.25rem; transition: color var(--transition);
}
.sidebar-toggle:hover { color: #fff; }

.sidebar-nav {
  flex: 1; overflow-y: auto; padding: 0.75rem 0;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.nav-section { padding: 0.5rem 0; }
.nav-label {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--sidebar-text2);
  padding: 0.5rem 1.25rem 0.25rem;
  display: block;
}

.nav-item {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.65rem 1.25rem;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.88rem; font-weight: 600;
  border-radius: 0;
  transition: all var(--transition);
  position: relative;
}
.nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-item.active {
  background: var(--sidebar-hover);
  color: var(--accent);
}
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.nav-item i { width: 18px; text-align: center; font-size: 0.9rem; opacity: 0.85; }
.nav-item.active i { opacity: 1; }

.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex; align-items: center; gap: 0.5rem;
}

.sidebar-user {
  flex: 1; display: flex; align-items: center; gap: 0.6rem;
  text-decoration: none; padding: 0.5rem; border-radius: 8px;
  transition: background var(--transition);
}
.sidebar-user:hover { background: rgba(255,255,255,0.06); }

.user-avatar {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--accent);
  display: grid; place-items: center;
  font-size: 0.85rem; font-weight: 800; color: #fff;
  flex-shrink: 0;
}

.user-info { display: flex; flex-direction: column; }
.user-name { font-size: 0.8rem; font-weight: 700; color: #fff; line-height: 1.1; }
.user-role { font-size: 0.65rem; color: var(--sidebar-text2); font-weight: 500; }

.btn-logout {
  width: 34px; height: 34px; display: grid; place-items: center;
  color: var(--sidebar-text2); background: rgba(255,255,255,0.05);
  border-radius: 8px; text-decoration: none;
  transition: all var(--transition);
}
.btn-logout:hover { background: var(--danger); color: #fff; }

/* ============ MAIN CONTENT ============ */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1; min-height: 100vh;
  display: flex; flex-direction: column;
  transition: margin-left var(--transition);
}

.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}

.topbar-left { display: flex; align-items: center; gap: 1rem; }

.mobile-toggle {
  display: none; background: none; border: none;
  font-size: 1.2rem; color: var(--text-2); cursor: pointer;
}

.breadcrumb { font-size: 0.95rem; font-weight: 700; color: var(--text); }

.topbar-right { display: flex; align-items: center; gap: 1rem; }

.topbar-notifications {
  position: relative; width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--bg); border-radius: 8px;
  cursor: pointer; font-size: 0.95rem; color: var(--text-2);
  transition: all var(--transition);
}
.topbar-notifications:hover { background: var(--primary); color: #fff; }

.notif-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--accent); color: #fff;
  font-size: 0.6rem; font-weight: 800;
  min-width: 16px; height: 16px;
  border-radius: 8px; display: grid; place-items: center;
}

.topbar-time {
  font-size: 0.8rem; font-weight: 700; color: var(--text-2);
  background: var(--bg); padding: 0.3rem 0.7rem;
  border-radius: 8px;
}

/* Notificações dropdown */
.notif-wrapper { position: relative; }
.topbar-notifications {
  position: relative; width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--bg); border-radius: 8px;
  cursor: pointer; font-size: 0.95rem; color: var(--text-2);
  transition: all var(--transition); border: none;
}
.topbar-notifications:hover,
.topbar-notifications.active { background: var(--primary); color: #fff; }

.notif-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 360px; background: #fff; border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.18); z-index: 1000;
  border: 1px solid rgba(0,0,0,0.06); overflow: hidden;
  animation: dropdownIn .18s ease;
}
@keyframes dropdownIn { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }

.notif-dropdown-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem 0.75rem; border-bottom: 1px solid #f0f0f0;
}
.notif-dropdown-title { font-weight: 700; font-size: 0.9rem; color: #1a1a2e; display:flex;align-items:center;gap:.5rem }
.notif-mark-all { background: none; border: none; cursor: pointer; color: var(--primary); font-size: 0.85rem; padding: 0.25rem 0.5rem; border-radius: 6px; transition: background .15s; }
.notif-mark-all:hover { background: var(--primary-light); }

.notif-dropdown-body { max-height: 380px; overflow-y: auto; }
.notif-item {
  display: flex; gap: 0.75rem; padding: 0.85rem 1.25rem;
  border-bottom: 1px solid #f8f8f8; cursor: pointer;
  transition: background .15s; align-items: flex-start;
}
.notif-item:hover { background: #f5f7ff; }
.notif-item.unread { background: #f0f4ff; }
.notif-item.unread:hover { background: #e8edff; }
.notif-item-icon {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 0.85rem; color: #fff;
}
.notif-icon-billing   { background: linear-gradient(135deg,#0D47A1,#1565C0); }
.notif-icon-vacation  { background: linear-gradient(135deg,#2E7D32,#388E3C); }
.notif-icon-timeclock { background: linear-gradient(135deg,#FF6B00,#F57C00); }
.notif-icon-system    { background: linear-gradient(135deg,#6A1B9A,#7B1FA2); }
.notif-icon-default   { background: linear-gradient(135deg,#455a64,#546e7a); }

.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title { font-size: 0.85rem; font-weight: 700; color: #1a1a2e; margin-bottom: 2px; }
.notif-item-msg   { font-size: 0.78rem; color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-item-time  { font-size: 0.72rem; color: #aaa; margin-top: 3px; }
.notif-unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); flex-shrink: 0; margin-top: 6px; }

.notif-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2.5rem 1rem; color: #aaa; gap: 0.5rem; }
.notif-empty i { font-size: 2rem; opacity: 0.4; }
.notif-empty p { font-size: 0.85rem; margin: 0; }

.notif-dropdown-footer { padding: 0.75rem; text-align: center; border-top: 1px solid #f0f0f0; }
.notif-dropdown-footer a { font-size: 0.82rem; color: var(--primary); text-decoration: none; font-weight: 600; }
.notif-dropdown-footer a:hover { text-decoration: underline; }

/* Menu usuário */
.topbar-user-wrapper { position: relative; }
.topbar-user {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--bg); border: none; border-radius: 10px;
  padding: 0.35rem 0.75rem 0.35rem 0.35rem;
  cursor: pointer; transition: background .15s;
}
.topbar-user:hover { background: #e8edff; }
.topbar-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #1976D2);
  color: #fff; font-size: 0.75rem; font-weight: 800;
  display: grid; place-items: center;
}
.topbar-user-name { font-size: 0.85rem; font-weight: 700; color: var(--text); }

.user-menu-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 220px; background: #fff; border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.18); z-index: 1000;
  border: 1px solid rgba(0,0,0,0.06); overflow: hidden;
  animation: dropdownIn .18s ease;
}
.user-menu-header { display: flex; align-items: center; gap: 0.75rem; padding: 1rem; }
.user-menu-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #1976D2);
  color: #fff; font-size: 0.85rem; font-weight: 800;
  display: grid; place-items: center; flex-shrink: 0;
}
.user-menu-name { font-size: 0.85rem; font-weight: 700; color: #1a1a2e; }
.user-menu-role { font-size: 0.72rem; color: #888; }
.user-menu-divider { height: 1px; background: #f0f0f0; }
.user-menu-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 1rem; font-size: 0.85rem; color: #444;
  text-decoration: none; transition: background .15s; font-weight: 600;
}
.user-menu-item:hover { background: #f5f7ff; color: var(--primary); }
.user-menu-item i { width: 16px; text-align: center; color: #888; }
.user-menu-item:hover i { color: var(--primary); }
.user-menu-logout { color: #e53935; }
.user-menu-logout:hover { background: #fff5f5; color: #e53935; }
.user-menu-logout i { color: #e53935; }

.page-content { padding: 1.5rem; flex: 1; }

/* ============ ALERTS ============ */
.alert {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  margin: 0.75rem 1.5rem 0;
  border-radius: var(--radius);
  font-size: 0.875rem; font-weight: 600;
  border-left: 4px solid;
}
.alert-success { background: var(--success-light); color: var(--success); border-color: var(--success); }
.alert-error   { background: var(--danger-light);  color: var(--danger);  border-color: var(--danger); }
.alert-warning { background: var(--warning-light); color: var(--warning); border-color: var(--warning); }
.alert-info    { background: var(--info-light);    color: var(--info);    border-color: var(--info); }
.alert-close { margin-left: auto; background: none; border: none; cursor: pointer; opacity: 0.6; font-size: 0.85rem; }
.alert-close:hover { opacity: 1; }

/* ============ CARDS ============ */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

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

.card-title {
  font-size: 1rem; font-weight: 800; color: var(--text);
  display: flex; align-items: center; gap: 0.5rem;
}
.card-title i { color: var(--primary); }

.card-body { padding: 1.5rem; }

/* ============ STAT CARDS ============ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.25rem;
  display: flex; align-items: center; gap: 1rem;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.stat-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: grid; place-items: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.stat-icon.blue   { background: #EEF2FF; color: var(--primary); }
.stat-icon.orange { background: #FFF3E0; color: var(--accent); }
.stat-icon.green  { background: var(--success-light); color: var(--success); }
.stat-icon.red    { background: var(--danger-light); color: var(--danger); }
.stat-icon.purple { background: #F3E8FF; color: #7C3AED; }

.stat-info { flex: 1; }
.stat-value { font-size: 1.6rem; font-weight: 800; color: var(--text); line-height: 1; }
.stat-label { font-size: 0.78rem; color: var(--text-2); font-weight: 600; margin-top: 0.2rem; }
.stat-trend { font-size: 0.72rem; font-weight: 700; margin-top: 0.3rem; }
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* ============ TABLES ============ */
.table-container { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }

thead th {
  padding: 0.75rem 1rem;
  background: var(--bg);
  color: var(--text-2); font-weight: 700; font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.04em;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  text-align: left;
}

tbody tr { border-bottom: 1px solid var(--border); transition: background var(--transition); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface2); }
tbody td { padding: 0.85rem 1rem; vertical-align: middle; }

/* ============ BADGES ============ */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: 20px; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger  { background: var(--danger-light);  color: var(--danger); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-info    { background: var(--info-light);    color: var(--info); }
.badge-primary { background: #EEF2FF; color: var(--primary); }
.badge-secondary{ background: #F3F4F6; color: var(--text-2); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 8px; border: none;
  font-family: 'Nunito', sans-serif;
  font-size: 0.875rem; font-weight: 700;
  cursor: pointer; text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(13,71,161,0.3); }

.btn-accent    { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,107,0,0.3); }

.btn-success   { background: var(--success); color: #fff; }
.btn-success:hover { background: #166d30; }

.btn-danger    { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a31515; }

.btn-outline   { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-ghost     { background: var(--bg); color: var(--text-2); }
.btn-ghost:hover { background: var(--border); color: var(--text); }

.btn-sm  { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-lg  { padding: 0.8rem 1.6rem; font-size: 1rem; }
.btn-icon { width: 36px; height: 36px; padding: 0; justify-content: center; }
.btn-block { width: 100%; justify-content: center; }

@keyframes pulse-shadow {
  0%,100% { box-shadow: 0 0 0 0 rgba(13,71,161,0.4); }
  50%      { box-shadow: 0 0 0 6px rgba(13,71,161,0); }
}
.btn-pulse { animation: pulse-shadow 1.8s infinite; }

/* Utility spacing */
.mb-4 { margin-bottom: 1.5rem; }

/* ============ FORMS ============ */
.form-group { margin-bottom: 1.1rem; }
.form-label {
  display: block; font-size: 0.82rem; font-weight: 700;
  color: var(--text-2); margin-bottom: 0.4rem;
}
.form-label .required { color: var(--danger); margin-left: 2px; }

.form-control {
  width: 100%; padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 8px; background: var(--surface);
  font-family: 'Nunito', sans-serif; font-size: 0.9rem; color: var(--text);
  transition: all var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13,71,161,0.1);
}
.form-control.is-invalid { border-color: var(--danger); }
.form-control:disabled { background: var(--bg); opacity: 0.7; cursor: not-allowed; }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

.form-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row-4 { grid-template-columns: repeat(4, 1fr); }

/* Grids responsivos utilitários: colunas no desktop, empilham no mobile */
.grid-2, .grid-3, .grid-4 { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }

.form-error { color: var(--danger); font-size: 0.78rem; font-weight: 600; margin-top: 0.3rem; }
.form-hint  { color: var(--text-3); font-size: 0.78rem; margin-top: 0.3rem; }

.form-section {
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
  font-size: 0.88rem; font-weight: 800; color: var(--primary);
  display: flex; align-items: center; gap: 0.5rem;
}

/* ============ TABS ============ */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; }
.tab-btn {
  padding: 0.7rem 1.25rem;
  background: none; border: none; cursor: pointer;
  font-family: 'Nunito', sans-serif; font-size: 0.875rem; font-weight: 700;
  color: var(--text-2); position: relative;
  transition: color var(--transition);
}
.tab-btn.active { color: var(--primary); }
.tab-btn.active::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px; background: var(--primary); border-radius: 2px 2px 0 0;
}
.tab-btn:hover { color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============ CLOCK WIDGET ============ */
.clock-widget {
  text-align: center;
  padding: 2.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-lg);
  color: #fff;
}

.clock-display {
  font-size: 4rem; font-weight: 800; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.clock-date { font-size: 0.95rem; opacity: 0.8; font-weight: 600; margin-top: 0.25rem; }

.punch-btn {
  margin-top: 1.5rem;
  width: 120px; height: 120px; border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.3);
  background: var(--accent);
  color: #fff; font-size: 0.9rem; font-weight: 800;
  cursor: pointer; transition: all 0.3s;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.25rem; box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  font-family: 'Nunito', sans-serif;
  margin-left: auto; margin-right: auto;
}
.punch-btn:hover { transform: scale(1.05); box-shadow: 0 12px 32px rgba(0,0,0,0.4); }
.punch-btn i { font-size: 1.5rem; }

.punch-status {
  display: flex; gap: 0.75rem; margin-top: 1.5rem; justify-content: center; flex-wrap: wrap;
}
.punch-pill {
  padding: 0.35rem 0.85rem;
  border-radius: 20px; font-size: 0.78rem; font-weight: 700;
  background: rgba(255,255,255,0.15);
}
.punch-pill.done { background: rgba(255,255,255,0.25); }

/* ============ PAGINATION ============ */
.pagination {
  display: flex; align-items: center; gap: 0.35rem;
  justify-content: center; padding: 1rem 0;
}
.page-btn {
  min-width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 8px; border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text-2);
  font-size: 0.82rem; font-weight: 700; cursor: pointer;
  text-decoration: none; transition: all var(--transition);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============ SEARCH & FILTERS ============ */
.filters-bar {
  display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center;
  margin-bottom: 1.25rem;
}
.search-input-wrap { position: relative; flex: 1; min-width: 200px; }
.search-input-wrap i {
  position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%);
  color: var(--text-3); font-size: 0.9rem;
}
.search-input-wrap input { padding-left: 2.5rem; }

/* ============ PROGRESS ============ */
.progress-bar-wrap { background: var(--bg); border-radius: 10px; height: 8px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 10px; transition: width 0.6s ease; }
.progress-bar.blue   { background: var(--primary); }
.progress-bar.orange { background: var(--accent); }
.progress-bar.green  { background: var(--success); }
.progress-bar.red    { background: var(--danger); }

/* ============ EMPLOYEE CARD ============ */
.employee-card {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem; border-radius: var(--radius);
  border: 1.5px solid var(--border); background: var(--surface);
  transition: all var(--transition);
}
.employee-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }

.emp-avatar {
  width: 46px; height: 46px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: grid; place-items: center;
  font-size: 1.1rem; font-weight: 800; color: #fff; flex-shrink: 0;
}

/* ============ CALENDAR ============ */
.mini-calendar { font-size: 0.85rem; }
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.cal-title { font-weight: 800; color: var(--text); }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; }
.cal-day-name { text-align: center; font-size: 0.7rem; font-weight: 700; color: var(--text-3); padding: 0.25rem; }
.cal-day {
  aspect-ratio: 1; display: grid; place-items: center;
  border-radius: 6px; cursor: pointer; font-weight: 600;
  transition: all var(--transition);
}
.cal-day:hover { background: var(--bg); }
.cal-day.today { background: var(--primary); color: #fff; }
.cal-day.selected { background: var(--accent); color: #fff; }
.cal-day.disabled { opacity: 0.3; cursor: not-allowed; }
.cal-day.has-event { position: relative; }
.cal-day.has-event::after {
  content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}

/* ============ UPLOAD AREA ============ */
.upload-area {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 2.5rem; text-align: center; cursor: pointer;
  transition: all var(--transition);
  background: var(--surface2);
}
.upload-area:hover, .upload-area.dragover {
  border-color: var(--primary); background: #EEF2FF;
}
.upload-icon { font-size: 2.5rem; color: var(--text-3); margin-bottom: 0.75rem; }
.upload-area h4 { font-size: 0.95rem; font-weight: 800; color: var(--text); }
.upload-area p { font-size: 0.8rem; color: var(--text-3); margin-top: 0.25rem; }

/* ============ MODAL ============ */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(13,27,62,0.6);
  z-index: 2000; display: grid; place-items: center;
  backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden; transition: all var(--transition);
}
.modal-backdrop.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); width: 90%; max-width: 580px;
  max-height: 90vh; overflow-y: auto;
  transform: scale(0.95); transition: transform var(--transition);
}
.modal-backdrop.open .modal { transform: scale(1); }
.modal-header {
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 1rem; font-weight: 800; }
.modal-close {
  background: none; border: none; font-size: 1.1rem;
  color: var(--text-3); cursor: pointer;
}
.modal-body { padding: 1.5rem; }
.modal-footer {
  padding: 1rem 1.5rem; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 0.75rem;
}

/* ============ EMPTY STATE ============ */
.empty-state {
  text-align: center; padding: 3rem 2rem; color: var(--text-3);
}
.empty-state i { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-state h3 { font-size: 1rem; font-weight: 800; color: var(--text-2); margin-bottom: 0.5rem; }
.empty-state p { font-size: 0.85rem; }

/* ============ PAGE HEADER ============ */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem; gap: 1rem; flex-wrap: wrap;
}
.page-header-left h1 { font-size: 1.4rem; font-weight: 800; color: var(--text); }
.page-header-left p { font-size: 0.85rem; color: var(--text-2); font-weight: 500; margin-top: 0.15rem; }
.page-header-right { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .mobile-toggle { display: block; }
  .form-row, .form-row-2, .form-row-3, .form-row-4 { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .page-content { padding: 1rem; }
  .clock-display { font-size: 3rem; }
}

/* ============ SIDEBAR OVERLAY ============ */
.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 999; display: none;
}
.sidebar-overlay.show { display: block; }

/* ============ UTILITIES ============ */
.d-flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-3); font-size: 0.82rem; }
.text-bold { font-weight: 800; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.w-100 { width: 100%; }
.flex-1 { flex: 1; }

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

/* ============ LOGIN PAGE ============ */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0D1B3E 0%, #0D47A1 60%, #1565C0 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}

.login-card {
  background: #fff; border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.35);
  width: 100%; max-width: 440px;
  overflow: hidden;
}

.login-top {
  background: linear-gradient(135deg, var(--accent) 0%, #E65100 100%);
  padding: 2.5rem 2rem; text-align: center;
}
.login-logo {
  width: auto !important; height: auto !important;
  background: transparent !important;
  border-radius: 0 !important;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 0.5rem;
}
.login-logo img {
  width: 160px !important; height: auto !important;
  background: #fff;
  border-radius: 10px;
  padding: 8px 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  display: block;
}
.login-top h1 { font-size: 1.4rem; font-weight: 800; color: #fff; }
.login-top p { font-size: 0.85rem; color: rgba(255,255,255,0.8); margin-top: 0.25rem; }

.login-body { padding: 2rem; }

.login-body .form-control {
  padding-left: 2.75rem;
}
.input-icon-wrap { position: relative; }
.input-icon-wrap i {
  position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%);
  color: var(--text-3);
}

