/* ============================================================
   GunneryPH Theme — bright, soft, elegant, modern gun-store look.
   Built on Bootstrap 5. Palette drawn from the logo:
   gunmetal charcoal + brass/bullet-belt gold accent on bright white.
   Fonts: Oswald (tactical headings) + Inter (clean body).
   ============================================================ */

:root {
    /* Brand palette */
    --gph-bg:          #F5F6F8;   /* soft page background */
    --gph-surface:     #FFFFFF;   /* cards / panels */
    --gph-charcoal:    #23272B;   /* gunmetal — sidebar / headings */
    --gph-charcoal-2:  #2E343A;
    --gph-brass:       #C9A227;   /* signature accent (bullet belt) */
    --gph-brass-dark:  #A8851C;
    --gph-brass-soft:  #FBF4DD;   /* tint backgrounds */
    --gph-steel:       #6B7280;   /* muted text */
    --gph-line:        #E7E9ED;   /* hairline borders */
    --gph-text:        #1F2329;
    --gph-success:     #2FA37C;
    --gph-danger:      #D9534F;
    --gph-warning:     #E0A106;
    --gph-info:        #3B82A0;

    /* Bootstrap variable overrides */
    --bs-primary:      #C9A227;
    --bs-primary-rgb:  201, 162, 39;
    --bs-body-bg:      var(--gph-bg);
    --bs-body-color:   var(--gph-text);
    --bs-border-color: var(--gph-line);
    --bs-border-radius:        .65rem;
    --bs-border-radius-sm:     .5rem;
    --bs-border-radius-lg:     .9rem;
    --bs-link-color:        var(--gph-brass-dark);
    --bs-link-hover-color:  var(--gph-brass);
    --bs-font-sans-serif: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    --gph-shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .05);
    --gph-shadow:    0 2px 6px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
    --gph-shadow-lg: 0 12px 32px rgba(16, 24, 40, .12);
}

html, body {
    background: var(--gph-bg);
    color: var(--gph-text);
    font-family: var(--bs-font-sans-serif);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .gph-heading {
    font-family: 'Oswald', 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: .2px;
    color: var(--gph-charcoal);
}

/* ---------- App shell: sidebar + topbar ---------- */
.gph-app { display: flex; min-height: 100vh; }

.gph-sidebar {
    width: 248px;
    flex: 0 0 248px;
    background: linear-gradient(180deg, var(--gph-charcoal) 0%, var(--gph-charcoal-2) 100%);
    color: #D8DCE1;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.gph-brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.gph-brand img { height: 40px; width: auto; }
.gph-brand .gph-brand-name {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
    letter-spacing: .5px;
    line-height: 1;
}
.gph-brand .gph-brand-sub { font-size: .68rem; color: var(--gph-brass); letter-spacing: 1.5px; text-transform: uppercase; }

.gph-nav { padding: .75rem .6rem; overflow-y: auto; flex: 1; }
.gph-nav .gph-nav-section { font-size: .68rem; text-transform: uppercase; letter-spacing: 1.2px; color: #7A8089; padding: .9rem .75rem .35rem; }
.gph-nav a {
    display: flex; align-items: center; gap: .7rem;
    padding: .55rem .75rem; margin: .12rem 0;
    border-radius: .55rem;
    color: #C4C9D0; text-decoration: none; font-weight: 500; font-size: .9rem;
    transition: background .15s ease, color .15s ease;
}
.gph-nav a i { font-size: 1.05rem; width: 1.25rem; text-align: center; color: #9AA1AA; transition: color .15s ease; }
.gph-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.gph-nav a:hover i { color: var(--gph-brass); }
.gph-nav a.active {
    background: linear-gradient(90deg, rgba(201, 162, 39, .18), rgba(201, 162, 39, .04));
    color: #fff;
    box-shadow: inset 3px 0 0 var(--gph-brass);
}
.gph-nav a.active i { color: var(--gph-brass); }

.gph-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.gph-topbar {
    height: 62px;
    background: var(--gph-surface);
    border-bottom: 1px solid var(--gph-line);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky; top: 0; z-index: 20;
}
.gph-topbar .gph-page-title { font-family: 'Oswald', sans-serif; font-size: 1.15rem; font-weight: 600; color: var(--gph-charcoal); margin: 0; }
.gph-content { padding: 1.5rem; flex: 1; }

.gph-user {
    display: flex; align-items: center; gap: .6rem;
    padding: .3rem .3rem .3rem .75rem; border-radius: 2rem;
    border: 1px solid var(--gph-line); background: #fff;
}
.gph-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--gph-brass-soft); color: var(--gph-brass-dark);
    display: grid; place-items: center; font-weight: 700; font-family: 'Oswald', sans-serif;
}

/* ---------- Cards ---------- */
.card {
    background: var(--gph-surface);
    border: 1px solid var(--gph-line);
    border-radius: var(--bs-border-radius-lg);
    box-shadow: var(--gph-shadow-sm);
    transition: box-shadow .18s ease, transform .18s ease;
}
.card:hover { box-shadow: var(--gph-shadow); }
.card .card-header { background: transparent; border-bottom: 1px solid var(--gph-line); font-weight: 600; font-family: 'Oswald', sans-serif; }

.gph-stat { position: relative; overflow: hidden; }
.gph-stat .gph-stat-label { color: var(--gph-steel); font-size: .78rem; text-transform: uppercase; letter-spacing: .6px; font-weight: 600; }
.gph-stat .gph-stat-value { font-family: 'Oswald', sans-serif; font-size: 1.9rem; font-weight: 700; color: var(--gph-charcoal); line-height: 1.1; }
.gph-stat .gph-stat-icon {
    width: 46px; height: 46px; border-radius: .8rem; display: grid; place-items: center; font-size: 1.4rem;
    background: var(--gph-brass-soft); color: var(--gph-brass-dark);
}
.gph-stat.gph-accent-line::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--gph-brass); }

/* ---------- Buttons ---------- */
.btn { border-radius: .55rem; font-weight: 600; letter-spacing: .2px; }
.btn-sm { font-size: .82rem; }
.btn-primary {
    --bs-btn-bg: var(--gph-brass); --bs-btn-border-color: var(--gph-brass);
    --bs-btn-hover-bg: var(--gph-brass-dark); --bs-btn-hover-border-color: var(--gph-brass-dark);
    --bs-btn-active-bg: var(--gph-brass-dark); --bs-btn-active-border-color: var(--gph-brass-dark);
    --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff;
    --bs-btn-disabled-bg: var(--gph-brass); --bs-btn-disabled-border-color: var(--gph-brass);
}
.btn-outline-primary {
    --bs-btn-color: var(--gph-brass-dark); --bs-btn-border-color: var(--gph-brass);
    --bs-btn-hover-bg: var(--gph-brass); --bs-btn-hover-border-color: var(--gph-brass); --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--gph-brass-dark); --bs-btn-active-border-color: var(--gph-brass-dark);
}
.btn-dark {
    --bs-btn-bg: var(--gph-charcoal); --bs-btn-border-color: var(--gph-charcoal);
    --bs-btn-hover-bg: var(--gph-charcoal-2); --bs-btn-hover-border-color: var(--gph-charcoal-2);
}

/* ---------- Badges / pills ---------- */
.badge { font-weight: 600; letter-spacing: .3px; padding: .4em .7em; border-radius: 2rem; }
.gph-badge-soft { background: var(--gph-brass-soft); color: var(--gph-brass-dark); }
.gph-badge-success { background: #E5F4EE; color: var(--gph-success); }
.gph-badge-danger  { background: #FBE9E8; color: var(--gph-danger); }
.gph-badge-muted   { background: #EEF0F3; color: var(--gph-steel); }
.gph-badge-warning { background: #FFF3CD; color: #856404; }

/* ---------- Tables (compact, elegant) ---------- */
.table { --bs-table-bg: transparent; margin: 0; }
.table > thead th {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .6px;
    color: var(--gph-steel); font-weight: 700; border-bottom: 1px solid var(--gph-line);
    padding: .6rem .85rem;
}
.table > tbody td { padding: .6rem .85rem; vertical-align: middle; border-bottom: 1px solid var(--gph-line); }
.table-hover > tbody > tr:hover > * { background: var(--gph-brass-soft); }

/* ---------- Forms (small, soft) ---------- */
.form-control, .form-select {
    border-radius: .55rem; border: 1px solid var(--gph-line); font-size: .9rem; padding: .45rem .7rem;
    background: #fff;
}
.form-control:focus, .form-select:focus {
    border-color: var(--gph-brass);
    box-shadow: 0 0 0 .2rem rgba(201, 162, 39, .18);
}
.form-label { font-weight: 600; font-size: .82rem; color: var(--gph-charcoal); margin-bottom: .3rem; }

/* ---------- Progress ---------- */
.progress { height: .55rem; border-radius: 2rem; background: #ECEEF1; }
.progress-bar { background: var(--gph-brass); border-radius: 2rem; }
.progress-bar.bg-charcoal { background: var(--gph-charcoal) !important; }

/* ---------- Modals ---------- */
.modal-content { border: none; border-radius: var(--bs-border-radius-lg); box-shadow: var(--gph-shadow-lg); }
.modal-header { border-bottom: 1px solid var(--gph-line); }
.modal-header .modal-title { font-family: 'Oswald', sans-serif; }
.modal-footer { border-top: 1px solid var(--gph-line); }

/* ---------- Loading indicators ---------- */
.gph-spinner { color: var(--gph-brass); }
.gph-overlay {
    position: absolute; inset: 0; background: rgba(255, 255, 255, .65);
    display: grid; place-items: center; border-radius: inherit; z-index: 5;
}
.gph-skeleton {
    background: linear-gradient(90deg, #EEF0F3 25%, #F6F7F9 37%, #EEF0F3 63%);
    background-size: 400% 100%; animation: gph-shimmer 1.4s ease infinite; border-radius: .5rem;
}
@keyframes gph-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- Misc ---------- */
.text-brass { color: var(--gph-brass-dark) !important; }
.bg-brass-soft { background: var(--gph-brass-soft) !important; }
.gph-divider { height: 1px; background: var(--gph-line); margin: 1rem 0; }

@media (max-width: 768px) {
    .gph-sidebar { position: fixed; left: -260px; z-index: 1050; transition: left .2s ease; }
    .gph-sidebar.open { left: 0; }
    .gph-content { padding: 1rem; }
}

/* ---------- Login / auth screen ---------- */
.gph-auth-bg {
    min-height: 100vh;
    display: grid; place-items: center;
    padding: 1.5rem;
    background: radial-gradient(1100px 560px at 50% -15%, #313840 0%, #23272B 55%, #191C1F 100%);
}
.gph-login-card {
    width: 100%; max-width: 388px;
    padding: 2.25rem 1.9rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, .06);
    box-shadow: var(--gph-shadow-lg);
}
.gph-login-card .input-group-text { border: 1px solid var(--gph-line); border-right: 0; border-radius: .55rem 0 0 .55rem; }
.gph-login-card .input-group .form-control { border-left: 0; }
