/* =====================================
   PREVIX - GLOBAL DESIGN SYSTEM
   Orange + White Premium Theme
===================================== */

@import url('https://fonts.googleapis.com/css2?family=Hind:wght@400;500;600;700&family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #F47721;
    --primary-dark: #DF620F;
    --primary-light: #FFF0E4;

    --white: #FFFFFF;
    --background: #F7F8FA;
    --surface: #FFFFFF;

    --text: #172033;
    --muted: #718096;
    --border: #E5E7EB;

    --success: #16A34A;
    --success-light: #DCFCE7;

    --danger: #DC2626;
    --danger-light: #FEE2E2;

    --warning: #D97706;
    --warning-light: #FEF3C7;

    --sidebar-width: 255px;
    --header-height: 72px;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --shadow:
        0 4px 18px rgba(0, 0, 0, 0.06);

    --transition: 0.25s ease;
}

/* RESET */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', 'Hind', sans-serif;
    background: var(--background);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

/* COMMON CONTAINER */

.container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px;
}

.page-content {
    width: 100%;
    min-width: 0;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
}

.page-subtitle {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 22px;
}

/* BUTTONS */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    min-height: 42px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--white);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

/* CARDS */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
}

/* FORM FIELDS */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.form-control {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text);
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(244, 119, 33, 0.12);
}

.form-control::placeholder {
    color: #A0AEC0;
}

/* STATUS BADGES */

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.status-pending {
    background: var(--warning-light);
    color: var(--warning);
}

.status-complete {
    background: var(--success-light);
    color: var(--success);
}

.status-over {
    background: var(--danger-light);
    color: var(--danger);
}

/* TABLE */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

th {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
    padding: 13px;
    text-align: left;
}

td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

tbody tr:hover {
    background: var(--primary-light);
}

/* HEADER */

.main-header {
    height: var(--header-height);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    font-size: 22px;
    font-weight: 800;
}

.brand img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 25px;
    color: var(--text);
}

/* DASHBOARD LAYOUT */

.app-layout {
    display: flex;
    min-height: calc(100vh - var(--header-height));
}

.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: linear-gradient(
        180deg,
        var(--primary),
        var(--primary-dark)
    );
    color: var(--white);
    padding: 22px 14px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 9px;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(120, 50, 0, 0.25);
}

.main-content {
    flex: 1;
    min-width: 0;
    padding: 25px;
}

/* DASHBOARD GRID */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

/* MOBILE BOTTOM NAV */

.bottom-nav {
    display: none;
}

/* OVERLAY */

.menu-overlay {
    display: none;
}

/* RESPONSIVE */

@media (max-width: 992px) {

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar {
        width: 220px;
    }
}

@media (max-width: 768px) {

    :root {
        --header-height: 62px;
    }

    .container {
        padding: 14px;
    }

    .main-header {
        padding: 0 15px;
    }

    .brand {
        font-size: 19px;
    }

    .brand img {
        width: 32px;
        height: 32px;
    }

    .menu-toggle {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        bottom: 0;
        width: 260px;
        z-index: 300;
        transition: var(--transition);
        overflow-y: auto;
    }

    .sidebar.open {
        left: 0;
    }

    .menu-overlay.show {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 250;
    }

    .main-content {
        width: 100%;
        padding: 16px 12px 85px;
    }

    .page-title {
        font-size: 20px;
    }

    .stats-grid {
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
    }

    .card {
        padding: 14px;
    }

    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 65px;
        background: var(--white);
        border-top: 1px solid var(--border);
        align-items: center;
        justify-content: space-around;
        z-index: 200;
        box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.05);
    }

    .bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        font-size: 10px;
        color: var(--muted);
    }

    .bottom-nav a.active {
        color: var(--primary);
        font-weight: 700;
    }

    .bottom-nav i {
        font-size: 19px;
    }
}

@media (max-width: 380px) {

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .page-title {
        font-size: 18px;
    }

    .btn {
        padding: 10px 13px;
    }
}




/* =========================================
   PREVIX - FIXED HEADER & SIDEBAR
   Desktop / Laptop Layout
========================================= */

@media (min-width: 769px) {

    html,
    body {
        height: 100%;
        overflow: hidden;
    }

    /* Fixed Header */
    .main-header {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 65px;
        min-height: 65px;
        z-index: 1000;
        background: #ffffff;
    }

    /* App Layout */
    .app-layout {
        display: block !important;
        margin-top: 65px !important;
        height: calc(100vh - 65px);
        min-height: 0;
        overflow: hidden;
    }

    /* Fixed Sidebar */
    .sidebar {
        position: fixed !important;
        top: 65px;
        left: 0;
        bottom: 0;
        width: 250px;
        height: calc(100vh - 65px);
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 900;
    }

    /* Only Main Content Scrolls */
    .main-content {
        margin-left: 250px !important;
        width: calc(100% - 250px);
        height: calc(100vh - 65px);
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    /* Smooth Scrolling */
    .main-content {
        scroll-behavior: smooth;
    }

}
