/* ==========================================================
   GOLDENBILL HANDLOOM ERP - MASTER THEME & LAYOUT
========================================================== */

:root {
    --primary: #0B2545;
    --primary-light: #134074;
    --accent: #D4AF37;
    --accent-hover: #FFD54F;
    --background: #F4F6F9;
    --surface: #FFFFFF;
    --border: #D8DEE6;
    --text: #1F2937;
    --text-light: #64748B;
    --success: #198754;
    --danger: #DC2626;
    --warning: #F59E0B;
    --shadow: 0 2px 8px rgba(0, 0, 0, .06);
    --sidebar-width: 260px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--background);
    color: var(--text);
    overflow: hidden; /* Desktop keeps layout intact */
}

/* Base App Shell */
.gb-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Layout Wrapper below Header */
.gb-wrapper {
    display: flex;
    flex-direction: row;
    flex: 1;
    min-height: 0;
    width: 100%;
    overflow: hidden;
    position: relative;
}

/* ==========================================================
   HEADER
========================================================== */
.gb-header {
    height: 60px;
    min-height: 60px;
    background: var(--primary);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 3px solid var(--accent);
    z-index: 1020;
    flex-shrink: 0;
}

.gb-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gb-hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 7px 6px;
    cursor: pointer;
    flex-shrink: 0;
}

.gb-hamburger-btn span {
    width: 100%;
    height: 2px;
    background: #FFFFFF;
    border-radius: 2px;
}

.gb-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gb-logo {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: #0B2545;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    font-weight: 800;
}

.gb-brand-text h1 {
    font-size: 18px;
    color: #FFFFFF;
    margin: 0;
    font-weight: 800;
    line-height: 1.1;
}

.gb-brand-text p {
    margin: 2px 0 0 0;
    color: #CBD5E1;
    font-size: 11px;
}

.gb-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gb-user-info {
    text-align: right;
}

.gb-user-info h4 {
    margin: 0;
    font-size: 13.5px;
    color: #FFFFFF;
    font-weight: 600;
}

.gb-user-info span {
    font-size: 11.5px;
    color: var(--accent-hover);
}

.logout-btn {
    background: var(--danger);
    color: #FFFFFF;
    padding: 7px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    transition: background 0.15s ease;
}

.logout-btn:hover {
    background: #B91C1C;
}

/* ==========================================================
   MAIN CONTENT AREA
========================================================== */
.gb-main-content {
    flex: 1;
    min-width: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 20px 40px;
    background: var(--background);
}

.gb-main-content > *:first-child {
    margin-top: 0 !important;
}

.gb-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    width: 100%;
}

/* ==========================================================
   FOOTER
========================================================== */
.gb-footer {
    background: var(--primary);
    color: #FFFFFF;
    border-top: 2px solid var(--accent);
    padding: 8px 20px;
    flex-shrink: 0;
    min-height: 38px;
}

.gb-footer-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    color: #CBD5E1;
}

.gb-footer-left strong {
    color: var(--accent-hover);
}

/* ==========================================================
   MOBILE MEDIA QUERY (< 992px)
========================================================== */
@media (max-width: 991px) {
    body {
        overflow-y: auto;
    }
    
    .gb-hamburger-btn {
        display: flex;
    }

    .gb-user-info {
        display: none;
    }

    .gb-footer-container {
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }

    .gb-main-content {
        padding: 12px 10px 40px;
    }
}