:root {
    color-scheme: dark;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(var(--primary-rgb), 0.18), transparent 28%),
        radial-gradient(circle at bottom right, rgba(244, 169, 61, 0.16), transparent 28%),
        linear-gradient(135deg, #07111e 0%, #0d1d31 48%, #06111d 100%);
    color: #eff6ff;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.65);
}

.primary-button,
.ghost-button,
.table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 46px;
    padding: 0.82rem 1.15rem;
    border-radius: 16px;
    border: 1px solid transparent;
    font-weight: 700;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.primary-button {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #f8feff;
    box-shadow: 0 22px 48px rgba(var(--primary-rgb), 0.28);
}

.ghost-button,
.table-action {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    color: #f4f9ff;
}

.primary-button:hover,
.ghost-button:hover,
.table-action:hover {
    transform: translateY(-1px);
}

.table-action {
    min-height: 40px;
    padding: 0.62rem 0.9rem;
    border-radius: 12px;
    font-size: 0.9rem;
}

.table-action.danger {
    color: #ffd1cf;
    border-color: rgba(248, 113, 113, 0.28);
    background: rgba(127, 29, 29, 0.22);
}

.auth-body {
    overflow: hidden;
}

.auth-shell {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr;
    min-height: 100vh;
}

.auth-panel {
    position: relative;
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-brand::before,
.auth-brand::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    filter: blur(8px);
}

.auth-brand::before {
    width: 420px;
    height: 420px;
    top: -80px;
    left: -120px;
    background: rgba(var(--primary-rgb), 0.22);
}

.auth-brand::after {
    width: 300px;
    height: 300px;
    right: 0;
    bottom: 10%;
    background: rgba(244, 169, 61, 0.18);
}

.brand-floating-card,
.auth-card,
.panel-card,
.stat-card {
    backdrop-filter: blur(18px);
    background: rgba(7, 17, 30, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 22px 60px rgba(2, 10, 20, 0.35);
}

.brand-floating-card {
    position: relative;
    max-width: 680px;
    padding: 2rem;
    border-radius: 32px;
    z-index: 1;
}

.brand-badge {
    display: inline-flex;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.18);
    color: #d9ffff;
    margin-bottom: 1rem;
    font-weight: 700;
}

.brand-floating-card h1,
.auth-card h2,
.topbar h1,
.panel-head h2 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.02em;
}

.brand-floating-card h1 {
    font-size: clamp(2.4rem, 5vw, 4.6rem);
    line-height: 1.02;
}

.brand-floating-card p {
    max-width: 58ch;
    color: rgba(226, 232, 240, 0.78);
    font-size: 1.04rem;
}

.auth-feature-grid {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
}

.auth-feature-grid article,
.info-card,
.quick-action,
.copy-link-card,
.status-widget,
.mini-step,
.brand-preview {
    border-radius: 20px;
    padding: 1rem 1.1rem;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-feature-grid strong,
.quick-action strong,
.copy-link-card strong,
.info-card strong {
    display: block;
    margin-bottom: 0.3rem;
}

.auth-feature-grid span,
.quick-action span,
.info-card p,
.status-widget p,
.mini-step span,
.tracking-row span,
.tracking-row strong + span,
.sidebar-footer span {
    color: rgba(226, 232, 240, 0.72);
}

.auth-card {
    width: min(100%, 480px);
    border-radius: 32px;
    padding: 2rem;
}

.auth-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.brand-mark {
    width: 62px;
    height: 62px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.18), rgba(244, 169, 61, 0.18));
    display: grid;
    place-items: center;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    overflow: hidden;
    flex-shrink: 0;
}

.stack-form,
.tracking-form {
    display: grid;
    gap: 1rem;
}

.stack-form label,
.tracking-form label,
.filter-grid label {
    display: grid;
    gap: 0.5rem;
}

.stack-form span,
.tracking-form span,
.filter-grid span {
    font-size: 0.95rem;
    font-weight: 700;
    color: rgba(226, 232, 240, 0.88);
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    color: #f8fbff;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

select {
    color-scheme: dark;
}

select option,
select optgroup {
    background: #101827;
    color: #eef6ff;
}

select option:checked,
select option:hover,
select option:focus {
    background: #17324c;
    color: #ffffff;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(var(--primary-rgb), 0.7);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.14);
}

input[readonly] {
    color: rgba(226, 232, 240, 0.66);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.auth-footer-note {
    margin-top: 1rem;
    color: rgba(226, 232, 240, 0.66);
    font-size: 0.92rem;
}

.admin-shell {
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 1.5rem;
    background: rgba(4, 12, 20, 0.72);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(22px);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
}

.brand-card {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0.4rem 0.2rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-card h2,
.sidebar-footer strong {
    margin: 0;
}

.sidebar-nav {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.4rem;
}

.sidebar-nav a,
.logout-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    color: rgba(240, 246, 255, 0.76);
    transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.sidebar-nav a::after,
.logout-link::after {
    content: '›';
    font-size: 1.15rem;
    opacity: 0.45;
}

.sidebar-nav a.active,
.sidebar-nav a:hover,
.logout-link:hover {
    background: rgba(var(--primary-rgb), 0.14);
    color: #fff;
    transform: translateX(3px);
}

.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 0.45rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-main {
    width: min(100%, 1520px);
    margin: 0 auto;
    padding: 1.25rem 1.6rem 2rem;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.35rem;
    padding: 1.05rem 1.15rem;
    border-radius: 26px;
    background: rgba(7, 17, 30, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0.75rem;
    z-index: 20;
    box-shadow: 0 18px 50px rgba(2, 10, 20, 0.28);
}

.topbar h1 {
    font-size: clamp(1.9rem, 2.6vw, 2.8rem);
}

.topbar-actions .ghost-button {
    background: rgba(255, 255, 255, 0.045);
}

.topbar-actions,
.button-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.button-row.wrap {
    flex-wrap: wrap;
}

.menu-toggle {
    display: none;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #f7fbff;
}

.alert {
    border-radius: 18px;
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.alert.success {
    background: rgba(22, 163, 74, 0.16);
    border: 1px solid rgba(74, 222, 128, 0.26);
}

.alert.error {
    background: rgba(220, 38, 38, 0.18);
    border: 1px solid rgba(248, 113, 113, 0.24);
}

.admin-content {
    display: grid;
    gap: 1.5rem;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.8fr);
    gap: 1.25rem;
    overflow: hidden;
    position: relative;
    background:
        radial-gradient(circle at top right, rgba(var(--primary-rgb), 0.18), transparent 32%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
        rgba(7, 17, 30, 0.68);
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    inset: auto auto -100px -70px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(var(--primary-rgb), 0.12);
    filter: blur(18px);
    pointer-events: none;
}

.dashboard-hero-copy,
.dashboard-hero-side,
.dashboard-side {
    position: relative;
    z-index: 1;
}

.dashboard-hero-copy h2 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 3.2vw, 3rem);
    line-height: 1.03;
    max-width: 14ch;
}

.dashboard-hero-copy > p:not(.eyebrow) {
    max-width: 64ch;
    color: rgba(226, 232, 240, 0.76);
}

.dashboard-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.35rem;
}

.dashboard-chip {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0.58rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(240, 246, 255, 0.82);
    font-weight: 700;
    font-size: 0.92rem;
}

.dashboard-hero-side {
    display: grid;
    gap: 0.95rem;
    align-content: start;
}

.hero-kpi-card {
    padding: 1.2rem 1.25rem;
    border-radius: 24px;
    background: linear-gradient(160deg, rgba(var(--primary-rgb), 0.16), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-kpi-card span,
.hero-kpi-card small {
    color: rgba(226, 232, 240, 0.74);
}

.hero-kpi-card strong {
    display: block;
    margin: 0.45rem 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.4rem, 4.4vw, 3.6rem);
    line-height: 1;
}

.hero-action-group {
    display: grid;
    gap: 0.75rem;
}

.dashboard-grid,
.panel-grid,
.form-grid,
.filter-grid {
    display: grid;
    gap: 1.25rem;
}

.dashboard-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card,
.panel-card {
    border-radius: 28px;
    padding: 1.4rem;
}

.stat-card {
    min-height: 170px;
    display: grid;
    gap: 0.65rem;
    align-content: start;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
        rgba(7, 17, 30, 0.68);
}

.stat-card strong {
    font-size: clamp(2rem, 4vw, 3rem);
    font-family: 'Space Grotesk', sans-serif;
}

.stat-card small {
    color: rgba(226, 232, 240, 0.66);
}

.stat-card-top,
.stat-card-value-row,
.operation-item-head,
.delivery-card-top,
.delivery-card-bottom,
.delivery-route,
.delivery-metrics {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.stat-card-top {
    align-items: flex-start;
}

.stat-card h3 {
    margin: 0.22rem 0 0;
    font-size: 1.04rem;
}

.stat-eyebrow {
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.54);
}

.stat-icon-badge {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.stat-card-value-row {
    align-items: flex-end;
}

.stat-percent {
    color: rgba(226, 232, 240, 0.74);
    font-weight: 700;
}

.stat-meter,
.operation-meter {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.stat-meter span,
.operation-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.stat-card-total .stat-icon-badge,
.stat-card-total .stat-meter span {
    background: linear-gradient(90deg, #7dd3fc, #38bdf8);
}

.stat-card-pending .stat-icon-badge,
.stat-card-pending .stat-meter span,
.operation-meter-pending span {
    background: linear-gradient(90deg, #22d3ee, #2dd4bf);
}

.stat-card-progress .stat-icon-badge,
.stat-card-progress .stat-meter span,
.operation-meter-progress span {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.stat-card-done .stat-icon-badge,
.stat-card-done .stat-meter span,
.operation-meter-done span {
    background: linear-gradient(90deg, #4ade80, #22c55e);
}

.dashboard-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.88fr);
    gap: 1.25rem;
    align-items: start;
}

.dashboard-side,
.dashboard-feed-list,
.operation-list {
    display: grid;
    gap: 1rem;
}

.delivery-card {
    padding: 1.15rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: grid;
    gap: 1rem;
}

.delivery-overline {
    margin: 0 0 0.4rem;
    font-size: 0.76rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.5);
}

.delivery-card-top strong {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 1.05rem;
}

.delivery-card-top span:last-child {
    color: rgba(226, 232, 240, 0.7);
}

.delivery-route {
    align-items: center;
    gap: 0.9rem;
}

.route-node {
    flex: 0 0 180px;
    display: grid;
    gap: 0.35rem;
}

.route-node span,
.delivery-metrics span,
.operation-item span {
    color: rgba(226, 232, 240, 0.64);
    font-size: 0.9rem;
}

.route-node-end {
    text-align: right;
}

.route-progress-line {
    position: relative;
    flex: 1;
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.route-progress-bar {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--highlight));
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.28);
}

.delivery-card-bottom {
    align-items: flex-end;
}

.delivery-metrics {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.delivery-metrics div {
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.delivery-metrics strong {
    display: block;
    margin-top: 0.25rem;
}

.operational-card {
    background:
        radial-gradient(circle at top right, rgba(var(--primary-rgb), 0.14), transparent 32%),
        rgba(7, 17, 30, 0.68);
}

.operation-item {
    display: grid;
    gap: 0.65rem;
    padding: 1rem 1.05rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.operation-item strong {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
}

.quick-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
}

.panel-card.wide {
    min-width: 0;
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.empty-state {
    padding: 2rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    text-align: center;
}

.empty-state.compact {
    padding: 1.5rem;
}

.tracking-list,
.quick-actions,
.detail-stack,
.mini-timeline {
    display: grid;
    gap: 0.9rem;
}

.tracking-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.tracking-row strong,
.quick-action strong,
.panel-head h2,
.copy-link-card strong,
.status-widget strong,
.mini-step strong {
    display: block;
}

.tracking-meta {
    display: grid;
    justify-items: end;
    gap: 0.5rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.status-created {
    background: rgba(59, 130, 246, 0.18);
    color: #cce2ff;
}

.status-collected {
    background: rgba(var(--primary-rgb), 0.22);
    color: #d1fff8;
}

.status-in_transit {
    background: rgba(244, 169, 61, 0.22);
    color: #ffe8bf;
}

.status-near_destination {
    background: rgba(192, 132, 252, 0.2);
    color: #f0d7ff;
}

.status-delivered {
    background: rgba(22, 163, 74, 0.2);
    color: #d0ffd8;
}

.quick-action {
    transition: transform 180ms ease, border-color 180ms ease;
}

.quick-action:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--primary-rgb), 0.22);
}

.form-layout {
    align-items: start;
}

.tracking-form .form-grid,
.filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-actions,
.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 0.25rem;
}

.copy-link-card input {
    margin: 0.85rem 0;
}

.status-widget {
    text-align: center;
}

.status-widget strong {
    font-size: 2rem;
    margin-top: 0.4rem;
}

.mini-step {
    position: relative;
    padding-left: 1.15rem;
}

.mini-step::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.mini-step.current::before,
.mini-step.completed::before {
    background: var(--primary);
    box-shadow: 0 0 0 6px rgba(var(--primary-rgb), 0.12);
}

.filter-grid {
    margin-bottom: 1.2rem;
}

.filter-actions {
    align-self: end;
}

.table-wrap {
    overflow: auto;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    background: rgba(5, 12, 20, 0.48);
}

.admin-table th,
.admin-table td {
    padding: 1rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: top;
}

.admin-table th {
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.56);
}

.admin-table td strong {
    display: block;
    margin-bottom: 0.3rem;
}

.admin-table td span {
    color: rgba(226, 232, 240, 0.68);
}

.progress-cell {
    min-width: 150px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    margin-bottom: 0.55rem;
}

.progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--highlight));
    box-shadow: 0 0 18px rgba(var(--primary-rgb), 0.36);
}

.color-input-row {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 0.9rem;
    align-items: center;
}

.color-input-row input[type='color'] {
    min-height: 56px;
    padding: 0.4rem;
}

.brand-preview {
    text-align: center;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(var(--primary-rgb), 0.12)),
        rgba(255, 255, 255, 0.04);
}

.brand-preview .preview-logo {
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--preview-color), var(--highlight));
}

.app-toast {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 60;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(7, 17, 30, 0.92);
    border: 1px solid rgba(var(--primary-rgb), 0.22);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 200ms ease, transform 200ms ease;
    pointer-events: none;
}

.app-toast.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1180px) {
    .dashboard-grid,
    .panel-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-hero,
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .panel-card.wide {
        grid-column: 1 / -1;
    }
}

@media (max-width: 980px) {
    .auth-shell,
    .dashboard-grid,
    .panel-grid,
    .tracking-form .form-grid,
    .filter-grid {
        grid-template-columns: 1fr;
    }

    .auth-panel,
    .admin-main {
        padding: 1.25rem;
    }

    .admin-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        width: min(86vw, 320px);
        z-index: 50;
        transition: transform 220ms ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .menu-toggle {
        display: inline-flex;
    }

    .topbar {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .delivery-route,
    .delivery-card-bottom {
        flex-direction: column;
        align-items: stretch;
    }

    .route-node,
    .route-node-end {
        flex: 0 1 auto;
        text-align: left;
    }

    .delivery-metrics,
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .auth-panel,
    .auth-card,
    .panel-card,
    .stat-card {
        padding: 1.1rem;
    }

    .topbar-actions,
    .button-row,
    .form-actions,
    .filter-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .tracking-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .tracking-meta {
        width: 100%;
        justify-items: start;
    }

    .brand-floating-card h1 {
        font-size: 2.4rem;
    }

    .admin-main {
        padding-inline: 0.85rem;
    }

    .topbar {
        top: 0.5rem;
        padding: 0.9rem;
        border-radius: 20px;
    }

    .dashboard-hero-copy h2 {
        max-width: none;
        font-size: 1.65rem;
    }

    .stat-card {
        min-height: auto;
    }

    .delivery-card,
    .operation-item {
        padding: 1rem;
    }
}
