
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #f8fafc; 
    --bg-secondary: #ffffff; 
    --bg-card: #ffffff;
    --border-color: #e2e8f0; 
    --text-primary: #0f172a; 
    --text-secondary: #475569; 
    
    --primary: #2563eb; 
    --primary-glow: rgba(37, 99, 235, 0.15);
    --primary-hover: #1d4ed8;
    --secondary: #64748b; 
    --secondary-hover: #475569;
    
    --success: #059669; 
    --success-bg: #ecfdf5;
    --danger: #dc2626; 
    --danger-bg: #fef2f2;
    --warning: #d97706; 
    --warning-bg: #fffbeb;
    
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
    --sidebar-width: 270px;
    --top-navbar-height: 65px;
    --transition-speed: 0.25s;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
    word-break: break-word;
}

a {
    color: inherit;
    text-decoration: none;
}


::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}


.glass-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 100%;
}

.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 100%;
}
.glass-card:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}


.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    min-height: 40px;
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    font-size: 0.9rem;
    gap: 0.45rem;
    text-align: center;
    white-space: nowrap; 
    flex-shrink: 0;
    user-select: none;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 1px 2px 0 rgba(37, 99, 235, 0.1);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #ffffff;
    color: #334155;
    border: 1px solid #d1d5db;
}
.btn-secondary:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-1px);
}

.btn-danger {
    background-color: var(--danger);
    color: #ffffff;
    border-color: var(--danger);
}
.btn-danger:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
    transform: translateY(-1px);
}

.btn-success {
    background-color: var(--success);
    color: #ffffff;
    border-color: var(--success);
}
.btn-success:hover {
    background-color: #047857;
    border-color: #047857;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.35rem 0.65rem;
    min-height: 32px;
    font-size: 0.8rem;
    border-radius: 6px;
    white-space: nowrap;
    gap: 0.3rem;
    flex-shrink: 0;
}


.form-group {
    margin-bottom: 1.25rem;
    width: 100%;
    max-width: 100%;
}

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    max-width: 100%;
    min-height: 42px;
    padding: 0.65rem 0.85rem;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.925rem;
    transition: all 0.15s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-control:read-only, .form-control:disabled {
    background-color: #f8fafc;
    color: #64748b;
    cursor: not-allowed;
    border-color: #e2e8f0;
}


input[type="date"].form-control {
    min-height: 42px;
    padding-right: 0.5rem;
}


textarea.form-control {
    min-height: 90px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234b5563'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    width: 100%;
}


.validation-msg {
    margin-top: 0.3rem;
    font-size: 0.75rem;
    font-weight: 500;
}
.validation-msg.valid {
    color: var(--success);
}
.validation-msg.invalid {
    color: var(--danger);
}


.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 8%;
    background-color: #1e3a8a;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.brand-logo {
    height: 38px;
    width: auto;
    max-width: 52px;
    object-fit: contain;
    vertical-align: middle;
    display: inline-block;
    flex-shrink: 0;
    border-radius: 4px;
}

.brand-logo-lg {
    height: 70px;
    width: auto;
    max-width: 130px;
    object-fit: contain;
    display: block;
    margin: 0 auto 0.75rem;
}

.nav-brand {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    white-space: nowrap;
    text-decoration: none;
}

.sidebar-brand-box {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.sidebar-brand-box .brand-logo {
    height: 34px;
    max-width: 44px;
}

.sidebar-brand-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.75rem;
    font-weight: 500;
}

.nav-links a {
    color: #e2e8f0;
    transition: color 0.15s ease;
}
.nav-links a:hover {
    color: #ffffff;
}

.hero-section {
    padding: 5.5rem 8% 4.5rem;
    text-align: center;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
}

.hero-title {
    font-size: 2.75rem;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    color: #1e293b;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.hero-cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}


.section-container {
    padding: 4rem 8%;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 1.85rem;
    margin-bottom: 0.5rem;
    color: #1e293b;
}
.section-subtitle {
    color: var(--text-secondary);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
}


.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: #ffffff;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: transform var(--transition-speed) ease;
}

.sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.sidebar-close-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    align-items: center;
    justify-content: center;
}
.sidebar-close-btn:hover {
    color: var(--danger);
    background-color: #f1f5f9;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0.75rem;
    flex: 1;
    overflow-y: auto;
}

.sidebar-item {
    margin-bottom: 0.3rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.7rem 0.9rem;
    color: #475569;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.15s ease;
    gap: 0.75rem;
}
.sidebar-link:hover, .sidebar-link.active {
    background-color: #f1f5f9;
    color: var(--primary);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.dashboard-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--bg-primary);
    width: calc(100% - var(--sidebar-width));
    min-width: 0; 
}

.top-navbar {
    height: var(--top-navbar-height);
    background-color: #1e3a8a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
    position: sticky;
    top: 0;
    z-index: 90;
    gap: 1rem;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.top-navbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.menu-toggle-btn {
    display: none;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    padding: 0.45rem;
    cursor: pointer;
    color: #ffffff;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.menu-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.top-navbar-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-navbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.user-badge {
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.35rem 0.75rem;
    border-radius: 15px;
    font-size: 0.825rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.dashboard-content {
    padding: 1.75rem;
    flex: 1;
    width: 100%;
    min-width: 0;
}


.welcome-banner {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.02);
    width: 100%;
}


.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: #ffffff;
}

.custom-table {
    width: 100%;
    min-width: 600px; 
    border-collapse: collapse;
    text-align: left;
}

.custom-table th {
    background-color: #f8fafc;
    padding: 0.85rem 1rem;
    font-family: var(--font-heading);
    font-weight: 600;
    color: #475569;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.custom-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: #334155;
    vertical-align: middle;
    white-space: nowrap; 
}

.custom-table tr:last-child td {
    border-bottom: none;
}

.custom-table tr:nth-child(even) {
    background-color: #f8fafc;
}

.custom-table tr:hover td {
    background-color: #f1f5f9;
}

.table-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
}


.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.55rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-success {
    background-color: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.badge-danger {
    background-color: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.badge-warning {
    background-color: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.badge-secondary {
    background-color: #f1f5f9;
    color: #64748b;
    border: 1px solid var(--border-color);
}


.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.02);
    width: 100%;
}
.stat-card-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
    font-weight: 600;
}
.stat-card-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e293b;
}


.filter-bar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 1.25rem;
    background-color: #ffffff;
    padding: 1.25rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.02);
    width: 100%;
}
.filter-bar .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 150px;
}


.page-container-flex {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

.login-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 1.25rem;
    background-color: #f1f5f9;
    width: 100%;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}


.icon {
    width: 1.1rem;
    height: 1.1rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}


footer img,
.app-footer img,
.landing-footer img,
.footer-logo {
    height: 32px !important;
    width: auto !important;
    max-width: 48px !important;
    object-fit: contain !important;
    filter: brightness(0) invert(1) !important;
    opacity: 0.95 !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

.app-footer, footer.landing-footer, footer {
    background-color: #1e3a8a !important;
    color: #ffffff !important;
    padding: 1.75rem 1.5rem !important;
    text-align: center !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin-top: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.footer-brand {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0.6rem !important;
    margin-bottom: 0.5rem !important;
}

.footer-brand-title {
    font-family: var(--font-heading) !important;
    font-weight: 700 !important;
    font-size: 1.15rem !important;
    color: #ffffff !important;
}

.footer-copy, footer.landing-footer p, footer p {
    font-size: 0.85rem !important;
    color: rgba(255, 255, 255, 0.85) !important;
    margin: 0 !important;
}


.modal {
    display: none;
    position: fixed;
    z-index: 1100;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal.open {
    display: flex;
}
.modal-content {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    animation: modalFadeIn 0.2s ease-out;
}
@keyframes modalFadeIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}



@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 4px 0 16px rgba(0, 0, 0, 0.1);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .sidebar-close-btn {
        display: flex;
    }
    .dashboard-main {
        margin-left: 0;
        width: 100%;
    }
    .menu-toggle-btn {
        display: inline-flex;
    }
    .top-navbar {
        padding: 0 1.25rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem 5%;
        gap: 0.75rem;
    }
    .nav-links {
        gap: 1rem;
        font-size: 0.875rem;
    }
    .hero-section {
        padding: 4rem 5% 3.5rem;
    }
    .hero-title {
        font-size: 2.1rem;
    }
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    .hero-cta-group {
        flex-direction: column;
        align-items: stretch;
        max-width: 320px;
        margin: 0 auto;
        gap: 0.75rem;
    }
    .hero-cta-group .btn {
        width: 100%;
    }
    .section-container {
        padding: 3rem 5%;
    }
    .section-title {
        font-size: 1.6rem;
    }
    .dashboard-content {
        padding: 1.25rem;
    }
    .glass-panel {
        padding: 1.5rem;
    }
    .welcome-banner {
        padding: 1.25rem;
    }
    .top-navbar {
        padding: 0 1rem;
        height: 60px;
    }
    .top-navbar-title {
        font-size: 1rem;
    }
}

@media (max-width: 640px) {
    .navbar {
        padding: 0.85rem 1rem;
    }
    .nav-brand {
        font-size: 1.15rem;
        gap: 0.5rem;
        white-space: nowrap;
    }
    .brand-logo {
        height: 30px;
        max-width: 40px;
    }
    .sidebar-brand-box .brand-logo {
        height: 30px;
        max-width: 38px;
    }
    .sidebar-brand-title {
        font-size: 1.05rem;
    }
    .nav-links {
        display: none;
    }
    .navbar .btn {
        padding: 0.45rem 0.85rem;
        font-size: 0.825rem;
        min-height: 36px;
        white-space: nowrap;
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .form-control, select.form-control {
        font-size: 16px; 
        min-height: 44px;
    }
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        gap: 0.75rem;
    }
    .filter-bar .form-group {
        width: 100%;
        min-width: 100%;
    }
    .filter-bar .btn {
        width: 100%;
        min-height: 42px;
    }
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.75rem 0.85rem;
    }
    .nav-brand {
        font-size: 1rem;
        gap: 0.4rem;
    }
    .brand-logo {
        height: 26px;
        max-width: 34px;
    }
    .sidebar-brand-box .brand-logo {
        height: 26px;
        max-width: 32px;
    }
    .sidebar-brand-title {
        font-size: 0.95rem;
    }
    .nav-links {
        display: none;
    }
    .hero-section {
        padding: 3rem 1rem 2.5rem;
    }
    .hero-title {
        font-size: 1.7rem;
    }
    .section-container {
        padding: 2.25rem 1rem;
    }
    .section-title {
        font-size: 1.4rem;
    }
    .dashboard-content {
        padding: 0.85rem;
    }
    .glass-panel {
        padding: 1rem;
        border-radius: 10px;
    }
    .glass-card {
        padding: 1rem;
    }
    .welcome-banner {
        padding: 1rem;
    }
    .login-wrapper {
        padding: 0.75rem;
    }
    .login-card {
        padding: 1.5rem 1rem;
    }
    .top-navbar {
        padding: 0 0.75rem;
    }
    .top-navbar-title {
        font-size: 0.95rem;
    }
    .user-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    .modal-content {
        padding: 1.25rem 1rem;
    }
}
