:root {
    --bg: #f6f7fb;
    --panel: #ffffff;
    --text: #0f172a;
    --muted: #6b7280;
    --border: #e9edf3;
    --brand: #f97316;
    --brand-2: #ea580c;
    --sidebar: #f3f4f6;
}
* {
    box-sizing: border-box;
}
html,
body {
    height: 100%;
}
body {
    margin: 0;
    font-family:
        ui-sans-serif,
        system-ui,
        -apple-system,
        Segoe UI,
        Roboto,
        Helvetica,
        Arial,
        "Apple Color Emoji",
        "Segoe UI Emoji";
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
}
a {
    color: inherit;
    text-decoration: none;
}
.app {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
}
.sidebar {
    width: 270px;
    background: var(--sidebar);
    border-right: 0;
    padding: 22px 18px;
}
.sidebar-logos {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 6px 6px 18px;
    margin-bottom: 10px;
}
.sidebar-logo {
    width: 150px;
    height: auto;
    object-fit: contain;
}
.nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 6px 0;
}
.nav-item {
    padding: 12px 14px;
    border-radius: 14px;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}
.nav-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.75);
    color: #6b7280;
    border: 1px solid rgba(17, 24, 39, 0.05);
}
.nav-item.active {
    background: var(--brand);
    color: #fff;
}
.nav-item.active .nav-icon {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.22);
    color: #fff;
}
.content {
    flex: 1;
    padding: 18px 22px 22px;
}
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 220px;
}
.topbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex: 1;
}
.page-title {
    font-size: 18px;
    font-weight: 700;
}
.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    color: #6b7280;
}
.menu-btn {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.topbar-search {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
    min-width: 380px;
    max-width: 520px;
    width: 100%;
}
.topbar-search-icon {
    color: #9ca3af;
}
.topbar-search-input {
    border: 0;
    padding: 0;
    outline: none;
    width: 100%;
    font-size: 13px;
    background: transparent;
}
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    color: #111827;
    user-select: none;
}
.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, #e5e7eb, #fff);
}
.user-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px 14px 10px;
}
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}
.table th,
.table td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(233, 237, 243, 0.9);
    font-size: 13px;
    vertical-align: middle;
}
.table th {
    color: var(--muted);
    font-weight: 600;
    text-align: left;
    background: #fff;
}
.table tbody tr:hover {
    background: rgba(15, 23, 42, 0.02);
}
.pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid var(--border);
    color: var(--muted);
    background: #fff;
}
.pill.green {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.25);
    color: #166534;
}
.pill.red {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.22);
    color: #991b1b;
}
.pill.blue {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.22);
    color: #1e3a8a;
}
.actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--border);
    background: #fff;
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
}
.btn.ghost {
    background: transparent;
    border-color: transparent;
    color: var(--muted);
    padding: 10px 10px;
}
.btn.ghost:hover {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.04);
}
.btn.primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.btn.primary:hover {
    background: var(--brand-2);
    border-color: var(--brand-2);
}
.form {
    max-width: 520px;
    margin: 0 auto;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
}
.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}
.label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
}
input,
select,
textarea {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 12px;
    outline: none;
    font-size: 14px;
    background: #fff;
}
textarea {
    min-height: 110px;
    resize: vertical;
}
.hint {
    font-size: 12px;
    color: var(--muted);
}
.list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 2px 12px;
}
.list-head-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.list-head-title {
    font-size: 15px;
    font-weight: 700;
}
.segmented {
    display: inline-flex;
    gap: 10px;
    padding: 6px;
    border-radius: 999px;
    background: transparent;
}
.segmented a,
.segmented button {
    border: 0;
    background: transparent;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
    color: #6b7280;
}
.segmented .active {
    background: #0ea5e9;
    color: #fff;
}

/* Orders page segmented variants */
.segmented.segmented-orange a,
.segmented.segmented-orange button {
    color: #6b7280;
}
.segmented.segmented-orange .active {
    background: #f97316;
    color: #fff;
}

.segmented.segmented-gray {
    background: transparent;
}
.segmented.segmented-gray a,
.segmented.segmented-gray button {
    color: #6b7280;
}
.segmented.segmented-gray .active {
    background: #fff;
    border: 1px solid rgba(233, 237, 243, 0.9);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
    color: #111827;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid rgba(233, 237, 243, 0.9);
    background: #fff;
    color: #111827;
    font-weight: 700;
    font-size: 12px;
    height: 36px;
}

/* Orders table refinements */
.table th {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: #94a3b8;
}

.product-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}
.product-icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(233, 237, 243, 0.9);
    background: #fff;
    color: #111827;
}
.product-icon.gas {
    background: rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.22);
    color: #9a3412;
}
.product-icon.water {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.22);
    color: #1e3a8a;
}
.product-line {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.product-type {
    font-size: 11px;
    font-weight: 800;
    color: #111827;
    opacity: 0.8;
}
.product-name {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
}
.product-qty {
    font-weight: 700;
    color: #6b7280;
}

.pill-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(233, 237, 243, 0.9);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: #fff;
    color: #6b7280;
}
.pill-status.pill-pending {
    background: rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.22);
    color: #9a3412;
}
.pill-status.pill-accepted {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.24);
    color: #92400e;
}
.pill-status.pill-completed {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.22);
    color: #166534;
}
.pill-status.pill-cancelled {
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.20);
    color: #991b1b;
}

.icon-btn.icon-square {
    border-radius: 12px;
    width: 36px;
    height: 36px;
}

/* =========================
   DataTables (admin lists)
   ========================= */
.dt-container {
    font-size: 13px;
}
.dt-container .dt-paging {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}
.dt-container .dt-paging .dt-paging-button {
    appearance: none;
    border: 1px solid rgba(233, 237, 243, 0.9);
    background: #fff;
    color: #111827;
    border-radius: 12px;
    height: 36px;
    min-width: 36px;
    padding: 0 12px;
    font-weight: 800;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
}
.dt-container .dt-paging .dt-paging-button.current,
.dt-container .dt-paging .dt-paging-button:hover {
    border-color: rgba(249, 115, 22, 0.22);
    background: rgba(249, 115, 22, 0.12);
    color: #9a3412;
}
.dt-container .dt-paging .dt-paging-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
/* Prevent oversized SVG/pseudo icons from taking over the page */
.dt-container .dt-paging svg {
    width: 16px !important;
    height: 16px !important;
}
.dt-container .dt-paging .dt-paging-button::before,
.dt-container .dt-paging .dt-paging-button::after {
    display: none !important;
    content: none !important;
}

/* If DataTables is enabled on a card, hide Laravel pager */
.dt-enabled [data-ajax-pager] {
    display: none !important;
}

/* Laravel pagination sometimes includes SVG icons; keep them small */
[data-ajax-pager] svg {
    width: 16px !important;
    height: 16px !important;
}
.center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
}

/* =========================
   Modals (admin details)
   ========================= */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    z-index: 9999;
}
.modal-backdrop[hidden] {
    display: none !important;
}
.modal {
    width: min(980px, 100%);
    max-height: min(86vh, 860px);
    overflow: hidden;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);
    border: 1px solid rgba(233, 237, 243, 0.9);
}
.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 18px 14px;
    border-bottom: 1px solid rgba(233, 237, 243, 0.9);
}
.modal-head-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.modal-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #f97316;
    color: #fff;
    font-weight: 900;
}
.modal-title {
    font-weight: 900;
    font-size: 18px;
}
.modal-subtitle {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}
.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid rgba(233, 237, 243, 0.9);
    background: #fff;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #6b7280;
}
.modal-body {
    padding: 16px 18px 18px;
    overflow: auto;
    max-height: calc(min(86vh, 860px) - 74px);
}
.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.modal-section-title {
    font-size: 12px;
    font-weight: 900;
    color: #9ca3af;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}
.modal-kv {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}
.modal-k {
    color: #9ca3af;
    font-size: 12px;
    width: 140px;
}
.modal-v {
    font-weight: 800;
    font-size: 13px;
    color: #111827;
}
.modal-summary {
    border: 1px solid rgba(233, 237, 243, 0.9);
    border-radius: 14px;
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.02);
}
.modal-divider {
    height: 1px;
    background: rgba(233, 237, 243, 0.9);
    margin: 10px 0;
}
.modal-table-wrap {
    border: 1px solid rgba(233, 237, 243, 0.9);
    border-radius: 14px;
    overflow: hidden;
}
.modal-table {
    width: 100%;
    border-collapse: collapse;
}
.modal-table th,
.modal-table td {
    padding: 12px 12px;
    border-bottom: 1px solid rgba(233, 237, 243, 0.9);
    font-size: 13px;
}
.modal-table th {
    color: #9ca3af;
    font-weight: 900;
    background: #fff;
    text-align: left;
}
.mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.mini-card {
    border: 1px solid rgba(233, 237, 243, 0.9);
    border-radius: 14px;
    padding: 14px;
    background: #fff;
}
.mini-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.history-row {
    border: 1px solid rgba(233, 237, 243, 0.9);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
}
.history-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.history-dot {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(14, 165, 233, 0.12);
}
.empty-box {
    border: 1px dashed rgba(203, 213, 225, 0.9);
    border-radius: 14px;
    padding: 18px;
    text-align: center;
    color: #9ca3af;
    width: 100%;
    grid-column: 1 / -1;
}
@media (max-width: 880px) {
    .modal-grid {
        grid-template-columns: 1fr;
    }
    .mini-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================
   Login page (admin)
   ========================= */
.login-body {
    background: #fff;
}
.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
}
.login-shell {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
    min-height: 100dvh;
}
.login-left {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 18px;
}
.login-card {
    width: min(520px, 100%);
    padding: 18px 18px 16px;
    background: #fff;
    border-radius: 16px;
}
.login-logos {
    display: flex;
    justify-content: center;
    margin: 6px 0 10px;
}
.login-logos img {
    height: 54px;
    width: auto;
    object-fit: contain;
}
.login-title {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    margin-top: 10px;
}
.login-subtitle {
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    margin-top: 6px;
    margin-bottom: 18px;
}
.login-form {
    margin-top: 0;
}
.login-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}
.login-label {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 600;
}
.login-error {
    font-size: 12px;
    color: #991b1b;
}
.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 12px;
    font-size: 14px;
    outline: none;
    background: #fff;
}
.login-form input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.18);
}
.login-password {
    position: relative;
}
.login-password input {
    padding-right: 44px;
}
.login-eye {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    padding: 6px;
}
.login-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 6px 0 16px;
}
.login-remember {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #111827;
}
.login-remember input {
    width: 14px;
    height: 14px;
}
.login-btn {
    width: 100%;
    background: #f97316;
    border: 1px solid #f97316;
    color: #fff;
    padding: 12px 14px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
}
.login-btn:hover {
    background: #ea580c;
    border-color: #ea580c;
}
.login-forgot {
    display: block;
    text-align: center;
    margin-top: 14px;
    font-size: 12px;
    color: #f59e0b;
}
.login-footnote {
    text-align: center;
    margin-top: 44px;
    font-size: 11px;
    color: #9ca3af;
}
.login-right {
    display: none;
}
.login-banner {
    height: 100%;
    padding: 22px;
}
.login-banner img {
    width: 100%;
    height: 88vh;
    object-fit: cover;
    border-radius: 22px;
}
@media (min-width: 980px) {
    .login-shell {
        grid-template-columns: 1fr 1.2fr;
    }
    .login-right {
        display: block;
        padding: 18px 18px 18px 0;
    }
    .login-left {
        padding: 18px;
    }
}
