* {
    box-sizing: border-box;
}
@media (min-width: 200px) and (max-width: 1400px) {

    p,
    ul,
    ol,
    li,
    span,
    strong,
    b,
    a,
    label,
    th,
    td,
    div,
    table,
    small,
    em,
    i {
        font-size: 11px !important;
    }
    th, td {
    padding: 5px 6px;
    border-bottom: 1px solid #edf2f7;
    text-align: left;
    vertical-align: middle;.auth-card
}
.sidebar {
    width: 240px;
}

}
@media (min-width: 14001px) and (max-width: 5000px) {
    * {
        font-size: 11px !important;
    }
    .sidebar {
    width: 240px !important;
}
.main {
    margin-left: 240px !important;
    width: calc(100% - 240px) !important;
}
}
@media (min-width: 200px) and (max-width: 1400px) {
    * {
        font-size: 11px !important;
    }
    .sidebar {
    width: 240px !important;
}
}

@media (min-width: 1400px) and (max-width: 5000px) {
    * {
        font-size: 13px !important;
    }
}

body {
    margin: 0;
    background: #f4f7fb;
    color: #172033;
    font-family:
        Inter,
        Segoe UI,
        Arial,
        sans-serif;
}
.layout {
    display: flex;
    min-height: 100vh;
}
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #08111f, #12233f);
    color: white;
    padding: 12px;
    position: fixed;
    inset: 0 auto 0 0;
    overflow: auto;
}
.main {
    margin-left: 270px;
    width: calc(100% - 270px);
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.brand small {
    display: block;
    color: #9fb5d0;
    font-size: 12px;
}
.logo {
    height: 44px;
    width: 44px;
    border-radius: 14px;
    background: #fff;
    color: #11233f;
    display: grid;
    place-items: center;
    font-weight: 900;
}
.user-pill {
    background: #11317773;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 12px;
    margin: 12px 0 20px;
    font-size: 14px;
}
.nav a {
    display: block;
    color: #dbe8ff;
    text-decoration: none;
    padding: 5px 14px;
    border-radius: 12px;
    margin: 5px 0;
    font-size: 13px;
}
.nav a:hover {
    background: rgba(255, 255, 255, 0.12);
}
.topbar {
    height: 78px;
    background: white;
    border-bottom: 1px solid #e6ebf3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 5;
}
.topbar p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
}
.content {
        padding: 15px 15px 0px 0px;
}
.footer {
    padding: 10px 28px;
    color: #64748b;
    text-align: center;
    position: fixed;
    bottom: 0px;
    width: 100%;
    font-size: 13px;
    z-index: 999;
    background-color: #f1f4f8;
}
.card {
    background: white;
    border: 1px solid #e7edf5;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 16px 45px rgba(15, 23, 42, 0.06);
}
.grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}
.stat {
    background: linear-gradient(135deg, #fff, #f8fbff);
    border: 1px solid #e7edf5;
    border-radius: 10px;
    padding: 20px;
}
.stat b {
    font-size: 30px;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.input, .select, textarea {
    width: 100%;
    border: 1px solid #d9e2ef;
    border-radius: 5px;
    padding: 10px 13px;
    background: white;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
}
.search {
    max-width: 420px;
}
.toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.btn {
    display: inline-block;
    border: 0;
    background: #0f3177 !important;
    color: white !important;
    padding: 7px 14px;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
}
.btn.gray,
.btn.ghost {
    background: #eef3fa;
    color: #1f2b3d;
}
.btn.red {
    background: #dc2626;
}
.btn.small {
    padding: 7px 10px;
    font-size: 12px;
}
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border: 1px solid #a2a3a3;
    border-radius: 3px;
    overflow: hidden;
}
th,
td {
padding: 8px 15px;
    border-bottom: 1px solid #edf2f7;
    text-align: left;
    vertical-align: middle;
    font-size: 14px;
}
th {
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
tr:last-child td {
    border-bottom: 0;
}
.badge {
    display: inline-flex;
    border: 0;
    background: #853a0a !important;
    color: white !important;
    padding: 6px 14px;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;    text-transform: capitalize;
}
.badge.paid,
.badge.approved {
    background: #dcfce7;
    color: #166534;
}
.badge.unpaid,
.badge.pending {
    background: #fff7ed;
    color: #9a3412;
}
.badge.cancelled,
.badge.rejected {
    background: #fee2e2;
    color: #991b1b;
}
.pager {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    margin: 16px 0;
}
.pager a {
    padding: 8px 12px;
    border-radius: 10px;
    background: white;
    border: 1px solid #e7edf5;
    text-decoration: none;
    color: #0f172a;
}
.pager a.active {
    background: #0f3177;
    color: #fff;
}
.invoice-wrap {
    background: #fff;
    padding: 18px;
}
.invoice-paper {
    max-width: 1080px;
    margin: auto;
    background: white;
    color: #111;
    border: 2px solid #111;
    font-family: Arial, sans-serif;
    font-size: 11px;
}
.inv-title {
    text-align: center;
    font-size: 26px;
    font-weight: 900;
    background: #eee;
    border-top: 2px solid #111;
    border-bottom: 2px solid #111;
    padding: 4px;
}
.inv-company {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    border-bottom: 2px solid #111;
}
.inv-company > div {
    padding: 8px;
    border-right: 1px solid #111;
}
.inv-company > div:last-child {
    border-right: 0;
}
.copy-box div {
    border-bottom: 1px solid #111;
    padding: 3px 8px;
    font-weight: bold;
}
.bill-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 2px solid #111;
}
.bill-grid > div {
    padding: 7px;
    border-right: 1px solid #111;
}
.bill-grid > div:last-child {
    border-right: 0;
}
.invoice-paper table {
    border-radius: 0;
    border: 0;border: 1px solid #000000;
    font-size: 10.5px;
}
.invoice-paper th,
.invoice-paper td {
    border: 1px solid #111;
    padding: 4px;
}
.invoice-paper th {
    background: #f2f2f2;
    color: #111;
}
.totals-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    border-top: 1px solid #111;
}
.totals-grid > div {
    padding: 7px;
    border-right: 1px solid #111;
}
.totals-grid > div:last-child {
    border-right: 0;
}
.sign {
    text-align: center;
    padding-top: 44px;
}
.no-print {
    margin-bottom: 14px;
}
@media print {
    .sidebar,
    .topbar,
    .footer,
    .no-print {
        display: none !important;
    }
    .main {
        margin: 0;
        width: 100%;
    }
    .content {
        padding: 0;
    }
    .invoice-paper {
        box-shadow: none;
        border: 2px solid #111;
        max-width: none;
    }
    .invoice-wrap {
        padding: 0;
    }
    body {
        background: #fff;
    }
}
@media (max-width: 900px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }
    .main {
        margin-left: 0;
        width: 100%;
    }
    .layout {
        display: block;
    }
    .grid,
    .form-grid {
        grid-template-columns: 1fr;
    }
    .toolbar {
        align-items: stretch;
    }
    .btn {
        width: auto;
    }
}
.mi {
    display: inline-grid;
    place-items: center;
    width: 25px;
    height: 25px;
    margin-right: 7px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    line-height: 25px;
}
.btn[href*="edit"],
.btn.edit {
    background: #eef6ff;
    color: #075985;
}
.btn[href*="delete"],
.btn.delete {
    background: #fee2e2;
    color: #991b1b;
}
.btn[href*="edit"]:before,
.btn.edit:before {
    content: "✏️ ";
}
.btn[href*="delete"]:before,
.btn.delete:before {
    content: "🗑️ ";
}
.btn.add:before {
    content: "➕ ";
}
.btn.save:before {
    content: "💾 ";
}
.btn.searchbtn:before {
    content: "🔎 ";
}
.auth {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 34px;
    background: radial-gradient(circle at top left, #dbeafe, transparent 30%),
        linear-gradient(135deg, #07111f, #133a70 55%, #0b1220);
}
.auth-card {
    width: min(400px, 100%);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
    border-radius: 15px;
    padding: 32px;
}
.auth-logo {
    width: 100%;
    color: white;
    display: grid;
    place-items: center;
    font-size: 28px;
    margin: 0 auto 14px;
}
.auth-logo img {
    max-height: 100% !important;
    max-width: 50% !important;
}
.auth-title {
    text-align: center;
    margin: 0;
}
.auth-sub {
    text-align: center;
    color: #64748b;
    margin: 7px 0 24px;
}
.auth-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
}
.auth-actions a {
    color: #0f3177;
    text-decoration: none;
    font-weight: 700;
}
.alert {
    padding: 12px 14px;
    border-radius: 14px;
    margin: 12px 0;
    font-weight: 700;
}
.alert.red {
    background: #fee2e2;
    color: #991b1b;
}
.alert.green {
    background: #dcfce7;
    color: #166534;
}
.field {
    display: block;
    margin-bottom: 13px;
}
.field span {
    display: block;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 6px;
    color: #334155;
}

.brand-img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    padding: 4px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}
.grid-full {
    grid-column: 1/-1;
}
.small-note {
    font-size: 12px;
    color: #667085;
    background: #f8fafc;
    border: 1px dashed #d0d5dd;
    border-radius: 12px;
    padding: 10px;
}
.field span {
    font-weight: 700;
    font-size: 13px;
    color: #344054;
    margin-bottom: 7px;
    display: block;
}
.input.is-invalid,
.select.is-invalid,
textarea.is-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.11) !important;
    background: #fff7f7;
}
button:disabled,
.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(0.2);
}
.form-grid h3 {
    margin: 12px 0 0;
    padding: 12px 0 6px;
    border-bottom: 1px solid #edf2f7;
    color: #0f172a;
    font-size: 16px;
}
.auth {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: radial-gradient(circle at top left, #dbeafe, transparent 35%), linear-gradient(135deg, #f8fafc, #eef2ff);
}
.auth-card {
    width: min(400px, 100%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(12px);
}