/* ==========================================================
   THEME VARIABLES
========================================================== */

:root{

    --primary:#0B2545;
    --primary-light:#134074;

    --accent:#D4AF37;

    --background:#F4F6F9;
    --surface:#FFFFFF;

    --border:#D8DEE6;

    --text:#1F2937;
    --text-light:#64748B;

    --success:#198754;
    --danger:#C62828;
    --warning:#F59E0B;

    --shadow:0 2px 8px rgba(0,0,0,.08);

}

/* ==========================================================
   GLOBAL RESET
========================================================== */

*,
*::before,
*::after{
    box-sizing:border-box;
}


/* ==========================================================
   APPLICATION LAYOUT
========================================================== */

html,
body{
    margin:0;
    padding:0;
    width:100%;
    height:100%;
    font-family:"Segoe UI",Tahoma,sans-serif;
    background:var(--background);
    color:var(--text);
}

body{
    overflow:hidden;
}

/* Entire ERP Application */

.gb-app{
    display:flex;
    flex-direction:column;
    height:100vh;
}

/* Layout below Top Bar + Header */

.gb-wrapper{
    flex:1;
    display:flex;
    overflow:hidden;
    min-height:0;
}


/* ==========================================================
   MAIN CONTENT
========================================================== */

.gb-main-content{
    flex:1;
    min-width:0;
    min-height:0;              /* ADD THIS */
    padding:24px;
    background:var(--background);
    overflow-y:auto;
    overflow-x:hidden;
}

/* ==========================================================
   COMMON CARD
========================================================== */

.gb-card{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:10px;
    padding:20px;
    box-shadow:var(--shadow);
    margin-bottom:20px;
}



/* Dashboard spacing */

.page-title{
    margin-bottom:18px;
}

.page-title h2{
    color:#0B2545;
    margin-bottom:4px;
}

.page-title p{
    color:#64748B;
    font-size:14px;
}

/* ==========================================================
   TOP BAR
========================================================== */

.gb-topbar{
    height:34px;
    background:#041E42;
    color:#FFFFFF;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:0 20px;
    font-size:12px;
    font-weight:500;
}

/* ==========================================================
   HEADER
========================================================== */

.gb-header{
    height:78px;
	min-height:78px;
    background:var(--primary);
    color:#FFFFFF;

    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:0 20px;

    border-bottom:3px solid var(--accent);
    flex-shrink:0;
}

.gb-brand{
    display:flex;
    align-items:center;
    gap:15px;
}

.gb-logo{
    width:54px;
    height:54px;
    border-radius:50%;
    background:var(--accent);
    color:#000;
    display:flex;
    justify-content:center;
    align-items:center;
    font-size:20px;
    font-weight:bold;
}

.gb-brand-text h1{
    font-size:30px;
    color:#FFF;
    margin:0;
    line-height:1.2;
}

.gb-brand-text p{
    margin-top:4px;
    color:#D9E4F5;
    font-size:13px;
}

.gb-header-right{
    display:flex;
    align-items:center;
    gap:15px;
}

.gb-user-info{
    text-align:right;
}

.gb-user-info h4{
    margin:0;
    font-size:14px;
    color:#FFF;
}

.gb-user-info span{
    font-size:12px;
    color:#FFD54F;
}

.logout-btn{
    background:#DC2626;
    color:#FFF;
    padding:8px 16px;
    border-radius:6px;
    text-decoration:none;
    font-weight:600;
}

.logout-btn:hover{
    background:#B91C1C;
}

/* ==========================================================
   SIDEBAR
========================================================== */

.gb-sidebar{
    width:240px;
    background:#102542;
    color:#FFFFFF;

    display:flex;
    flex-direction:column;

    flex-shrink:0;
    overflow-y:auto;
	height:100%;
}

.gb-sidebar-title{
    padding:18px 20px 12px;
    color:#AFC5E5;
    font-size:11px;
    letter-spacing:1px;
    text-transform:uppercase;
    border-bottom:1px solid rgba(255,255,255,.08);
}

.gb-sidebar-menu{
    display:flex;
    flex-direction:column;
    padding:10px 0;
	cursor:pointer;
}

.gb-sidebar-menu a{
    display:flex;
    align-items:center;
    gap:12px;

    color:#FFFFFF;
    text-decoration:none;

    padding:13px 20px;

    font-size:14px;
    border-left:4px solid transparent;

    transition:all .2s ease;
}

.gb-sidebar-menu a span{
    width:20px;
    text-align:center;
}

.gb-sidebar-menu a:hover{
    background:#1C355E;
    border-left-color:var(--accent);
}

.gb-sidebar-menu a.active{
    background:#1C355E;
    border-left-color:var(--accent);
    color:#FFD54F;
    font-weight:600;
}
/* ==========================================================
   DASHBOARD
========================================================== */

.dashboard-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:20px;
    margin:20px 0;
}

.dashboard-card{
    background:var(--surface);
    border:1px solid var(--border);
    border-left:5px solid var(--accent);
    border-radius:10px;
    padding:20px;
    box-shadow:var(--shadow);
}

.dashboard-card h3{
    color:#64748B;
    font-size:15px;
    margin-bottom:12px;
}

.dashboard-card h1{
    font-size:34px;
    color:var(--primary);
    margin-bottom:6px;
}

.dashboard-card p{
    color:#6B7280;
    font-size:13px;
}

/* ==========================================================
   FOOTER
========================================================== */

.gb-footer{
    background:var(--primary);
    color:#FFFFFF;
    border-top:3px solid var(--accent);
    padding:14px 25px;
    flex-shrink:0;
    min-height:58px;        /* ADD */
}

.gb-footer-container{
    display:grid;
    grid-template-columns:1fr 1fr 1fr;
    align-items:center;
    gap:20px;
}

.gb-footer-left,
.gb-footer-center,
.gb-footer-right{
    font-size:13px;
    line-height:1.6;
}

.gb-footer-left strong{
    color:#FFD54F;
}

.gb-footer-center{
    text-align:center;
}

.gb-footer-right{
    text-align:right;
}

/* ==========================================================
   MOBILE LAYOUT
========================================================== */

@media (max-width:992px){

    body{
        overflow:auto;
    }

    .gb-wrapper{
        flex-direction:column;
        overflow:visible;
    }

    .gb-sidebar{
    width:100%;
    flex-direction:row;
    flex-wrap:wrap;
    overflow:visible;
}

    .gb-main-content{
        padding:15px;
    }

    .gb-header{
        height:auto;
        flex-direction:column;
        align-items:flex-start;
        gap:12px;
        padding:15px;
    }

    .gb-header-right{
        width:100%;
        justify-content:space-between;
    }

    .dashboard-grid{
        grid-template-columns:1fr;
    }

    .gb-footer-container{
        grid-template-columns:1fr;
        gap:12px;
    }

    .gb-footer-left,
    .gb-footer-center,
    .gb-footer-right{
        text-align:center;
    }

}

/* ==========================================================
   REGISTRATION DASHBOARD
========================================================== */

.registration-card{
    display:flex;
    align-items:center;
    gap:18px;

    background:#FFFFFF;
    border:1px solid var(--border);
    border-left:5px solid var(--accent);

    border-radius:10px;
    padding:18px;

    text-decoration:none;
    color:var(--text);

    transition:.25s ease;
    box-shadow:var(--shadow);
}

.registration-card:hover{
    transform:translateY(-3px);
    border-left-color:var(--primary);
    box-shadow:0 6px 16px rgba(0,0,0,.12);
}

.registration-icon{
    width:60px;
    height:60px;

    border-radius:50%;
    background:#FFF7E0;

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:28px;
    flex-shrink:0;
}

.registration-card h4{
    margin:0 0 6px;
    color:var(--primary);
    font-size:16px;
}

.registration-card p{
    margin:0;
    color:var(--text-light);
    font-size:13px;
    line-height:1.4;
}

/* Status Badges */

.badge-success,
.badge-warning,
.badge-danger{
    display:inline-block;
    padding:4px 10px;
    border-radius:20px;
    font-size:12px;
    font-weight:600;
    color:#FFFFFF;
}

.badge-success{
    background:#198754;
}

.badge-warning{
    background:#F59E0B;
}

.badge-danger{
    background:#C62828;
}

/* Small Action Button */

.btn-small{
    display:inline-block;
    padding:6px 12px;
    border-radius:6px;
    text-decoration:none;
    font-size:13px;
    font-weight:600;
}

.btn-primary{
    background:var(--primary);
    color:#FFFFFF;
}

.btn-primary:hover{
    background:var(--primary-light);
}

/* ==========================================================
   MASTERS DASHBOARD
========================================================== */

.master-card{
    display:flex;
    align-items:center;
    gap:18px;

    background:#FFFFFF;
    border:1px solid var(--border);
    border-left:5px solid var(--accent);

    border-radius:10px;
    padding:18px;

    text-decoration:none;
    color:var(--text);

    transition:.25s ease;
    box-shadow:var(--shadow);
}

.master-card:hover{
    transform:translateY(-3px);
    border-left-color:var(--primary);
    box-shadow:0 8px 18px rgba(0,0,0,.12);
}

.master-icon{
    width:60px;
    height:60px;
    border-radius:50%;
    background:#FFF7E0;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:28px;
    flex-shrink:0;
}

.master-card h4{
    margin:0 0 5px;
    color:var(--primary);
    font-size:16px;
}

.master-card p{
    margin:0;
    color:var(--text-light);
    font-size:13px;
}

/* ==========================================================
   COMMON PAGE UTILITIES
========================================================== */

.mt-20{
    margin-top:20px;
}

.text-center{
    text-align:center;
}

/* ==========================================================
   FILTER BAR
========================================================== */

.filter-bar{
    display:flex;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
}

.filter-bar .gb-input{
    width:280px;
}

.filter-bar .gb-select{
    width:180px;
}

/* ==========================================================
   FORM CONTROLS
========================================================== */

.gb-input,
.gb-select{
    height:42px;
    padding:0 12px;
    border:1px solid var(--border);
    border-radius:6px;
    background:#FFFFFF;
    font-size:14px;
    color:var(--text);
}

.gb-input:focus,
.gb-select:focus{
    outline:none;
    border-color:var(--primary-light);
    box-shadow:0 0 0 2px rgba(19,64,116,.15);
}

/* ==========================================================
   BUTTONS
========================================================== */

.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;

    padding:10px 16px;
    border-radius:6px;
    text-decoration:none;
    border:none;
    cursor:pointer;

    font-size:14px;
    font-weight:600;
    transition:.2s;
}

.btn-primary{
    background:var(--primary);
    color:#FFFFFF;
}

.btn-primary:hover{
    background:var(--primary-light);
}

.btn-success{
    background:var(--success);
    color:#FFFFFF;
}

.btn-success:hover{
    background:#157347;
}

.btn-secondary{
    background:#E5E7EB;
    color:#374151;
}

.btn-secondary:hover{
    background:#D1D5DB;
}

.btn-sm{
    padding:6px 12px;
    font-size:13px;
}

/* ==========================================================
   TABLE
========================================================== */

.gb-table{
    width:100%;
    border-collapse:collapse;
    background:#FFFFFF;
}

.gb-table thead th{
    background:#EEF3F8;
    color:#0B2545;

    padding:12px 10px;

    text-align:left;
    font-size:14px;
    font-weight:600;

    border-bottom:2px solid var(--border);
}

.gb-table tbody td{
    padding:12px 10px;
    border-bottom:1px solid #EDF2F7;
    font-size:14px;
    color:#374151;
}

.gb-table tbody tr:hover{
    background:#F8FAFC;
}

/* ==========================================================
   STATUS BADGES
========================================================== */

.badge-success{
    display:inline-block;
    padding:4px 10px;
    border-radius:20px;

    background:#DCFCE7;
    color:#166534;

    font-size:12px;
    font-weight:600;
}

.badge-danger{
    display:inline-block;
    padding:4px 10px;
    border-radius:20px;

    background:#FEE2E2;
    color:#B91C1C;

    font-size:12px;
    font-weight:600;
}

/* ==========================================================
   PAGINATION
========================================================== */

.pagination{
    display:flex;
    justify-content:center;
    gap:8px;
    margin-top:20px;
}

.pagination a{
    min-width:38px;
    height:38px;

    display:flex;
    align-items:center;
    justify-content:center;

    text-decoration:none;

    border:1px solid var(--border);
    border-radius:6px;

    color:var(--primary);
    background:#FFFFFF;
    font-weight:600;
}

.pagination a:hover{
    background:#EEF3F8;
}

.pagination a.active{
    background:var(--primary);
    color:#FFFFFF;
    border-color:var(--primary);
}

/* ==========================================================
   FORM GRID
========================================================== */

.gb-form-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:18px;
    margin-top:15px;
}

.gb-form-group{
    display:flex;
    flex-direction:column;
}

.gb-form-group label{
    margin-bottom:6px;
    font-size:13px;
    font-weight:600;
    color:#334155;
}

.gb-form-group.full-width{
    grid-column:1 / -1;
}

.required{
    color:#DC2626;
}

.gb-divider{
    margin:25px 0;
    border:none;
    border-top:1px solid var(--border);
}

.gb-form-actions{
    display:flex;
    gap:12px;
    justify-content:flex-end;
}

.gb-table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    font-size: 13px;
    color: #4b5563;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    flex-wrap: wrap;
    gap: 15px;
}

.table-rows-per-page {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-rows-per-page .gb-select {
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    font-size: 13px;
    color: #212529;
}

.table-pagination {
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-page {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    border-radius: 4px;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-page:hover:not(.disabled):not(.active) {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.btn-page.active {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
    font-weight: 600;
}

.btn-page.disabled {
    color: #9ca3af;
    background: #f9fafb;
    border-color: #e5e7eb;
    cursor: not-allowed;
}

.table-record-info {
    font-size: 13px;
    color: #4b5563;
}


