/* =========================
   Base / Global
   ========================= */

:root {
    font-family: Inter, Arial, sans-serif;
    color: #17202a;
    background: #f4f7fb;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}


/* =========================
   Header
   ========================= */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 15px 24px;

    background: #fff;
    color: #0094da;
}

header a {
    color: #0094da;
    text-decoration: none;
}


/* =========================
   Layout
   ========================= */

.wrap {
    max-width: 1250px;
    margin: 0 auto;
    padding: 22px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.full {
    grid-column: 1 / -1;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.filter-tabs {
    display: flex;
    gap: 8px;
}


/* =========================
   Cards
   ========================= */

.card {
    margin-bottom: 16px;
    padding: 18px;

    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 12px;
}


/* =========================
   Metrics
   ========================= */

.metric strong {
    display: block;
    font-size: 28px;
}


/* =========================
   Buttons
   ========================= */

button,
.btn {
    display: inline-block;

    padding: 9px 12px;

    font-family: Inter, Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;

    color: #17202a;
    background: #fff;

    border: 1px solid #cbd5e1;
    border-radius: 8px;

    text-decoration: none;
    cursor: pointer;
}

.primary {
    color: #fff;
    background: #2563eb;
    border-color: #2563eb;
}

.danger {
    color: #b91c1c;
}


/* =========================
   Forms
   ========================= */

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px;

    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

input[type="checkbox"] {width:auto;}

.help-text {
    display: block;
    margin-top: 6px;

    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}


/* =========================
   Tables
   ========================= */

.table {
    overflow: auto;

    border: 1px solid #d9e2ec;
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th,
td {
    padding: 10px;

    border-bottom: 1px solid #e5e7eb;

    text-align: left;
    vertical-align: top;
}


/* =========================
   Messages / Alerts
   ========================= */

.msg {
    margin-bottom: 12px;
    padding: 11px;

    background: #eaf3ff;
    border-radius: 8px;
}

.error {
    background: #fee2e2;
    color: #991b1b;
}

.alert {
    margin-bottom: 20px;
    padding: 12px 16px;

    border-radius: 6px;
}

.alert-success {
    color: #166534;
    background: #dcfce7;
    border: 1px solid #86efac;
}

.alert-error {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fca5a5;
}


/* =========================
   Text Helpers
   ========================= */

.muted {
    color: #64748b;
    font-size: 0.9rem;
}


/* =========================
   Badges
   ========================= */

.badge {
    display: inline-block;

    padding: 4px 10px;

    font-size: 0.85rem;
    font-weight: 400;

    background: #e2e8f0;
    border-radius: 999px;
}

.badge-success {
    color: #166534;
    background: #dcfce7;
}

.badge-secondary {
    color: #374151;
    background: #e5e7eb;
}


/* =========================
   Customer Autocomplete
   ========================= */

.customer-autocomplete {
    position: relative;
}

.customer-autocomplete input[type="text"] {
    width: 100%;
}

.customer-results {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    z-index: 50;

    max-height: 260px;
    overflow-y: auto;

    padding: 3px 3px 0;

    background: #fff;
    border: 1px solid #d9dee5;
    border-radius: 8px;

    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.customer-result {
    display: block;
    width: 100%;

    margin-bottom: 3px;
    padding: 10px 12px;

    background: #fff;
    border: 0;
    border-bottom: 1px solid #eef1f4;

    text-align: left;
    cursor: pointer;
}

.customer-result:last-child {
    border-bottom: 0;
}

.customer-result:hover,
.customer-result:focus,
.customer-result.is-active {
    background: #f5f8fa;
}

.customer-result-empty {
    padding: 10px 12px;

    color: #6b7280;

    cursor: default;
}

.customer-result-empty:hover {
    background: #fff;
}

/* =========================
   Listing and pagination
   ========================= */

.list-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    margin: 16px 0 10px;
}

.per-page-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.per-page-form label {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

.per-page-form select {
    width: auto;
    min-width: 72px;
    padding: 8px 32px 8px 10px;
}

.pagination {
    margin-top: 24px;
    padding: 24px 0;
    text-align: center;
}

.pagination nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.pagination nav > div {
    width: 100%;
}

.pagination nav > div:first-child {
    display: none;
}

.pagination nav > div:last-child {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.pagination nav > div:last-child > div:first-child {
    color: #64748b;
    font-size: 14px;
}

.pagination nav > div:last-child > div:last-child {
    display: flex;
    justify-content: center;
}

.pagination nav span,
.pagination nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
	gap: 6px;
	border-radius: 8px;
}

.pagination nav a,
.pagination nav span[aria-current="page"] > span,
.pagination nav span[aria-disabled="true"] > span {
    min-width: 42px;
    height: 42px;
    padding: 0 12px;

    border: 1px solid #d9dee5;
    background: #fff;

    color: #374151;
    text-decoration: none;
    line-height: 1;
}

.pagination nav a:hover {
    background: #f5f8fa;
}

.pagination nav span[aria-current="page"] > span {
    background: #0094da;
    border-color: #0094da;
    color: #fff;
    font-weight: 600;
}

.pagination nav span[aria-disabled="true"] > span {
    background: #f9fafb;
    color: #9ca3af;
}

.pagination nav svg {
    width: 18px;
    height: 18px;
}

/* =========================
   Scheduling
   ========================= */

.schedule-preferences {
	display: grid;
	gap: 10px;
	margin-top: 8px;
}

.schedule-preference {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 14px 16px;
	border: 1px solid #d9dee5;
	border-radius: 8px;
	background: #f9fafb;
}

.schedule-preference form {
	margin: 0;
}

.schedule-section {
	margin-top: 20px;
	padding: 20px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #f9fafb;
}

.schedule-section-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 20px;
}

.schedule-section-header h2 {
	margin: 0 0 5px;
}

.schedule-section-header p {
	margin: 0;
}

.confirmed-pickup {
	margin-bottom: 20px;
	padding: 16px 18px;
	border: 1px solid #bbf7d0;
	border-radius: 8px;
	background: #f0fdf4;
}

.confirmed-pickup strong {
	display: block;
	margin: 3px 0;
	font-size: 1.1rem;
}

.schedule-preferences {
	display: grid;
	gap: 10px;
}

.schedule-section {
	margin-top: 20px;
	padding: 20px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #f9fafb;
}

.schedule-section-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 20px;
}

.schedule-section-header h2 {
	margin: 0 0 5px;
}

.schedule-section-header p {
	margin: 0;
}

.confirmed-pickup {
	margin-bottom: 20px;
	padding: 16px 18px;
	border: 1px solid #bbf7d0;
	border-radius: 8px;
	background: #f0fdf4;
}

.confirmed-pickup strong {
	display: block;
	margin: 3px 0;
	font-size: 1.1rem;
}

.schedule-preferences {
	display: grid;
	gap: 10px;
}

.schedule-preference {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 14px 16px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #fff;
}

.schedule-preference.is-confirmed {
	border-color: #86efac;
	background: #f0fdf4;
}

.schedule-preference-date {
	margin-top: 3px;
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 800px) {
    .metrics,
    .grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .metrics,
    .grid {
        grid-template-columns: 1fr;
    }
}