/* ═══════════════════════════════════════════════
   AGS HR Portal — Stylesheet
   Alpha Geo Solutions | ags-hrone.in
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg: #0B0F19;
  --bg-card: #111827;
  --bg-card-hover: #1A2236;
  --bg-input: #0D1221;
  --border: #1E2A3F;
  --border-focus: #3B82F6;
  --text: #E8ECF4;
  --text-dim: #7B8BA5;
  --text-muted: #4B5975;
  --accent: #3B82F6;
  --accent-soft: rgba(59,130,246,0.12);
  --accent-glow: rgba(59,130,246,0.25);
  --danger: #EF4444;
  --danger-soft: rgba(239,68,68,0.12);
  --success: #10B981;
  --success-soft: rgba(16,185,129,0.12);
  --warning: #F59E0B;
  --warning-soft: rgba(245,158,11,0.12);
  --purple: #8B5CF6;
  --purple-soft: rgba(139,92,246,0.12);
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --font: 'DM Sans', system-ui, -apple-system, sans-serif;
  --mono: 'Space Mono', 'Courier New', monospace;
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Animations ── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }

.fade-in { animation: fadeIn .4s ease-out both; }
.slide-in { animation: slideIn .35s ease-out both; }
.scale-in { animation: scaleIn .3s ease-out both; }

/* ── Login Page ── */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: 
    radial-gradient(ellipse at 30% 20%, rgba(59,130,246,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(139,92,246,0.06) 0%, transparent 60%),
    var(--bg);
}

.login-box {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 36px;
  box-shadow: var(--shadow);
  animation: scaleIn .5s ease-out;
}

.login-logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 4px 20px var(--accent-glow);
  font-size: 24px;
}

.login-title { font-size: 24px; font-weight: 700; text-align: center; margin-bottom: 4px; letter-spacing: -0.5px; }
.login-sub { color: var(--text-dim); text-align: center; font-size: 14px; margin-bottom: 32px; }
.login-footer { text-align: center; margin-top: 20px; font-size: 12px; color: var(--text-muted); }

/* ── Form Elements ── */
.input-group { margin-bottom: 18px; }
.input-label { display: block; font-size: 11px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 7px; }
.input-label .required { color: var(--danger); }

.input-field {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  transition: all .2s;
  outline: none;
}
.input-field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-field::placeholder { color: var(--text-muted); }
.input-field.error { border-color: var(--danger); }

select.input-field {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%237B8BA5' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

textarea.input-field { resize: vertical; min-height: 80px; line-height: 1.5; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary { background: linear-gradient(135deg, var(--accent), #2563EB); color: #fff; box-shadow: 0 2px 12px var(--accent-glow); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 4px 20px var(--accent-glow); transform: translateY(-1px); }

.btn-danger { background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }
.btn-danger:hover:not(:disabled) { background: rgba(239,68,68,0.2); }

.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-card-hover); color: var(--text); }

.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-full { width: 100%; }

.icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s;
  padding: 0;
}
.icon-btn:hover { background: var(--bg-card-hover); color: var(--text); }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); border-color: rgba(239,68,68,0.3); }

/* ── App Layout ── */
.app-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 50;
  transition: transform .3s ease;
}

.sidebar-logo { display: flex; align-items: center; gap: 12px; padding: 0 24px; margin-bottom: 36px; }
.sidebar-logo-icon { width: 38px; height: 38px; background: linear-gradient(135deg, var(--accent), var(--purple)); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 18px; }
.sidebar-logo-text { font-size: 16px; font-weight: 700; letter-spacing: -0.3px; }
.sidebar-logo-sub { font-size: 11px; color: var(--text-muted); font-family: var(--mono); }

.sidebar-nav { flex: 1; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 24px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all .15s;
  font-size: 14px;
  font-weight: 500;
  border-left: 3px solid transparent;
  text-decoration: none;
}
.nav-item:hover { background: var(--bg-card-hover); color: var(--text); }
.nav-item.active { color: var(--accent); background: var(--accent-soft); border-left-color: var(--accent); }

.sidebar-footer { padding: 16px 24px; border-top: 1px solid var(--border); }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sidebar-user-avatar { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--purple)); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.sidebar-user-name { font-size: 13px; font-weight: 600; }
.sidebar-user-role { font-size: 11px; color: var(--text-muted); }

.main-content { flex: 1; margin-left: 260px; padding: 32px; min-height: 100vh; }

/* ── Page Header ── */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 16px; }
.page-title { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; }
.page-title-sub { font-size: 13px; color: var(--text-dim); margin-top: 2px; }

/* ── Stat Cards ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all .2s;
}
.stat-card:hover { border-color: var(--border-focus); transform: translateY(-2px); }

.stat-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; font-size: 18px; }
.stat-value { font-size: 28px; font-weight: 700; font-family: var(--mono); letter-spacing: -1px; }
.stat-label { font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.6px; margin-top: 4px; }

/* ── Table Wrapper ── */
.table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.table-toolbar { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}
.search-box input { border: none; background: transparent; color: var(--text); font-family: var(--font); font-size: 13px; width: 100%; outline: none; }
.search-box input::placeholder { color: var(--text-muted); }
.search-box:focus-within { border-color: var(--accent); }

.filter-select { width: auto; min-width: 150px; padding: 8px 36px 8px 12px; font-size: 13px; }

.overflow-table { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 12px 20px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); border-bottom: 1px solid var(--border); background: rgba(0,0,0,0.15); }
td { padding: 14px 20px; font-size: 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(59,130,246,0.03); }

.emp-name { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.emp-avatar { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: #fff; flex-shrink: 0; }
.emp-email { font-size: 12px; color: var(--text-dim); font-weight: 400; }
.emp-code { font-family: var(--mono); font-size: 13px; }

.actions-cell { display: flex; gap: 6px; justify-content: flex-end; }

/* ── Badges ── */
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.badge-active { background: var(--success-soft); color: var(--success); }
.badge-inactive { background: var(--danger-soft); color: var(--danger); }
.badge-notice { background: var(--warning-soft); color: var(--warning); }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn .2s ease-out;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: scaleIn .3s ease-out;
}
.modal.modal-lg { max-width: 740px; }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  background: var(--bg-card);
  z-index: 2;
}
.modal-title { font-size: 18px; font-weight: 700; }

.modal-body { padding: 24px; }

.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  position: sticky; bottom: 0;
  background: var(--bg-card);
}

.form-section-title { font-size: 13px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.6px; margin: 20px 0 12px; }
.form-section-title:first-child { margin-top: 0; }

/* ── Detail Panel ── */
.detail-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.detail-section {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.detail-section-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-dim); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }

.detail-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 14px; }
.detail-row:last-child { border-bottom: none; }
.detail-row .label { color: var(--text-dim); }
.detail-row .value { font-weight: 500; text-align: right; }

/* ── Documents ── */
.docs-header { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 12px; }
.docs-title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.doc-upload-row { display: flex; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--accent); background: var(--accent-soft); }
.upload-zone p { color: var(--text-dim); font-size: 13px; margin-top: 6px; }

.doc-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 8px;
  font-size: 13px;
}
.doc-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.doc-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-type-badge { font-size: 11px; padding: 2px 8px; background: var(--purple-soft); color: var(--purple); border-radius: 4px; flex-shrink: 0; }
.doc-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-dim); }
.empty-state-icon { width: 64px; height: 64px; background: var(--accent-soft); border-radius: 16px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 24px; }
.empty-state-title { font-weight: 600; font-size: 16px; margin-bottom: 6px; color: var(--text); }

/* ── Confirm Dialog ── */
.confirm-dialog { text-align: center; padding: 32px 24px; }
.confirm-dialog h3 { margin-bottom: 8px; font-size: 18px; }
.confirm-dialog p { color: var(--text-dim); font-size: 14px; margin-bottom: 24px; }
.confirm-actions { display: flex; gap: 10px; justify-content: center; }

/* ── Error & Messages ── */
.error-msg { background: var(--danger-soft); color: var(--danger); padding: 10px 14px; border-radius: var(--radius); font-size: 13px; margin-bottom: 16px; border: 1px solid rgba(239,68,68,0.2); }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--success);
  color: var(--text);
  padding: 12px 20px;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  z-index: 200;
  font-size: 14px;
  display: flex; align-items: center; gap: 10px;
  animation: slideIn .3s ease-out;
}
.toast.hidden { display: none; }

/* ── Spinner ── */
.spinner { width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.2); border-top-color: #fff; border-radius: 50%; animation: spin .6s linear infinite; display: inline-block; }

/* ── Dashboard Grid ── */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.section-title { padding: 16px 20px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 15px; }

.recent-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.recent-item:last-child { border-bottom: none; }

.dept-bar-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; }
.dept-bar-track { width: 120px; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.dept-bar-fill { height: 100%; border-radius: 3px; }
.dept-bar-count { font-family: var(--mono); font-size: 13px; width: 30px; text-align: right; }

/* ── Mobile Toggle ── */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 16px; left: 16px;
  z-index: 60;
  width: 40px; height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  font-size: 20px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 20px; padding-top: 60px; }
  .mobile-toggle { display: flex !important; }
  .form-row { grid-template-columns: 1fr; }
  .detail-panel { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  table { font-size: 13px; }
  th, td { padding: 10px 14px; }
  .table-toolbar { flex-direction: column; }
  .search-box { max-width: none; }
  .page-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .login-box { padding: 32px 24px; }
}

/* ════════════════════════════════════════
   AGS HR Portal v2.0 — Additional Styles
   ════════════════════════════════════════ */

/* ── Role Tabs (Login Screen) ── */
.role-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
}

.role-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}

.role-tab.active {
  background: linear-gradient(135deg, var(--accent), #2563EB);
  color: #fff;
  box-shadow: 0 2px 12px var(--accent-glow);
}

.role-tab:not(.active):hover {
  background: var(--bg-card-hover);
  color: var(--text);
}

/* ── Success Message ── */
.success-msg {
  background: var(--success-soft);
  color: var(--success);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid rgba(16,185,129,0.2);
}

/* ── Attendance Tabs ── */
.att-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  width: fit-content;
  margin-bottom: 4px;
}

.att-tab {
  padding: 9px 20px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}

.att-tab.active {
  background: linear-gradient(135deg, var(--accent), #2563EB);
  color: #fff;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.att-tab:not(.active):hover {
  background: var(--bg-card-hover);
  color: var(--text);
}

/* ── Live attendance mark card style ── */
#mark-att-btn {
  background: linear-gradient(135deg, var(--accent), #2563EB);
  font-size: 16px !important;
  padding: 18px !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 4px 20px var(--accent-glow);
}

/* ── Ensure error toast shows correctly ── */
.toast.error-toast {
  border-color: var(--danger);
}

/* ── Leave status colors in table ── */
.badge-leave { background: var(--purple-soft); color: var(--purple); }

/* ── Responsive tweaks ── */
@media (max-width: 768px) {
  .role-tabs { flex-direction: column; }
  .att-tabs { width: 100%; }
  .att-tab { flex: 1; text-align: center; font-size: 13px; }
}

/* ── Role Locked Badge (admin.html / employee.html) ── */
.role-locked-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--accent), #2563EB);
  color: #fff;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px var(--accent-glow);
  letter-spacing: -0.2px;
}

/* ── Leave filter select in page header ── */
.leave-filter-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Fix spinner color in dark containers ── */
.att-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 48px auto;
  display: block;
}

/* ── Admin link on login page ── */
.admin-link-row {
  text-align: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.admin-link {
  color: var(--accent);
  font-size: 13px;
  text-decoration: none;
  font-weight: 600;
  transition: opacity .2s;
}
.admin-link:hover { opacity: 0.75; }

/* ── Checkout button style ── */
#mark-att-btn[style*="F59E0B"] {
  box-shadow: 0 4px 20px rgba(245,158,11,0.3) !important;
}

/* ── Date/Month input calendar icon — make visible ── */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(0.8);
  cursor: pointer;
  opacity: 0.7;
  padding: 2px;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="month"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* ══════════════════════════════════════════════════
   EMPLOYEE PORTAL — MOBILE RESPONSIVE
   Full phone optimized layout
   ══════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* ── Employee portal: hide sidebar, show bottom nav ── */
  .emp-layout .sidebar {
    display: none !important;
  }

  .emp-layout .main-content {
    margin-left: 0 !important;
    padding: 16px 16px 90px 16px !important; /* bottom padding for nav bar */
    padding-top: 16px !important;
    min-height: 100vh;
  }

  .emp-layout .mobile-toggle {
    display: none !important;
  }

  /* ── Bottom Navigation Bar ── */
  .emp-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    z-index: 100;
    height: 64px;
    align-items: stretch;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
  }

  .emp-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: all .15s;
    border: none;
    background: transparent;
    padding: 8px 4px;
    -webkit-tap-highlight-color: transparent;
  }

  .emp-nav-item .nav-icon {
    font-size: 20px;
    line-height: 1;
  }

  .emp-nav-item.active {
    color: var(--accent);
  }

  .emp-nav-item.active .nav-icon-wrap {
    background: var(--accent-soft);
    border-radius: 12px;
    padding: 4px 16px;
  }

  /* ── Mobile page header ── */
  .emp-layout .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
  }

  .emp-layout .page-title {
    font-size: 20px;
  }

  /* ── Mobile top header bar ── */
  .emp-mobile-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    margin: -16px -16px 16px -16px;
  }

  .emp-mobile-header .logo-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .emp-mobile-header .logo-icon {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
  }

  .emp-mobile-header .logo-text {
    font-size: 14px;
    font-weight: 700;
  }

  .emp-mobile-header .user-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--accent-soft);
    border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
    overflow: hidden;
    cursor: pointer;
  }

  /* ── Mark Attendance mobile ── */
  .emp-layout #mark-att-btn {
    font-size: 18px !important;
    padding: 20px !important;
    border-radius: 16px !important;
  }

  /* ── Stats cards mobile ── */
  .emp-layout .stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px;
  }

  .emp-layout .stat-card {
    padding: 14px;
  }

  .emp-layout .stat-value {
    font-size: 22px;
  }

  /* ── Tables mobile ── */
  .emp-layout table {
    font-size: 12px;
  }

  .emp-layout th, .emp-layout td {
    padding: 8px 10px;
  }

  /* ── Table wrapper mobile scroll ── */
  .emp-layout .table-wrapper {
    border-radius: 12px;
    overflow: hidden;
  }

  .emp-layout .overflow-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* ── Form rows mobile ── */
  .emp-layout .form-row {
    grid-template-columns: 1fr !important;
  }

  /* ── Modal mobile ── */
  .emp-layout .modal-overlay {
    padding: 0 !important;
    align-items: flex-end !important;
  }

  .emp-layout .modal {
    max-width: 100% !important;
    width: 100% !important;
    max-height: 92vh !important;
    border-radius: 20px 20px 0 0 !important;
  }

  /* ── Apply leave form mobile ── */
  .emp-layout #leave-type,
  .emp-layout #leave-from,
  .emp-layout #leave-to,
  .emp-layout #leave-reason {
    font-size: 16px !important; /* prevents iOS zoom */
  }

  /* ── Profile mobile ── */
  .emp-layout #profile-avatar {
    width: 70px !important;
    height: 70px !important;
  }

  /* ── Month input mobile ── */
  .emp-layout input[type="month"] {
    font-size: 14px;
    width: 100% !important;
  }

  /* ── Detail rows mobile ── */
  .emp-layout .detail-row {
    flex-direction: column;
    gap: 2px;
    padding: 10px 0;
  }

  .emp-layout .detail-row .value {
    text-align: left;
    font-size: 15px;
  }

  /* ── Attendance table hide some columns on mobile ── */
  .emp-layout .att-hide-mobile {
    display: none !important;
  }

}

/* Desktop: hide bottom nav ── */
.emp-bottom-nav {
  display: none;
}

.emp-mobile-header {
  display: none;
}

