/* ===============================
   LAWICARS MAIN STYLE.CSS
   Mobile-Friendly Dashboard Fix
================================ */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    background: #f3f6fb;
    color: #0b1220;
    font-family: Arial, Helvetica, sans-serif;
}

/* ===============================
   TOP BAR
================================ */

.topbar {
    background: linear-gradient(135deg, #071a33, #003b73);
    color: #fff;
    padding: 16px;
    display: flex;
    gap: 15px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.brand a {
    color: #ffd700;
    font-size: 28px;
    font-weight: 900;
    text-decoration: none;
}

.brand span {
    display: block;
    font-size: 13px;
    opacity: .9;
}

/* ===============================
   NAVIGATION
================================ */

nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    max-width: 100%;
}

nav a {
    color: #fff;
    text-decoration: none;
    background: rgba(255,255,255,.12);
    padding: 9px 12px;
    border-radius: 12px;
    font-weight: 700;
    white-space: nowrap;
}

nav a:hover {
    background: rgba(255,255,255,.22);
}

.logout {
    background: #b91c1c !important;
}

/* ===============================
   MAIN CONTAINER
================================ */

.container {
    max-width: 1150px;
    width: 100%;
    margin: auto;
    padding: 22px;
}

/* ===============================
   CARDS
================================ */

.card {
    background: #fff;
    border-radius: 20px;
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: 0 8px 24px rgba(15,23,42,.08);
    width: 100%;
    max-width: 100%;
}

h1,
h2 {
    margin-top: 0;
    color: #071a33;
}

h1 {
    font-size: 28px;
}

h2 {
    font-size: 22px;
}

/* ===============================
   DASHBOARD STATS
================================ */

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    width: 100%;
}

.stat {
    background: linear-gradient(135deg, #071a33, #003b73);
    color: #fff;
    border-radius: 18px;
    padding: 20px;
    min-width: 0;
}

.stat strong {
    display: block;
    color: #ffd700;
    font-size: 32px;
    margin-bottom: 4px;
}

.stat span,
.stat p {
    color: #e5e7eb;
    font-size: 14px;
}

/* ===============================
   FORMS
================================ */

form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

form label {
    font-weight: 800;
    color: #071a33;
    margin-top: 6px;
}

input,
select,
button,
textarea {
    width: 100%;
    max-width: 100%;
    padding: 14px 15px;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    font-size: 15px;
    background: #fff;
    outline: none;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #003b73;
    box-shadow: 0 0 0 3px rgba(0,59,115,.12);
}

/* ===============================
   BUTTONS
================================ */

button,
.btn {
    background: #003b73;
    color: #fff;
    border: 0;
    font-weight: 900;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    padding: 12px 14px;
    border-radius: 12px;
}

button:hover,
.btn:hover {
    opacity: .92;
}

.btn.gold,
button.gold,
.gold {
    background: #ffd700;
    color: #000;
}

.btn.red {
    background: #dc2626;
    color: #fff;
}

.btn.green {
    background: #16a34a;
    color: #fff;
}

.password-btn {
    background: #e5e7eb;
    color: #111;
    border: none;
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
}

/* ===============================
   TABLES
================================ */

.table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th {
    background: #003b73;
    color: #ffd700;
    text-align: left;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

td {
    color: #0b1220;
}

/* ===============================
   BADGES
================================ */

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 12px;
    white-space: nowrap;
}

.badge-green {
    background: #dcfce7;
    color: #166534;
}

.badge-orange {
    background: #ffedd5;
    color: #9a3412;
}

.badge-red {
    background: #fee2e2;
    color: #991b1b;
}

.badge-blue {
    background: #dbeafe;
    color: #1e40af;
}

.badge-grey {
    background: #e5e7eb;
    color: #374151;
}

/* ===============================
   ACTIONS
================================ */

.actions {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

/* ===============================
   NOTICES
================================ */

.notice {
    padding: 12px;
    border-radius: 12px;
    background: #ecfdf5;
    color: #166534;
    font-weight: 700;
    margin-bottom: 14px;
}

.error {
    padding: 12px;
    border-radius: 12px;
    background: #fee2e2;
    color: #991b1b;
    font-weight: 700;
    margin-bottom: 14px;
}

/* ===============================
   FOOTER
================================ */

.footer {
    text-align: center;
    padding: 25px;
    color: #64748b;
}

/* ===============================
   TABLET RESPONSIVE
================================ */

@media (max-width: 850px) {

    .topbar {
        display: block;
        padding: 14px;
    }

    .brand a {
        font-size: 26px;
    }

    nav {
        margin-top: 12px;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        width: 100%;
    }

    nav a {
        text-align: center;
        white-space: normal;
        font-size: 14px;
        padding: 11px 8px;
        width: 100%;
    }

    .container {
        padding: 14px;
    }

    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===============================
   MOBILE RESPONSIVE
================================ */

@media (max-width: 520px) {

    body {
        overflow-x: hidden;
    }

    .topbar {
        padding: 12px;
    }

    .brand a {
        font-size: 24px;
        display: block;
        text-align: center;
    }

    .brand span {
        text-align: center;
        font-size: 12px;
    }

    nav {
        grid-template-columns: 1fr;
        width: 100%;
    }

    nav a {
        width: 100%;
        display: block;
        font-size: 14px;
        padding: 12px;
    }

    .container {
        padding: 10px;
        width: 100%;
    }

    .card {
        margin: 0 0 14px 0 !important;
        padding: 16px !important;
        border-radius: 16px;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat {
        padding: 18px;
    }

    .stat strong {
        font-size: 28px;
    }

    h1 {
        font-size: 22px;
        line-height: 1.3;
    }

    h2 {
        font-size: 19px;
        line-height: 1.3;
    }

    input,
    select,
    textarea,
    button {
        font-size: 16px;
    }

    button,
    .btn {
        width: 100%;
    }

    .actions {
        flex-direction: column;
        width: 100%;
    }

    .actions .btn,
    .actions button {
        width: 100%;
    }

    .table-wrap {
        overflow-x: auto;
    }

    table {
        min-width: 650px;
    }

    th,
    td {
        font-size: 13px;
        padding: 10px;
    }

    .badge {
        font-size: 11px;
        padding: 5px 9px;
    }
}

/* ===============================
   EXTRA SMALL PHONES
================================ */

@media (max-width: 360px) {

    .brand a {
        font-size: 21px;
    }

    nav a {
        font-size: 13px;
        padding: 10px;
    }

    .card {
        padding: 14px !important;
    }

    .stat strong {
        font-size: 25px;
    }
}