/* --- Premium UI Components --- */
:root {
    --card-bg: #ffffff;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --input-focus: #1d4157;
    --border-soft: #f1f5f9;
}

.settings-container {
    max-width: 900px;
    margin: 0 auto;
}

.settings-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-soft);
    transition: transform 0.2s ease;
}

.settings-card:hover {
    transform: translateY(-2px);
}

.settings-card h4 {
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1.5px solid var(--border-soft);
    padding-bottom: 0.75rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.settings-grid.full {
    grid-template-columns: 1fr;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.form-group input, .form-group select, .form-group textarea {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--primary);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(29, 65, 87, 0.1);
}

/* Modern Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--primary);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.toggle-group {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f1f5f9;
    padding: 12px;
    border-radius: 12px;
    margin-top: 5px;
}

.toggle-label-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Primary Colors - Deep Oceanic */
    --primary-h: 222;
    --primary-s: 89%;
    --primary-l: 48%;
    --primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
    --primary-light: hsl(var(--primary-h), var(--primary-s), 65%);
    --primary-dark: hsl(var(--primary-h), var(--primary-s), 35%);
    
    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* Backgrounds & Surfaces */
    --bg-main: #f8fafc;
    --surface: #ffffff;
    --sidebar-bg: #0f172a;
    --sidebar-hover: rgba(255, 255, 255, 0.05);
    --sidebar-active: rgba(59, 130, 246, 0.15);
    
    /* Text Colors */
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-on-primary: #ffffff;
    
    /* Glassmorphism & Effects */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --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-premium: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    height: 100vh;
    overflow: hidden;
}

/* --- Login Experience --- */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(30, 64, 175, 0.1) 0%, transparent 40%),
                var(--bg-main);
}

.login-container {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: var(--shadow-premium);
    width: 100%;
    max-width: 440px;
    text-align: center;
    transform: translateY(0);
    transition: var(--transition-base);
}

.login-container:hover {
    transform: translateY(-5px);
}

.login-container h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-container p {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

.login-container input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.login-container input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    background: white;
}

.login-container button {
    width: 100%;
    padding: 0.875rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: 0 4px 6px -1px rgba(30, 64, 175, 0.2);
}

.login-container button:hover {
    background: var(--primary-dark);
    box-shadow: 0 10px 15px -3px rgba(30, 64, 175, 0.3);
}

/* --- App Layout --- */
.app-container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    color: #f1f5f9;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    z-index: 50;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
}

.sidebar-brand {
    padding-bottom: 2rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar-brand img {
    height: 60px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    margin-bottom: 0.75rem;
}

.sidebar-brand .title {
    font-weight: 700;
    font-size: 0.875rem;
    color: #fff;
    text-align: center;
    letter-spacing: 0.025em;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
}

.sidebar-category {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 1.5rem 1rem 0.5rem;
}

.sidebar button {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: #94a3b8;
    font-size: 0.9375rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-fast);
}

.sidebar button:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar button.active {
    background: var(--sidebar-active);
    color: #60a5fa;
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.2);
}

.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg-main);
}

.navbar {
    height: 70px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 40;
}

.navbar-center {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-main);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #f1f5f9;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
}

.nav-logout {
    padding: 0.5rem 1rem;
    color: var(--danger);
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 10px;
    cursor: pointer;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.1);
    transition: var(--transition-fast);
}

.nav-logout:hover {
    background: rgba(239, 68, 68, 0.05);
}

.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* --- Dashboard & Generic Cards --- */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--surface);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-md);
    border: 1px solid #f1f5f9;
    transition: var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card .icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1.25rem;
}

.dept-icon { background: #eff6ff; color: #1e69ff; }
.doc-icon { background: #ecfdf5; color: #059669; }
.user-icon { background: #fff7ed; color: #d97706; }
.shield-icon { background: #faf5ff; color: #7c3aed; }

.card .content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.125rem;
    color: var(--text-main);
}

.card .content p {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.table-container {
    background: var(--surface);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid #f1f5f9;
}

.table-container h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #f1f5f9;
}

td {
    padding: 1rem;
    font-size: 0.9375rem;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-main);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #f8fafc;
}

/* Badges */
.badge {
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.badge-active, .badge-approved { background: #d1fae5; color: #065f46; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-rejected { background: #fee2e2; color: #991b1b; }

/* Buttons Custom Styling */
button.btn-primary {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-fast);
}

button.btn-primary:hover {
    background: var(--primary-dark);
}

/* Inputs & Form Groups in dashboard */
input[type="text"], input[type="date"], select, textarea {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-family: inherit;
    font-size: 0.9375rem;
    transition: var(--transition-fast);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

label {
    display: block;
    margin-bottom: 0.5rem;
}

/* Dropzone styling */
#dropZone {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 3rem 2rem;
    transition: var(--transition-base);
}

#dropZone:hover {
    background: #eff6ff;
    border-color: var(--primary);
}

/* --- Animations & Loaders --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(29, 65, 87, 0.1);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

section {
    animation: fadeIn 0.4s ease-out forwards;
}
