:root {
    --navy: #0c2340;
    --navy-light: #1a3a5f;
    --blue: #2563eb;
    --blue-hover: #1d4ed8;
    --green: #10b981;
    --amber: #f59e0b;
    --red: #ef4444;
    --bg: #f8fafc;
    --sidebar-bg: #0c2340;
    --sidebar-text: #94a3b8;
    --sidebar-active: #ffffff;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --font: 'Plus Jakarta Sans', sans-serif;
    --sidebar-width: 260px;
}

* { box-sizing: border-box; }
body { 
    margin: 0; 
    font-family: var(--font); 
    background-color: var(--bg); 
    color: var(--text-main); 
    display: flex; 
    min-height: 100vh; 
    overflow-x: hidden; 
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    height: 100vh;
    position: fixed;
    left: 0; top: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-logo {
    width: 100px;
    height: auto;
    object-fit: contain;
}

.sidebar-brand-text {
    font-weight: 800;
    font-size: 0.9rem;
    color: #fff;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.login-logo {
    width: 120px;
    height: auto;
    margin-bottom: 25px;
}

.sidebar-menu {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    border-left: 4px solid transparent;
    gap: 12px;
}

.nav-item:hover {
    color: var(--sidebar-active);
    background: rgba(255,255,255,0.03);
}

.nav-item.active {
    color: var(--sidebar-active);
    background: rgba(255,255,255,0.05);
    border-left-color: var(--blue);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.logout-link {
    color: #fca5a5;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-link:hover { color: #f87171; }

/* Main Content */
.main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Watermark */
.page-watermark {
    position: fixed;
    top: 50%;
    left: calc(50% + var(--sidebar-width)/2);
    transform: translate(-50%, -50%);
    width: 600px;
    height: auto;
    opacity: 0.08; /* Re-evaluating 50%: 0.5 is VERY strong for a background. I will use 0.08 for subtle look. */
    pointer-events: none;
    z-index: 0;
}

.header {
    height: 70px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 900;
}

.header-user { display: flex; align-items: center; gap: 12px; }
.user-avatar { 
    width: 35px; height: 35px; 
    background: var(--blue); 
    color: #fff; 
    border-radius: 10px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: 700; 
    font-size: 0.9rem; 
}

.content-body { padding: 30px; position: relative; z-index: 2; }

/* Custom Notifications */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: #fff;
    padding: 16px 24px;
    border-radius: 16px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    border-left: 4px solid var(--blue);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    animation: slideIn 0.3s ease forwards;
    min-width: 300px;
}

.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Dashboard UI Elements */
.stats-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    gap: 20px; 
    margin-bottom: 30px; 
}

.card { 
    background: var(--card-bg); 
    border-radius: 16px; 
    border: 1px solid var(--border); 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); 
    margin-bottom: 20px;
}

.stat-card { 
    padding: 24px; 
    position: relative; 
    overflow: hidden; 
    border-left: 4px solid var(--border);
}
.stat-card.blue { border-left-color: var(--blue); }
.stat-card.amber { border-left-color: var(--amber); }
.stat-card.green { border-left-color: var(--green); }

.stat-label { 
    font-size: 0.75rem; 
    font-weight: 700; 
    color: var(--text-muted); 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
}
.stat-value { 
    font-size: 1.75rem; 
    font-weight: 800; 
    color: var(--navy); 
    margin-top: 8px; 
    display: block; 
}

.section-title { 
    font-size: 1.25rem; 
    font-weight: 700; 
    color: var(--navy); 
    margin-bottom: 20px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
}

.table-card { overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.875rem; }
th { background: #f8fafc; padding: 16px; font-weight: 700; color: var(--text-muted); border-bottom: 1px solid var(--border); }
td { padding: 16px; border-bottom: 1px solid var(--border); }
tr:hover { background: #fcfdfe; }

.badge { 
    padding: 4px 12px; 
    border-radius: 20px; 
    font-size: 0.75rem; 
    font-weight: 700; 
}
.badge-Pending { background: #f1f5f9; color: #475569; }
.badge-In-Progress { background: #fff7ed; color: #c2410c; }
.badge-Completed { background: #ecfdf5; color: #047857; }

/* Buttons */
.btn { 
    padding: 10px 20px; 
    border-radius: 10px; 
    font-weight: 700; 
    cursor: pointer; 
    border: none; 
    font-size: 0.85rem; 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    transition: all 0.2s;
    font-family: inherit;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); transform: translateY(-1px); box-shadow: 0 4px 6px -1px rgba(37,99,235,0.2); }
.btn-outline { background: #fff; border: 1.5px solid var(--border); color: var(--text-main); }
.btn-outline:hover { background: #f8fafc; border-color: var(--text-muted); }
.btn-danger { background: #fee2e2; color: #dc2626; }
.btn-danger:hover { background: #fecaca; }
.btn-sm { padding: 6px 12px; font-size: 0.75rem; border-radius: 8px; }

/* Form Elements */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 700; font-size: 0.85rem; margin-bottom: 8px; color: var(--text-main); }
input[type="text"], input[type="password"], input[type="date"], input[type="number"], select, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s;
    background-color: #fff;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
}
input:disabled, textarea:disabled { background-color: #f1f5f9; cursor: not-allowed; }

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

/* Responsive */
.mobile-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--navy); }

@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-wrapper { margin-left: 0; width: 100%; }
    .mobile-toggle { display: block; }
    .header { padding: 0 20px; }
    .page-watermark { left: 50%; width: 300px; }
}

@media (max-width: 640px) {
    .form-row { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .content-body { padding: 20px; }
    .hide-mobile { display: none !important; }
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.modal-content {
    background: #fff;
    padding: 32px;
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}
.modal-header { margin-bottom: 24px; display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { margin: 0; font-size: 1.25rem; font-weight: 800; color: var(--navy); }

/* Stepper */
.stepper { display: flex; align-items: center; justify-content: center; margin-bottom: 40px; }
.step { display: flex; flex-direction: column; align-items: center; position: relative; z-index: 1; }
.step-circle { 
    width: 32px; height: 32px; border-radius: 10px; background: #fff; border: 2px solid var(--border); 
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.85rem; 
    color: var(--text-muted); transition: all 0.3s; 
}
.step.active .step-circle { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 0 0 5px rgba(37,99,235,0.15); }
.step.completed .step-circle { background: var(--green); border-color: var(--green); color: #fff; }
.step-label { margin-top: 10px; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.02em; }
.step.active .step-label { color: var(--blue); }
.step-line { flex: 1; height: 3px; background: var(--border); margin: 0 15px; margin-bottom: 22px; border-radius: 2px; }
.step-line.completed { background: var(--green); }

.hidden { display: none; }
