/* ════════════════════════════════════════════════════════
   GPS Fire Arms — Custom Stylesheet
   Loaded after template CSS so these rules take precedence
   ════════════════════════════════════════════════════════ */

/* ── Base ─────────────────────────────────────────────── */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

body {
    font-family: inherit;
    color: #374151;
}

/* ── Focus states ─────────────────────────────────────── */
input[type=text]:focus,
input[type=number]:focus,
input[type=date]:focus,
input[type=email]:focus,
textarea:focus,
.form-control:focus,
.form-select:focus {
    border-color: #1a56db;
    box-shadow: 0 0 0 0.18rem rgba(26, 86, 219, 0.18);
    outline: none;
}

/* ── Form labels ──────────────────────────────────────── */
.form-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-control,
.form-select {
    font-size: 0.875rem;
    border-radius: 6px;
}

/* ── Cards ────────────────────────────────────────────── */
.card {
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.07);
}

.card-header {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

/* ── Footer ───────────────────────────────────────────── */
.footer {
    padding: 0.75rem 1.25rem;
    font-size: 0.78rem;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
}

/* ── Page header bar ──────────────────────────────────── */
.page-header-bar {
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.page-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
}

.page-subtitle {
    font-size: 0.8rem;
    color: #64748b;
}

.section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 0.75rem;
}

/* ── Stat Cards ───────────────────────────────────────── */
.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.2rem;
    border-radius: 12px;
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    border: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

.stat-card--blue  { background: linear-gradient(135deg, #1a56db 0%, #3b82f6 100%); }
.stat-card--green { background: linear-gradient(135deg, #059669 0%, #10b981 100%); }
.stat-card--amber { background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%); }
.stat-card--red   { background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%); }

.stat-card__icon {
    font-size: 2.1rem;
    opacity: 0.85;
    flex-shrink: 0;
    line-height: 1;
}

.stat-card__body { min-width: 0; }

.stat-card__value {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1;
}

.stat-card__label {
    font-size: 0.7rem;
    opacity: 0.9;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* ── Quick-action cards ───────────────────────────────── */
.quick-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 0.75rem;
    border-radius: 10px;
    border: 1.5px solid #e5e7eb;
    text-decoration: none;
    color: #374151;
    background: #fff;
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.15s, color 0.18s;
    text-align: center;
    gap: 0.4rem;
    min-height: 90px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.quick-action-card:hover {
    border-color: #1a56db;
    box-shadow: 0 4px 16px rgba(26, 86, 219, 0.15);
    transform: translateY(-2px);
    color: #1a56db;
    text-decoration: none;
}

.quick-action-card__icon {
    font-size: 1.75rem;
    line-height: 1;
}

.quick-action-card__label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── GPS Table ────────────────────────────────────────── */
.gps-table thead th {
    background-color: #1a56db;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.7rem 0.875rem;
    white-space: nowrap;
    border-color: #1246b0;
}

.gps-table tbody td {
    font-size: 0.825rem;
    padding: 0.55rem 0.875rem;
    border-color: #f0f4f8;
}

.gps-table tbody tr:hover td {
    background-color: #eff6ff;
}

.row-attention td {
    background-color: #fff5f5 !important;
}

.row-transferred {
    background-color: #198754 !important;
    color: #fff;
}

/* Edit icon button */
.btn-icon {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1a56db;
    font-size: 0.95rem;
    transition: background 0.15s, color 0.15s;
}

.btn-icon:hover {
    background: #1a56db;
    color: #fff;
    border-color: #1a56db;
}

/* Serial number monospace */
.serial-code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    background: #f1f5f9;
    padding: 1px 5px;
    border-radius: 4px;
    color: #334155;
    white-space: nowrap;
}

/* ── Status & availability badges ────────────────────── */
.gps-badge {
    display: inline-block;
    padding: 0.2em 0.6em;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 999px;
    white-space: nowrap;
}

.badge-status-ok  { background: #dcfce7; color: #15803d; }
.badge-status-bad { background: #fee2e2; color: #b91c1c; }
.badge-status-unk { background: #f1f5f9; color: #64748b; }

.badge-avail-stock    { background: #dcfce7; color: #15803d; }
.badge-avail-issued   { background: #fef9c3; color: #a16207; }
.badge-avail-missing  { background: #fee2e2; color: #b91c1c; }
.badge-avail-destroyed{ background: #f1f5f9; color: #64748b; }
.badge-avail-unk      { background: #f1f5f9; color: #94a3b8; }

/* ── Table sortable ───────────────────────────────────── */
.table-sortable th {
    cursor: pointer;
    white-space: nowrap;
}

.table-sortable .th-sort-asc::after  { content: " \25b4"; }
.table-sortable .th-sort-desc::after { content: " \25be"; }

/* ── Miscellaneous helpers ────────────────────────────── */
.txtarea {
    box-sizing: border-box;
    width: 100%;
}

.enMoney::before { content: 'GH₵'; }

.image-size {
    height: 22%;
    width: 22%;
}

.controls {
    display: flex;
    margin-left: 1%;
    margin-bottom: 1%;
    justify-content: space-between;
}

legend {
    margin-right: 0.3rem;
    margin-left: 0.3rem;
}

/* ── Loading overlays ─────────────────────────────────── */
#loading {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1000;
}

#loadingcontent {
    display: table;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
}

#loadingspinner {
    display: table-cell;
    vertical-align: middle;
    text-align: center;
    font-size: 1.1rem;
    padding-top: 80px;
}

/* ── Accordion caret ──────────────────────────────────── */
.caret {
    cursor: pointer;
    user-select: none;
}

.caret::before {
    content: "\25B6";
    color: #64748b;
    display: inline-block;
    margin-right: 6px;
}

.caret-down::before {
    transform: rotate(90deg);
}

/* ── Tab components ───────────────────────────────────── */
.tab {
    overflow: hidden;
    border: 1px solid #d1d5db;
    background-color: #1a56db;
    border-radius: 6px 6px 0 0;
}

.tab button {
    background-color: inherit;
    float: left;
    border: none;
    cursor: pointer;
    padding: 10px 16px;
    transition: background 0.2s;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
}

.tab button:hover { background-color: rgba(255, 255, 255, 0.15); color: #fff; }
.tab button.active { background-color: rgba(255, 255, 255, 0.25); color: #fff; font-weight: 600; }

.tabcontent {
    display: none;
    padding: 1rem;
    border: 1px solid #d1d5db;
    border-top: none;
}

/* ── Print styles ─────────────────────────────────────── */
@media print {
    .sidebar,
    .navbar,
    .footer,
    .btn,
    #preloader,
    #dots-loader,
    #toast-container {
        display: none !important;
    }

    .main-panel,
    .content-wrapper,
    .page-body-wrapper {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .gps-table thead th {
        background-color: #1a56db !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ── Alert placeholder ────────────────────────────────── */
#alrt {
    display: none;
    position: absolute;
    width: 30%;
    right: 0;
}
.Issued-disabled {
    pointer-events: none; /* Prevents clicks and hover effects */
    opacity: 0.5; /* Visually indicates it is inactive */
    cursor: not-allowed; /* Changes cursor to a 'prohibited' sign */
}
.Issued-enabled {
    /*background-color: #4CAF50;*/
    cursor: pointer;
    opacity: 1;
}

/* ── Sign-in page (Navy + Gold) ───────────────────────── */
:root {
    --navy:        #0d1b2a;
    --navy-light:  #1b2f45;
    --gold:        #c9a227;
    --gold-hover:  #a8861f;
    --white:       #ffffff;
    --bg:          #f0f4f8;
    --border:      #dee2e6;
    --shadow:      0 2px 12px rgba(13,27,42,.12);
    --radius:      8px;
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
}

.login-brand {
    background: linear-gradient(160deg, var(--navy) 60%, var(--navy-light));
    color: white;
    width: 42%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.login-brand img { width: 120px; margin-bottom: 1.5rem; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
.login-brand h2 { color: var(--gold); font-weight: 700; font-size: 1.4rem; margin-bottom: .5rem; }
.login-brand p { color: rgba(255,255,255,.65); font-size: .88rem; }
.login-brand .divider { width: 60px; height: 3px; background: var(--gold); margin: 1.2rem auto; border-radius: 2px; }

.login-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 2rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.5rem 2rem;
}

.login-card h4 { color: var(--navy); font-weight: 700; margin-bottom: 1.5rem; }

.login-card .btn-login {
    background: var(--navy);
    color: var(--white);
    width: 100%;
    padding: .6rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    transition: background .2s;
}

.login-card .btn-login:hover { background: var(--gold); color: var(--navy); }

@media (max-width: 768px) {
    .login-brand { display: none; }
    .login-form-panel { padding: 1rem; }
}

/* ── Save confirmation modal ──────────────────────────── */
.save-records-icon {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 999px;
    background: rgba(13, 110, 253, 0.12);
    color: #0d6efd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: inset 0 0 0 1px rgba(13, 110, 253, 0.14);
}