html {
    font-size: 105%;
}

:root {
    /* Color Palette */
    --bg-color: #F3F4F6;
    --card-bg: #FFFFFF;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --primary-color: #2563EB;
    --primary-hover: #1D4ED8;
    --success-color: #10B981;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.5;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    font-weight: 600;
}

/* Cards */
.auth-card {
    background: var(--card-bg);
    border-radius: 0.75rem;
    /* 12px */
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    /* Slightly wider than before */
    border: 1px solid var(--border-color);
}

.auth-card .title {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

/* Forms */
.field {
    margin-bottom: 1.5rem;
}

.label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.input {
    width: 100%;
    padding: 0.5rem 1rem;
    height: 2.5rem;
    /* Fixed height for consistency */
    display: inline-flex;
    align-items: center;
}

.input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Icons within inputs */
.control.has-icons-left {
    position: relative;
}

.control.has-icons-left .input {
    padding-left: 2.5rem;
}

.control.has-icons-left .icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0.75rem;
    color: var(--text-secondary);
    pointer-events: none;
    height: 1.5rem;
    width: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Buttons */
.button.is-primary {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 1rem;
    height: auto;
}

.button.is-primary:hover {
    background-color: var(--primary-hover);
}

/* Notifications */
.notification {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.notification.is-danger {
    background-color: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.notification.is-success {
    background-color: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

/* Layout Utilities */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
}

.back-link:hover {
    color: var(--primary-color);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.badge-success {
    background-color: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.badge-warning {
    background-color: #FFFBEB;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.badge-danger {
    background-color: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.badge-info {
    background-color: #EFF6FF;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

.badge-neutral {
    background-color: #F3F4F6;
    color: #374151;
    border: 1px solid #E5E7EB;
}

.badge-purple {
    background-color: #F3E8FF;
    color: #6B21A8;
    border: 1px solid #E9D5FF;
}

/* Order List / Card Table */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.order-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    padding: 1rem;
    transition: box-shadow 0.2s, transform 0.1s;
    text-decoration: none !important;
    display: block;
    color: inherit;
}

.order-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    border-color: var(--primary-color);
}

.order-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

/* Tablet + Desktop: Horizontal layout */
@media (min-width: 768px) {
    .order-row {
        grid-template-columns: 1fr 1.5fr 1.2fr;
        /* ID/Status | Customer/Addr | Logistics */
        gap: 1.5rem;
        align-items: flex-start;
    }
}

.order-col {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.order-id {
    font-family: monospace;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.text-primary {
    color: var(--text-primary);
}

.text-secondary {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.text-sm {
    font-size: 0.75rem;
}

.font-bold {
    font-weight: 600;
}

.section-label {
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

/* Utility for icons in text */
.icon-text {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
}

.page-title {
    font-size: 1.75rem;
    /* Larger title */
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

/* Filter Toolbar */
.filter-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    padding: 1rem;
    margin-bottom: 2rem;
}

.filter-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
}

.filter-grid>.field {
    margin-bottom: 0;
}

.filter-actions {
    margin-left: auto;
    /* Push to right */
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Enhanced Buttons */
.button {
    font-weight: 600;
    border-radius: 0.6rem;
    transition: all 0.2s;
    height: 2.5rem;
    /* Match input height */
    padding-left: 1rem;
    padding-right: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.button.is-primary {
    box-shadow: 0 1px 2px 0 rgba(37, 99, 235, 0.3);
}

.button.is-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.4);
}

.button.is-text {
    background: transparent;
    text-decoration: none;
    box-shadow: none;
}

.button.is-text:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Segmented Control for View Switcher */
.view-switcher {
    display: flex;
    background: #F3F4F6;
    padding: 0.25rem;
    border-radius: 0.5rem;
    border: 1px solid #E5E7EB;
}

.view-switcher .button {
    background: transparent;
    border: none;
    font-size: 0.85rem;
    color: #6B7280;
    margin-bottom: 0;
    height: auto;
    padding: 0.4rem 0.75rem;
    border-radius: 0.375rem;
    box-shadow: none;
}

.view-switcher .button:hover {
    color: #111827;
    background: rgba(255, 255, 255, 0.5);
}

.view-switcher .button.is-active {
    background: white;
    color: #2563EB;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    font-weight: 700;
}

.view-switcher .button:focus {
    box-shadow: none;
    /* Remove default focus ring for cleaner look in group */
}

/* Timeline Component */
.timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
    padding: 0 1rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 2rem;
    right: 2rem;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.timeline-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-color);
    /* Mask line behind */
    padding: 0 0.5rem;
}

.timeline-marker {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.timeline-step.is-active .timeline-marker {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.timeline-step.is-completed .timeline-marker {
    border-color: var(--success-color);
    background: var(--success-color);
    color: white;
}

.timeline-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.timeline-step.is-active .timeline-label {
    color: var(--primary-color);
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 1024px) {
    .info-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.info-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    height: 100%;
    box-shadow: var(--shadow-sm);
}

.info-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Data Pairs */
.data-pair {
    margin-bottom: 0.75rem;
}

.data-pair:last-child {
    margin-bottom: 0;
}

.data-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.data-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.empty-value {
    color: #9CA3AF;
    font-style: italic;
    font-size: 0.875rem;
}