﻿/* =====================================================
   CORE VARIABLES (LIGHT THEME)
===================================================== */
:root {
    --bg-main: #ffffff;
    --bg-soft: #f8f9fa;
    --bg-muted: #f1f3f5;
    --text-main: #212529;
    --text-muted: #6c757d;
    --accent: #ff9933;
    --accent-soft: rgba(255,153,51,.15);
    --border: #dee2e6;
    --radius-sm: 6px;
    --radius-md: 10px;
}

/* =====================================================
   DARK THEME (Bootstrap-native)
===================================================== */
[data-bs-theme="dark"] {
    --bg-main: #181a1b;
    --bg-soft: #1f2223;
    --bg-muted: #2a2e30;
    --text-main: #f1f1f1;
    --text-muted: #adb5bd;
    --accent: #ffb366;
    --accent-soft: rgba(255,179,102,.2);
    --border: #2f3336;
}

/* =====================================================
   GLOBAL BASE
===================================================== */
body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-soft);
    color: var(--text-main);
}

a {
    text-decoration: none;
}

/* =====================================================
   NAVBAR (QUIET, ADMIN-FOCUSED)
===================================================== */
.admin-navbar {
    background: var(--bg-main);
    border-bottom: 1px solid var(--border);
}

.navbar-brand {
    font-weight: 600;
    color: var(--text-main) !important;
}

.navbar-nav .nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    padding: .45rem .75rem;
    border-radius: var(--radius-sm);
    transition: background .15s ease, color .15s ease;
}

    .navbar-nav .nav-link:hover {
        color: var(--text-main) !important;
        background: var(--bg-muted);
    }

    /* ACTIVE STATE – STRONG & CLEAR */
    .navbar-nav .nav-link.active {
        color: var(--accent) !important;
        font-weight: 600;
        background: var(--accent-soft);
    }

/* Dropdown */
.dropdown-menu {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: .5rem;
}

.dropdown-item {
    border-radius: var(--radius-sm);
    padding: .45rem .6rem;
}

    .dropdown-item:hover {
        background: var(--bg-muted);
    }

/* Icons in navbar */
.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px;
    transition: color .15s ease;
}

    .icon-btn:hover {
        color: var(--accent);
    }

/* =====================================================
   CONTENT LAYOUT
===================================================== */
.content-wrapper {
    padding: 90px 24px 24px;
    min-height: calc(100vh - 60px);
}

/* =====================================================
   CARDS (SUBTLE, DATA-FIRST)
===================================================== */
.card {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: none;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.card:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

/* =====================================================
   TABLES (ADMIN-GRADE)
===================================================== */
.table {
    background: var(--bg-main);
    color: var(--text-main);
    border-color: var(--border);
}

    .table thead th {
        background: var(--bg-soft);
        color: var(--text-main);
        font-weight: 600;
        position: sticky;
        top: 0;
        z-index: 1;
    }

.table-hover tbody tr:hover {
    background: var(--accent-soft);
}

/* =====================================================
   BUTTONS
===================================================== */
.btn-primary {
    background: var(--accent);
    border: none;
    color: #fff;
}

    .btn-primary:hover {
        background: #e68626;
    }

/* =====================================================
   ALERTS (FAST RECOGNITION)
===================================================== */
.alert {
    border-radius: var(--radius-md);
    border-left: 4px solid;
}

.alert-success {
    border-color: #198754;
}

.alert-danger {
    border-color: #dc3545;
}

.alert-warning {
    border-color: #ffc107;
}

/* =====================================================
   EMPTY STATE (REUSABLE)
===================================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

    .empty-state i {
        font-size: 2.5rem;
        margin-bottom: 12px;
    }

/* =====================================================
   LOADING STATE (GLOBAL)
===================================================== */
.app-loader {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.25);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

    .app-loader .spinner-border {
        width: 3rem;
        height: 3rem;
        color: var(--accent);
    }

/* =====================================================
   FOOTER
===================================================== */
footer {
    background: var(--bg-main);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: .85rem;
    text-align: center;
    padding: 12px 0;
}
/* =====================================================
   LOGIN PAGE (ISOLATED & CLEAN)
===================================================== */

.login-page {
    min-height: 100vh;
    background: url('../Images/NMCBG.jpg') center / cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

    .login-page::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,.55);
    }

.login-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    width: 900px;
    max-width: 95%;
    border-radius: 18px;
    overflow: hidden;
    background: var(--bg-main);
    box-shadow: 0 25px 70px rgba(0,0,0,.4);
}

/* LEFT INFO PANEL */
.login-info {
    flex: 1;
    padding: 48px 40px;
    background: linear-gradient( 180deg, rgba(0,0,0,.65), rgba(0,0,0,.85) );
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    .login-info h1 {
        font-size: 2.2rem;
        font-weight: 700;
    }

    .login-info h5 {
        font-size: 1.05rem;
        opacity: .85;
        margin-bottom: 1.5rem;
    }

    .login-info .details {
        font-family: monospace;
        font-size: .95rem;
        opacity: .9;
        line-height: 1.6;
    }

    .login-info .tip {
        margin-top: 1.5rem;
        font-size: .9rem;
        color: var(--accent);
    }

/* RIGHT FORM PANEL */
.login-form {
    flex: 1;
    padding: 56px 44px;
    background: var(--bg-main);
}

    .login-form h2 {
        font-weight: 700;
    }

    .login-form h6 {
        color: var(--text-muted);
        margin-bottom: 1.5rem;
    }

    .login-form .form-control {
        border-radius: var(--radius-md);
        background: var(--bg-soft);
        border: 1px solid var(--border);
    }

        .login-form .form-control:focus {
            box-shadow: 0 0 0 2px var(--accent-soft);
            border-color: var(--accent);
        }

/* LOGIN BUTTON */
.btn-login {
    background: var(--accent);
    border: none;
    color: #fff;
    border-radius: var(--radius-md);
    padding: 12px;
    font-weight: 600;
}

    .btn-login:hover {
        background: #e68626;
    }

/* THEME TOGGLE */
.theme-toggle {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    z-index: 3;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
    }

    .login-info {
        display: none;
    }
}
