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

:root {
  /* Brand Colors - Indigo & Violet (Modern SaaS) */
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;
  --primary-200: #c7d2fe;
  --primary-300: #a5b4fc;
  --primary-400: #818cf8;
  --primary-500: #6366f1;
  --primary-600: #4f46e5;
  /* Primary */
  --primary-700: #4338ca;
  /* Hover */
  --primary-800: #3730a3;
  --primary-900: #312e81;

  /* Neutral Colors - Slate (Clean, Professional) */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #64748b;
  /* Darkened from #94a3b8 */
  --slate-500: #475569;
  /* Darkened from #64748b */
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  /* Status Colors */
  --success-bg: #ecfdf5;
  --success-text: #059669;
  --warning-bg: #fffbeb;
  --warning-text: #d97706;
  --danger-bg: #fef2f2;
  --danger-text: #e11d48;
  --info-bg: #eff6ff;
  --info-text: #2563eb;

  /* Semantic Variables */
  --bg-app: var(--slate-50);
  --bg-surface: #ffffff;
  --bg-surface-hover: var(--slate-50);

  --text-main: var(--slate-900);
  --text-secondary: var(--slate-500);
  --text-tertiary: var(--slate-400);

  --border-color: var(--slate-200);
  --border-focus: var(--primary-500);

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-full: 9999px;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}
/* Dark Mode Support (Future proofing) */
[data-theme="dark"] {
  --bg-app: #0f172a;
  --bg-surface: #1e293b;
  --bg-surface-hover: #334155;
  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --border-color: #334155;
}
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.025em;
}
h1 {
  font-size: 2.25rem;
  line-height: 2.5rem;
}
h2 {
  font-size: 1.875rem;
  line-height: 2.25rem;
}
h3 {
  font-size: 1.5rem;
  line-height: 2rem;
}
h4 {
  font-size: 1.25rem;
  line-height: 1.75rem;
}
/* Links */
a {
  color: var(--primary-600);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--primary-700);
}
/* --- Components --- */
/* Card */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  transition: all 0.2s ease-in-out;
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-200);
}
/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  gap: 0.5rem;
  line-height: 1.25rem;
  font-family: var(--font-sans);
}
.btn:active {
  transform: scale(0.98);
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn-primary {
  background-color: var(--primary-600);
  color: white;
  box-shadow: 0 1px 2px 0 rgba(79, 70, 229, 0.3);
}
.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-700);
  box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.4);
}
.btn-secondary {
  background-color: white;
  color: var(--slate-700);
  border-color: var(--slate-300);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover:not(:disabled) {
  background-color: var(--slate-50);
  border-color: var(--slate-400);
}
.btn-danger {
  background-color: white;
  color: var(--danger-text);
  border-color: var(--danger-text);
}
.btn-danger:hover:not(:disabled) {
  background-color: var(--danger-bg);
}
.btn-ghost {
  background-color: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover:not(:disabled) {
  background-color: var(--bg-surface-hover);
  color: var(--text-main);
}
/* Inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  line-height: 1.5rem;
  color: var(--text-main);
  background-color: var(--bg-surface);
  background-clip: padding-box;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px var(--primary-100);
  transform: translateY(-1px);
}
input::placeholder {
  color: var(--slate-400);
}
/* Input Group */
.input-group {
  position: relative;
}
.input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate-400);
  pointer-events: none;
}
.input-icon-right {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate-400);
  cursor: pointer;
}
.input-icon~input {
  padding-left: 2.5rem;
}
.input-icon-right~input {
  padding-right: 2.5rem;
}
/* Tables */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}
table {
  width: 100%;
  border-collapse: separate;
  /* Changed for sticky header border radius */
  border-spacing: 0;
  text-align: left;
  font-size: 0.875rem;
}
thead {
  background-color: var(--bg-surface);
  position: sticky;
  top: 0;
  z-index: 10;
}
thead th:first-child {
  border-top-left-radius: var(--radius-lg);
}
thead th:last-child {
  border-top-right-radius: var(--radius-lg);
}
th {
  padding: 1rem 1.5rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  /* For sticky opacity */
}
td {
  padding: 1rem 1.5rem;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.15s ease;
}
tr:last-child td {
  border-bottom: none;
}
tbody tr {
  transition: transform 0.1s ease, background-color 0.15s ease;
}
tbody tr:hover {
  background-color: var(--bg-surface-hover);
  cursor: default;
}
/* Page Transitions */
.page-enter {
  opacity: 0;
  transform: translateY(10px);
}
.page-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 300ms, transform 300ms;
}
.page-exit {
  opacity: 1;
}
.page-exit-active {
  opacity: 0;
  transition: opacity 200ms;
}
/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
}
.badge-success {
  background-color: var(--success-bg);
  color: var(--success-text);
}
.badge-warning {
  background-color: var(--warning-bg);
  color: var(--warning-text);
}
.badge-danger {
  background-color: var(--danger-bg);
  color: var(--danger-text);
}
.badge-info {
  background-color: var(--info-bg);
  color: var(--info-text);
}
.badge-neutral {
  background-color: var(--slate-100);
  color: var(--slate-600);
}
/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.stat-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
  font-family: var(--font-display);
}
/* Utilities */
.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.items-center {
  align-items: center;
}
.justify-between {
  justify-content: space-between;
}
.justify-end {
  justify-content: flex-end;
}
.justify-center {
  justify-content: center;
}
.gap-1 {
  gap: 0.25rem;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-3 {
  gap: 0.75rem;
}
.gap-4 {
  gap: 1rem;
}
.gap-6 {
  gap: 1.5rem;
}
.gap-8 {
  gap: 2rem;
}
.p-2 {
  padding: 0.5rem;
}
.p-4 {
  padding: 1rem;
}
.p-6 {
  padding: 1.5rem;
}
.p-8 {
  padding: 2rem;
}
.mt-2 {
  margin-top: 0.5rem;
}
.mt-4 {
  margin-top: 1rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.mb-4 {
  margin-bottom: 1rem;
}
.mb-6 {
  margin-bottom: 1.5rem;
}
.mb-8 {
  margin-bottom: 2rem;
}
.w-full {
  width: 100%;
}
.w-12 {
  width: 3rem;
}
.w-16 {
  width: 4rem;
}
.w-20 {
  width: 5rem;
}
.h-12 {
  height: 3rem;
}
.h-16 {
  height: 4rem;
}
.h-20 {
  height: 5rem;
}
.h-fit {
  height: fit-content;
}
.max-w-screen-xl {
  max-width: 1400px;
}
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}
.text-sm {
  font-size: 0.875rem;
}
.text-xs {
  font-size: 0.75rem;
}
.text-lg {
  font-size: 1.125rem;
}
.text-xl {
  font-size: 1.25rem;
}
.text-2xl {
  font-size: 1.5rem;
}
.text-3xl {
  font-size: 1.875rem;
}
.text-muted {
  color: var(--text-secondary);
}
.text-white {
  color: white;
}
.text-primary {
  color: var(--primary-600);
}
.text-success {
  color: var(--success-600);
}
.text-warning {
  color: var(--warning-600);
}
.text-danger {
  color: var(--danger-600);
}
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.font-bold {
  font-weight: 700;
}
.font-semibold {
  font-weight: 600;
}
.font-extrabold {
  font-weight: 800;
}
.block {
  display: block;
}
.grid {
  display: grid;
}
.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.cursor-pointer {
  cursor: pointer;
}
.rounded-2xl {
  border-radius: 1rem;
}
.shadow-lg {
  box-shadow: var(--shadow-lg);
}
.shadow-xl {
  box-shadow: var(--shadow-xl);
}
.border-none {
  border: none;
}
/* Modal */
.ring-2 {
  box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 4px var(--primary-500);
}
.ring-primary-500 {
  /* Combined with ring-2 for simplicity in this custom CSS setup */
  border-color: var(--primary-500);
}
.bg-primary-50 {
  background-color: var(--primary-50);
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.4);
  /* Slate 900 with opacity */
  backdrop-filter: blur(2px);
  z-index: 40;
}
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-surface);
  padding: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 50;
  max-width: 500px;
  width: 90%;
  overflow: hidden;
  animation: modal-pop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-body {
  padding: 1.5rem;
}
.modal-footer {
  padding: 1rem 1.5rem;
  background-color: var(--bg-surface-hover);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}
@keyframes modal-pop {
  from {
    opacity: 0;
    transform: translate(-50%, -48%) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}
/* Animations */
.fade-in {
  animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}
/* Avatar */
.avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  background-color: var(--primary-100);
  color: var(--primary-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
}
.avatar-sm {
  width: 2rem;
  height: 2rem;
  font-size: 0.75rem;
}
/* Dropdowns */
.dropdown {
  position: relative;
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 50;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xl);
  border-radius: var(--radius);
  min-width: 200px;
  margin-top: 0.5rem;
  overflow: hidden;
  animation: slideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-main);
  text-decoration: none;
  transition: background-color 0.2s;
  cursor: pointer;
  font-size: 0.875rem;
}
.dropdown-item:hover {
  background-color: var(--bg-surface-hover);
}
.dropdown-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 0.25rem 0;
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: var(--danger-text);
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 50%;
  border: 2px solid var(--bg-surface);
}
/* Backgrounds, Borders, Text Colors - Duplicate Definitions Removed */
/* Font Weights */
.font-medium {
  font-weight: 500;
}
/* Layout */
.h-full {
  height: 100%;
}
/* Gradients */
.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--slate-900) 100%);
}
.bg-gradient-primary-light {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
}
.bg-gradient-success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}
.bg-gradient-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}
.bg-gradient-violet {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}
/* Layout Utilities for Redesign */
.min-h-screen {
  min-height: 100vh;
}
.hidden {
  display: none;
}
.relative {
  position: relative;
}
.absolute {
  position: absolute;
}
.inset-0 {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}
.z-10 {
  z-index: 10;
}
/* Glassmorphism */
.backdrop-blur-sm {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.bg-white-20 {
  background-color: rgba(255, 255, 255, 0.2);
}
/* Responsive */
@media (min-width: 768px) {
  .md-flex {
    display: flex;
  }

  .md-w-half {
    width: 50%;
  }

  .md-p-12 {
    padding: 3rem;
  }
}
@media (min-width: 1024px) {
  .lg-max-w-md {
    max-width: 28rem;
  }
}
/* Attendance Page Styles */
.page-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}
.page-header {
  text-align: center;
  margin-bottom: 2rem;
}
.page-header h1 {
  margin-bottom: 0.5rem;
}
.subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.stat-card h2 {
  font-size: 0.95rem;
  margin: 0;
  font-weight: 600;
}
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.status-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  background-color: var(--bg-surface);
  cursor: pointer;
  transition: all 0.2s ease;
}
.status-card:hover {
  border-color: var(--primary-200);
  background-color: var(--bg-surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.status-card.selected {
  border-color: var(--primary-500);
  background-color: var(--primary-50);
  box-shadow: 0 0 0 3px var(--primary-100);
}
.status-card.selected .status-card-title {
  color: var(--slate-900);
}
.status-card.selected .status-card-icon {
  color: var(--primary-700);
}
.status-card-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--primary-600);
}
.status-card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}
.table-responsive {
  overflow-x: auto;
}
/* Make buttons more prominent on attendance page */
.page-container .btn {
  font-weight: 600;
  letter-spacing: 0.025em;
}
@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}
@keyframes rotate-in {
  from {
    transform: rotate(-90deg) scale(0.5);
    opacity: 0;
  }

  to {
    transform: rotate(0) scale(1);
    opacity: 1;
  }
}/* App.css */
.app-container {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.app-container>main {
  flex: 1;
  width: 100%;
}/* Mobile Responsiveness Improvements */

@media (max-width: 768px) {

    /* General Layout */
    .app-container {
        padding-bottom: 80px;
        /* Space for potential bottom nav or just breathing room */
    }

    /* Header */
    header {
        padding: 0.75rem 1rem !important;
    }

    header h2 {
        font-size: 1.1rem !important;
    }

    /* Hamburger Menu Logic */
    .mobile-menu-btn {
        display: block !important;
        color: var(--pk-text-main);
    }

    /* Hide Desktop Nav in Mobile */
    .desktop-nav {
        display: none !important;
    }

    .desktop-only {
        display: none !important;
    }


    /* Stats Grid: Stack cards vertically */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Tables: Horizontal Scroll */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1rem;
        border-radius: var(--pk-radius);
        border: 1px solid var(--pk-border);
    }

    table {
        min-width: 600px;
        /* Ensure table doesn't squash too much */
    }

    /* Cards */
    .card {
        padding: 1rem !important;
    }

    /* Form layouts: Stack grid columns */
    .flex.justify-between,
    .flex.gap-4,
    div[style*="grid-template-columns: 1fr 1fr"],
    div[style*="grid-template-columns: 1fr 1.5fr"] {
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Adjust Modal width */
    .modal {
        width: 90% !important;
        max-width: none !important;
        margin: 1rem;
    }

    /* Employee Dashboard specific */
    .status-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        /* 2 columns for status buttons */
    }

    /* Hide some non-essential table columns on very small screens if needed, 
     but horizontal scroll is usually safer for data tables. */
}

@media (max-width: 480px) {

    /* Further adjustments for phones */
    h1 {
        font-size: 1.5rem !important;
    }

    h3 {
        font-size: 1.2rem !important;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    /* Stack actions in table if possible or just rely on scroll */
    .flex.gap-2 {
        flex-wrap: wrap;
    }

    /* Notification Dropdown Mobile */
    .dropdown-menu {
        width: 300px !important;
        right: -60px !important;
        max-width: 90vw !important;
    }

    /* Touch Targets */
    .btn,
    .dropdown-item,
    .input-group input,
    .input-group select {
        min-height: 44px;
        /* Improved touch target size */
    }

    /* Status selection on Attendance Form */
    .status-grid {
        grid-template-columns: 1fr !important;
    }
}