/* ============================================================
 * BELIZE POSTAL SERVICE - SHARED APPLICATION STYLES
 * app.css - Core styles shared across all staff portal pages
 * ============================================================ */

/* ===================== CSS VARIABLES ===================== */
:root {
    /* Primary - Deep navy with richness */
    --postal-blue: #1e3a5f;
    --postal-blue-light: #2d5a87;
    --primary: #1e3a5f;
    --primary-light: #2d5a87;
    --primary-dark: #122740;
    --primary-soft: #e8f4fc;

    /* Gold - Rich, warm, prestigious */
    --gold: #b8860b;
    --gold-light: #d4a843;
    --gold-dark: #946b08;
    --gold-soft: #fdf8e8;

    /* Accent - Strong, confident blue */
    --accent: #2563eb;
    --accent-light: #3b82f6;
    --accent-dark: #1d4ed8;
    --accent-soft: #eff6ff;

    /* Status colors - Rich and saturated */
    --success: #166534;
    --success-light: #22c55e;
    --success-soft: #f0fdf4;
    --warning: #b45309;
    --warning-light: #f59e0b;
    --warning-soft: #fffbeb;
    --danger: #b91c1c;
    --danger-light: #f87171;
    --danger-soft: #fef2f2;
    --purple: #7c3aed;
    --purple-soft: #f5f3ff;

    /* Neutrals - Warm, sophisticated grays */
    --bg: #f8f9fb;
    --bg-alt: #f1f3f6;
    --bg-inset: #e8ebf0;
    --surface: #ffffff;
    --border: #d8dde6;
    --border-light: #e8ecf2;
    --text: #111827;
    --text-secondary: #374151;
    --text-muted: #6b7280;

    /* Sizing */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    /* Premium shadows - layered for depth */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow:
        0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 6px rgba(0, 0, 0, 0.04),
        0 8px 16px rgba(0, 0, 0, 0.04);
    --shadow-md:
        0 2px 4px rgba(0, 0, 0, 0.06), 0 8px 16px rgba(0, 0, 0, 0.08),
        0 16px 32px rgba(0, 0, 0, 0.04);
    --shadow-lg:
        0 4px 8px rgba(0, 0, 0, 0.06), 0 12px 24px rgba(0, 0, 0, 0.1),
        0 24px 48px rgba(0, 0, 0, 0.06);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.08);
    --shadow-elevated:
        0 0 0 1px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.08),
        0 8px 16px rgba(0, 0, 0, 0.08), 0 16px 32px rgba(0, 0, 0, 0.04);

    /* Layout */
    --sidebar-w: 270px;
    --topbar-h: 68px;
}

/* ===================== RESET & BASE ===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family:
        "Plus Jakarta Sans",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===================== SIDEBAR ===================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: linear-gradient(
        185deg,
        var(--primary) 0%,
        var(--primary-dark) 100%
    );
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow:
        4px 0 16px rgba(0, 0, 0, 0.15),
        1px 0 0 rgba(255, 255, 255, 0.05) inset;
}

/* Elegant texture overlay */
.sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            ellipse at 30% 0%,
            rgba(255, 255, 255, 0.08) 0%,
            transparent 50%
        ),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0v60M0 30h60' stroke='%23ffffff' stroke-opacity='0.03' stroke-width='1'/%3E%3C/svg%3E");
    pointer-events: none;
}

.sidebar-header {
    padding: 24px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.03) 0%,
        transparent 100%
    );
}

.brand-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(
        145deg,
        var(--gold-light) 0%,
        var(--gold) 50%,
        var(--gold-dark) 100%
    );
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 4px 12px rgba(184, 134, 11, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.brand-icon svg {
    width: 26px;
    height: 26px;
    fill: white;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-name {
    font-weight: 700;
    font-size: 16px;
    color: white;
    letter-spacing: -0.01em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.brand-sub {
    font-size: 10px;
    color: var(--gold-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 14px;
    overflow-y: auto;
}

.nav-group {
    margin-bottom: 28px;
}

.nav-group-title {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0 14px;
    margin-bottom: 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: rgba(255, 255, 255, 0.75);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    transition: all 0.2s ease;
    margin-bottom: 4px;
    text-decoration: none;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.nav-badge {
    margin-left: auto;
    background: linear-gradient(145deg, var(--gold-light), var(--gold));
    color: var(--primary-dark);
    font-size: 10px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 10px;
    min-width: 22px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(184, 134, 11, 0.3);
}

.sidebar-footer {
    padding: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(145deg, var(--gold-light), var(--gold));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(184, 134, 11, 0.3);
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-location {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}

.user-location svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 10px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.btn-logout:hover {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.3);
    color: #fca5a5;
}

.btn-logout svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ===================== MAIN LAYOUT ===================== */
.main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===================== TOPBAR ===================== */
.topbar {
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 24px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.8) inset,
        0 4px 12px rgba(0, 0, 0, 0.04);
}

.page-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.page-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===================== SEARCH ===================== */
.search-wrapper {
    flex: 1;
    max-width: 480px;
    position: relative;
    margin-left: 24px;
}

.search-box {
    width: 100%;
    display: flex;
    align-items: center;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0 14px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-inset);
}

.search-box:focus-within {
    background: var(--surface);
    border-color: var(--accent);
    box-shadow:
        0 0 0 3px var(--accent-soft),
        var(--shadow-sm);
}

.search-box svg {
    width: 18px;
    height: 18px;
    fill: var(--text-muted);
    flex-shrink: 0;
}

.search-box:focus-within svg {
    fill: var(--accent);
}

.search-input {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-shortcut {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 4px 8px;
    border-radius: 6px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

/* ===================== NOTIFICATION BELL ===================== */
.notification-bell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg-alt) 100%);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.notification-bell:hover {
    background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg-inset) 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.notification-bell svg {
    width: 20px;
    height: 20px;
    fill: var(--text-muted);
    transition: fill 0.15s;
}

.notification-bell:hover svg {
    fill: var(--text-secondary);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: linear-gradient(145deg, #ef4444, #dc2626);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
    animation: badgePop 0.3s ease;
}

.notification-badge.hidden {
    display: none;
}

@keyframes badgePop {
    0% {
        transform: scale(0);
    }
    70% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-height: 420px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.04),
        0 10px 20px rgba(0, 0, 0, 0.08),
        0 20px 40px rgba(0, 0, 0, 0.06);
    z-index: 100;
    display: none;
    overflow: hidden;
}

.notification-dropdown.show {
    display: block;
    animation: dropdownSlide 0.2s ease;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}

.notification-dropdown-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.mark-read-btn {
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.15s;
}

.mark-read-btn:hover {
    background: var(--accent-soft);
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background 0.15s;
}

.notification-item:hover {
    background: var(--bg);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread {
    background: var(--gold-soft);
}

.notification-item.unread:hover {
    background: #fef3c7;
}

.notification-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-icon.feature {
    background: linear-gradient(145deg, var(--success-soft), #dcfce7);
}

.notification-icon.feature svg {
    fill: var(--success);
}

.notification-icon.update {
    background: linear-gradient(145deg, var(--accent-soft), #dbeafe);
}

.notification-icon.update svg {
    fill: var(--accent);
}

.notification-icon svg {
    width: 18px;
    height: 18px;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.notification-version {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    background: var(--primary);
    color: white;
    border-radius: 4px;
}

.notification-text {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.notification-dropdown-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-light);
    background: var(--bg);
    text-align: center;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}

.view-all-btn:hover {
    background: var(--accent-soft);
}

.view-all-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.notification-empty {
    padding: 32px 16px;
    text-align: center;
}

.notification-empty svg {
    width: 40px;
    height: 40px;
    fill: var(--border);
    margin-bottom: 8px;
}

.notification-empty-text {
    font-size: 13px;
    color: var(--text-muted);
}

/* ===================== BUTTONS ===================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg-alt) 100%);
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.btn:hover {
    background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg-inset) 100%);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.btn:active {
    transform: translateY(1px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.btn-primary {
    background: linear-gradient(
        180deg,
        var(--primary-light) 0%,
        var(--primary) 100%
    );
    border: 1px solid var(--primary-dark);
    color: white;
    box-shadow:
        0 2px 4px rgba(30, 58, 95, 0.3),
        0 4px 8px rgba(30, 58, 95, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: linear-gradient(
        180deg,
        var(--primary) 0%,
        var(--primary-dark) 100%
    );
    box-shadow:
        0 4px 8px rgba(30, 58, 95, 0.35),
        0 8px 16px rgba(30, 58, 95, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-gold {
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
    border: 1px solid var(--gold-dark);
    color: #1a1a1a;
    box-shadow:
        0 2px 4px rgba(184, 134, 11, 0.3),
        0 4px 8px rgba(184, 134, 11, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.btn-gold:hover {
    background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
    box-shadow:
        0 4px 8px rgba(184, 134, 11, 0.4),
        0 8px 16px rgba(184, 134, 11, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-success {
    background: linear-gradient(
        180deg,
        var(--success-light) 0%,
        var(--success) 100%
    );
    border: 1px solid #14532d;
    color: white;
    box-shadow:
        0 2px 4px rgba(22, 101, 52, 0.3),
        0 4px 8px rgba(22, 101, 52, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-success:hover {
    background: linear-gradient(180deg, var(--success) 0%, #14532d 100%);
}

.btn-danger {
    background: linear-gradient(
        180deg,
        var(--danger-light) 0%,
        var(--danger) 100%
    );
    border: 1px solid #7f1d1d;
    color: white;
    box-shadow:
        0 2px 4px rgba(185, 28, 28, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-accent {
    background: linear-gradient(
        180deg,
        var(--accent-light) 0%,
        var(--accent) 100%
    );
    border: 1px solid var(--accent-dark);
    color: white;
    box-shadow:
        0 2px 4px rgba(37, 99, 235, 0.3),
        0 4px 8px rgba(37, 99, 235, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-accent:hover {
    background: linear-gradient(
        180deg,
        var(--accent) 0%,
        var(--accent-dark) 100%
    );
    box-shadow:
        0 4px 8px rgba(37, 99, 235, 0.4),
        0 8px 16px rgba(37, 99, 235, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--text-secondary);
    box-shadow: none;
}

.btn-ghost:hover {
    background: var(--bg-alt);
    color: var(--text);
    box-shadow: none;
}

.btn-purple {
    background: linear-gradient(135deg, var(--purple) 0%, #6d28d9 100%);
    border-color: var(--purple);
    color: white;
}

.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
}

.btn-sm svg {
    width: 14px;
    height: 14px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
}

/* ===================== CONTENT AREA ===================== */
.content {
    padding: 28px;
    flex: 1;
}

/* ===================== STATS GRID ===================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.06),
        0 4px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.stat-card:hover {
    box-shadow: var(--shadow-elevated);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 2px 4px rgba(0, 0, 0, 0.06);
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-card.blue .stat-icon {
    background: linear-gradient(180deg, var(--accent-soft) 0%, #dbeafe 100%);
}

.stat-card.blue .stat-icon svg {
    fill: var(--accent);
}

.stat-card.gold .stat-icon {
    background: linear-gradient(180deg, var(--warning-soft) 0%, #fef3c7 100%);
}

.stat-card.gold .stat-icon svg {
    fill: var(--warning);
}

.stat-card.green .stat-icon {
    background: linear-gradient(180deg, var(--success-soft) 0%, #dcfce7 100%);
}

.stat-card.green .stat-icon svg {
    fill: var(--success);
}

.stat-card.purple .stat-icon {
    background: linear-gradient(180deg, var(--purple-soft) 0%, #ede9fe 100%);
}

.stat-card.purple .stat-icon svg {
    fill: var(--purple);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 8px;
    padding: 3px 8px;
    border-radius: 6px;
}

.stat-change.up {
    background: var(--success-soft);
    color: var(--success);
}

.stat-change.down {
    background: var(--danger-soft);
    color: var(--danger);
}

.stat-change svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
}

/* ===================== TABS ===================== */
.tabs-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
}

.tabs {
    display: inline-flex;
    gap: 3px;
    background: var(--bg-alt);
    padding: 5px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-inset);
}

.tab {
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.6);
}

.tab.active {
    color: white;
    background: linear-gradient(
        180deg,
        var(--primary-light) 0%,
        var(--primary) 100%
    );
    box-shadow:
        0 2px 4px rgba(30, 58, 95, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.tab-badge {
    font-size: 10px;
    font-weight: 700;
    background: var(--bg-inset);
    color: var(--text-secondary);
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
}

.tab.active .tab-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.tabs-actions {
    display: flex;
    gap: 10px;
}

/* ===================== TABLE CARD ===================== */
.table-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.06),
        0 4px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}

.table-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.table-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.table-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-alt);
    padding: 5px 12px;
    border-radius: 6px;
}

.table-actions {
    display: flex;
    gap: 10px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead {
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}

th {
    padding: 14px 18px;
    text-align: left;
    font-weight: 700;
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
}

tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s;
}

tbody tr:last-child {
    border-bottom: none;
}

tbody tr:hover {
    background: var(--bg);
}

tbody tr.pkg-row {
    cursor: pointer;
}

tbody tr.pkg-row:hover {
    background: linear-gradient(90deg, var(--accent-soft) 0%, var(--bg) 100%);
}

td {
    padding: 18px 20px;
    vertical-align: middle;
}

.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg);
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ===================== BADGES ===================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.badge.parcel {
    background: linear-gradient(180deg, var(--purple-soft) 0%, #ede9fe 100%);
    color: var(--purple);
}

.badge.letter {
    background: linear-gradient(180deg, var(--accent-soft) 0%, #dbeafe 100%);
    color: var(--accent);
}

.badge.document {
    background: linear-gradient(180deg, var(--warning-soft) 0%, #fef3c7 100%);
    color: var(--warning);
}

.badge.box {
    background: linear-gradient(180deg, var(--accent-soft) 0%, #dbeafe 100%);
    color: var(--accent);
}

.badge.plastics {
    background: linear-gradient(180deg, #fce7f3 0%, #fbcfe8 100%);
    color: #be185d;
}

.badge.paper {
    background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

/* Service Request badges: COD, CP, BTA, OPS */
.badge.cod {
    background: linear-gradient(180deg, var(--warning-soft) 0%, #fef3c7 100%);
    color: var(--warning);
}

.badge.cp {
    background: linear-gradient(180deg, var(--success-soft) 0%, #dcfce7 100%);
    color: var(--success);
}

.badge.bta {
    background: linear-gradient(180deg, var(--purple-soft) 0%, #ede9fe 100%);
    color: var(--purple);
}

.badge.ops {
    background: linear-gradient(180deg, var(--primary-soft) 0%, #dbeafe 100%);
    color: var(--primary);
}

/* Package Type badges: Pickup, Delivery */
.badge.delivery {
    background: linear-gradient(180deg, var(--accent-soft) 0%, #dbeafe 100%);
    color: var(--accent);
}

.badge.pickup {
    background: linear-gradient(180deg, var(--purple-soft) 0%, #ede9fe 100%);
    color: var(--purple);
}

/* Payment Status Badges */
.badge.unpaid {
    background: linear-gradient(180deg, var(--danger-soft) 0%, #fee2e2 100%);
    color: var(--danger);
}

.badge.partial {
    background: linear-gradient(180deg, var(--warning-soft) 0%, #fef3c7 100%);
    color: var(--warning);
}

.badge.paid {
    background: linear-gradient(180deg, var(--success-soft) 0%, #dcfce7 100%);
    color: var(--success);
}

/* ===================== STATUS ===================== */
.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 4px currentColor;
}

.status.new {
    background: linear-gradient(180deg, var(--success-soft) 0%, #dcfce7 100%);
    color: var(--success);
}

.status.received {
    background: linear-gradient(180deg, var(--accent-soft) 0%, #dbeafe 100%);
    color: var(--accent);
}

.status.in-transit {
    background: linear-gradient(180deg, var(--warning-soft) 0%, #fef3c7 100%);
    color: var(--warning);
}

.status.ready {
    background: var(--success-soft);
    color: var(--success);
}

.status.delivered {
    background: var(--bg);
    color: var(--text-muted);
}

.status.pending {
    background: var(--purple-soft);
    color: var(--purple);
}

/* ===================== MODALS ===================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 24px;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--surface);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 720px;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.05),
        0 8px 24px rgba(0, 0, 0, 0.15),
        0 24px 48px rgba(0, 0, 0, 0.1),
        0 48px 96px rgba(0, 0, 0, 0.08);
    animation: modalPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--border);
}

.modal.lg {
    max-width: 900px;
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: translateY(-24px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-head {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
}

.modal-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.modal-icon svg {
    width: 26px;
    height: 26px;
}

.modal-icon.blue {
    background: linear-gradient(180deg, var(--accent-soft) 0%, #dbeafe 100%);
}

.modal-icon.blue svg {
    fill: var(--accent);
}

.modal-icon.gold {
    background: linear-gradient(180deg, var(--gold-soft) 0%, #fef3c7 100%);
}

.modal-icon.gold svg {
    fill: var(--gold);
}

.modal-icon.green {
    background: linear-gradient(180deg, var(--success-soft) 0%, #dcfce7 100%);
}

.modal-icon.green svg {
    fill: var(--success);
}

.modal-titles {
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.modal-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
}

.modal-close {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg-alt) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.modal-close:hover {
    background: linear-gradient(180deg, var(--danger-soft) 0%, #fecaca 100%);
    color: var(--danger);
    border-color: var(--danger);
}

.modal-close svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.modal-body {
    padding: 28px;
}

.modal-foot {
    padding: 20px 28px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* ===================== SUCCESS MODAL ===================== */
.success-modal {
    max-width: 420px;
    text-align: center;
}

.success-anim {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--success) 0%, #15803d 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 0 8px rgba(22, 163, 74, 0.15),
        0 0 0 16px rgba(22, 163, 74, 0.07),
        0 8px 24px rgba(22, 163, 74, 0.3);
    animation: successPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.success-anim svg {
    width: 40px;
    height: 40px;
    fill: white;
}

@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.success-text {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 16px;
}

.success-code {
    display: inline-block;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    background: linear-gradient(135deg, var(--accent-soft) 0%, #dbeafe 100%);
    padding: 10px 24px;
    border-radius: var(--radius);
    border: 1px solid rgba(37, 99, 235, 0.2);
    letter-spacing: 1px;
}

/* Tracking code preview input - locked read-only appearance */
#pkgCodeIn {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #9ca3af;
    background: #f1f5f9;
    border-color: transparent;
    cursor: not-allowed;
}

#pkgCodeIn:not([readonly]) {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border);
    cursor: text;
}
/* ===================== FORMS ===================== */
.form-section {
    margin-bottom: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
}

.form-section-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.form-section-icon svg {
    width: 18px;
    height: 18px;
}

.form-section-icon.blue {
    background: linear-gradient(180deg, var(--accent-soft) 0%, #dbeafe 100%);
}

.form-section-icon.blue svg {
    fill: var(--accent);
}

.form-section-icon.green {
    background: linear-gradient(180deg, var(--success-soft) 0%, #dcfce7 100%);
}

.form-section-icon.green svg {
    fill: var(--success);
}

.form-section-icon.purple {
    background: linear-gradient(180deg, var(--purple-soft) 0%, #ede9fe 100%);
}

.form-section-icon.purple svg {
    fill: var(--purple);
}

.form-section-icon.gold {
    background: linear-gradient(180deg, var(--gold-soft) 0%, #fef3c7 100%);
}

.form-section-icon.gold svg {
    fill: var(--gold);
}

.form-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full {
    grid-column: span 2;
}

.form-group.span-3 {
    grid-column: span 3;
}

.form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-label .req {
    color: var(--danger);
    font-weight: 700;
}

.form-input,
.form-select,
.form-textarea {
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
    color: var(--text);
    outline: none;
    transition: all 0.2s ease;
    box-shadow:
        var(--shadow-inset),
        0 1px 2px rgba(0, 0, 0, 0.04);
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    border-color: var(--border);
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg-alt) 100%);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--accent);
    background: var(--surface);
    box-shadow:
        0 0 0 3px var(--accent-soft),
        0 1px 2px rgba(0, 0, 0, 0.04);
}

.form-input.upper {
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.08em;
    font-size: 15px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280'%3E%3Cpath d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

.form-textarea {
    resize: vertical;
    min-height: 90px;
}

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===================== COMPACT MODAL ===================== */
.modal.compact .modal-head {
    padding: 14px 20px;
}

.modal.compact .modal-title-wrap {
    gap: 0;
}

.modal.compact .modal-title {
    font-size: 15px;
    font-weight: 700;
}

.modal.compact .modal-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal.compact .modal-body {
    padding: 16px 20px;
}

.modal.compact .compact-section {
    margin-bottom: 16px;
    border-radius: var(--radius);
    padding: 14px;
    border: 1px solid var(--border-light);
    background: linear-gradient(135deg, var(--surface) 0%, var(--bg) 100%);
}

.modal.compact .compact-section:last-child {
    margin-bottom: 0;
}

.modal.compact .compact-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    padding-bottom: 6px;
    padding-left: 10px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal.compact .compact-section-label::before {
    content: '';
    width: 3px;
    height: 14px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Package Info - blue accent */
.modal.compact .compact-section:first-child {
    border-left: 3px solid var(--accent);
}

.modal.compact .compact-section:first-child .compact-section-label {
    color: var(--accent-dark);
}

.modal.compact .compact-section:first-child .compact-section-label::before {
    background: var(--accent);
}

/* Sender - green accent */
.modal.compact .compact-people-row .compact-section:first-child {
    border-left: 3px solid var(--success-light);
}

.modal.compact .compact-people-row .compact-section:first-child .compact-section-label {
    color: var(--success);
}

.modal.compact .compact-people-row .compact-section:first-child .compact-section-label::before {
    background: var(--success-light);
}

/* Receiver - purple accent */
.modal.compact .compact-people-row .compact-section:last-child {
    border-left: 3px solid var(--purple);
}

.modal.compact .compact-people-row .compact-section:last-child .compact-section-label {
    color: var(--purple);
}

.modal.compact .compact-people-row .compact-section:last-child .compact-section-label::before {
    background: var(--purple);
}

/* Notes - gold accent */
.modal.compact > form > .modal-body > .compact-section:last-child {
    border-left: 3px solid var(--gold);
}

.modal.compact > form > .modal-body > .compact-section:last-child .compact-section-label {
    color: var(--gold-dark);
}

.modal.compact > form > .modal-body > .compact-section:last-child .compact-section-label::before {
    background: var(--gold);
}

.modal.compact .compact-people-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 16px;
}

.modal.compact .compact-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal.compact .form-input,
.modal.compact .form-select,
.modal.compact .form-textarea {
    padding: 8px 10px;
    font-size: 13px;
}

.modal.compact .form-input.upper {
    font-size: 13px;
}

.modal.compact .form-select {
    background-position: right 10px center;
    padding-right: 32px;
}

.modal.compact .form-label {
    font-size: 11px;
    letter-spacing: 0.05em;
}

.modal.compact .form-group {
    gap: 3px;
}

.modal.compact .form-grid {
    gap: 10px;
}

.modal.compact .form-hint {
    font-size: 10px;
}

.modal.compact .form-textarea {
    min-height: 52px;
}

.modal.compact .form-grid + .form-grid {
    margin-top: 10px;
}

.modal.compact .customer-profile-card {
    padding: 10px 12px;
    margin-top: 8px;
}

.modal.compact .customer-profile-card .profile-avatar {
    width: 30px;
    height: 30px;
    font-size: 13px;
}

.modal.compact .customer-profile-card .profile-name {
    font-size: 12px;
}

.modal.compact .customer-profile-card .profile-phone {
    font-size: 10px;
}

.modal.compact .customer-profile-card .profile-address {
    font-size: 10px;
    margin-top: 6px;
    padding-top: 6px;
}

.modal.compact .customer-profile-card .profile-use-btn {
    padding: 4px 10px;
    font-size: 11px;
}

.modal.compact .customer-notfound-card {
    padding: 8px 10px;
    margin-top: 8px;
}

.modal.compact .customer-notfound-card .notfound-message {
    font-size: 11px;
}

.modal.compact #pkgCodeIn {
    font-size: 13px;
}

@media (max-width: 900px) {
    .modal.compact .compact-people-row {
        grid-template-columns: 1fr;
    }
}

/* ===================== COMPACT DETAIL MODAL ===================== */

/* Header: inline title + code + status + actions */
.modal.compact .detail-head-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.modal.compact .detail-head-row .modal-title {
    white-space: nowrap;
}

.modal.compact .detail-head-code {
    font-size: 12px;
    font-weight: 600;
    font-family: "Courier New", monospace;
    color: var(--text-secondary);
    background: var(--bg);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-light);
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.modal.compact .detail-head-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.modal.compact .detail-head-actions .btn {
    padding: 5px 10px;
    font-size: 11px;
    gap: 4px;
    border-radius: 6px;
}

.modal.compact .detail-head-actions .btn svg {
    width: 13px;
    height: 13px;
}

/* Compact tabs */
.modal.compact .detail-tabs {
    padding: 0 16px;
}

.modal.compact .detail-tab {
    padding: 10px 16px;
    font-size: 0.78rem;
}

/* Compact detail content */
.modal.compact .detail-content {
    padding: 14px 16px;
}

/* Compact detail grid */
.modal.compact .detail-grid {
    gap: 12px;
}

.modal.compact .detail-section {
    gap: 12px;
}

/* Compact detail cards with color accents */
.modal.compact .detail-card {
    background: linear-gradient(135deg, var(--surface) 0%, var(--bg) 100%);
}

.modal.compact .detail-card-head {
    padding: 8px 12px;
}

.modal.compact .detail-card-title {
    font-size: 0.68rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal.compact .detail-card-title::before {
    content: '';
    width: 3px;
    height: 12px;
    border-radius: 2px;
    flex-shrink: 0;
}

.modal.compact .detail-rows {
    padding: 8px 12px;
}

.modal.compact .detail-row {
    padding: 5px 0;
}

.modal.compact .detail-label {
    font-size: 0.76rem;
}

.modal.compact .detail-value {
    font-size: 0.8rem;
}

/* Package Info card - blue */
.modal.compact .detail-card[data-accent="blue"] {
    border-left: 3px solid var(--accent);
}
.modal.compact .detail-card[data-accent="blue"] .detail-card-title {
    color: var(--accent-dark);
}
.modal.compact .detail-card[data-accent="blue"] .detail-card-title::before {
    background: var(--accent);
}

/* Route card - gold */
.modal.compact .detail-card[data-accent="gold"] {
    border-left: 3px solid var(--gold);
}
.modal.compact .detail-card[data-accent="gold"] .detail-card-title {
    color: var(--gold-dark);
}
.modal.compact .detail-card[data-accent="gold"] .detail-card-title::before {
    background: var(--gold);
}

/* Manifest card - orange */
.modal.compact .detail-card[data-accent="orange"] {
    border-left: 3px solid var(--warning);
}
.modal.compact .detail-card[data-accent="orange"] .detail-card-title {
    color: var(--warning);
}
.modal.compact .detail-card[data-accent="orange"] .detail-card-title::before {
    background: var(--warning);
}

/* Sender card - green */
.modal.compact .detail-card[data-accent="green"] {
    border-left: 3px solid var(--success-light);
}
.modal.compact .detail-card[data-accent="green"] .detail-card-title {
    color: var(--success);
}
.modal.compact .detail-card[data-accent="green"] .detail-card-title::before {
    background: var(--success-light);
}

/* Receiver card - purple */
.modal.compact .detail-card[data-accent="purple"] {
    border-left: 3px solid var(--purple);
}
.modal.compact .detail-card[data-accent="purple"] .detail-card-title {
    color: var(--purple);
}
.modal.compact .detail-card[data-accent="purple"] .detail-card-title::before {
    background: var(--purple);
}

/* Additional Info card - teal */
.modal.compact .detail-card[data-accent="teal"] {
    border-left: 3px solid #0d9488;
}
.modal.compact .detail-card[data-accent="teal"] .detail-card-title {
    color: #0d9488;
}
.modal.compact .detail-card[data-accent="teal"] .detail-card-title::before {
    background: #0d9488;
}

/* Compact route */
.modal.compact .route-visual {
    padding: 10px 12px;
}

.modal.compact .route-point {
    gap: 10px;
}

.modal.compact .route-dot {
    width: 12px;
    height: 12px;
    border-width: 2.5px;
    margin-top: 3px;
}

.modal.compact .route-line {
    height: 18px;
    margin: 4px 0 4px 5px;
}

.modal.compact .route-loc {
    font-size: 0.82rem;
}

.modal.compact .route-time {
    font-size: 0.7rem;
    margin-top: 2px;
}

/* Compact contacts */
.modal.compact .contact-block {
    padding: 10px 12px;
    gap: 10px;
}

.modal.compact .contact-avatar {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.modal.compact .contact-name-big {
    font-size: 0.85rem;
    margin-bottom: 3px;
}

.modal.compact .contact-detail {
    font-size: 0.75rem;
    margin-bottom: 3px;
    gap: 6px;
}

.modal.compact .contact-detail svg {
    width: 12px;
    height: 12px;
}

/* Compact edit tab */
.modal.compact .edit-notice {
    font-size: 12px;
    padding: 10px 14px;
    margin-bottom: 12px;
}

.modal.compact #editFormSection {
    padding: 14px;
}

.modal.compact #editFormSection .form-grid {
    margin-top: 10px !important;
}

.modal.compact #editFormSection .form-grid:first-child {
    margin-top: 0 !important;
}

/* Hide detail footer when compact */
.modal.compact .detail-footer {
    display: none;
}

/* Compact detail responsive */
@media (max-width: 1200px) {
    .modal.compact .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .modal.compact .detail-head-actions {
        flex-wrap: wrap;
        gap: 4px;
    }
    .modal.compact .detail-head-actions .btn {
        padding: 4px 8px;
        font-size: 10px;
    }
}

/* ===================== CUSTOMER CARDS ===================== */
.customer-notfound-card {
    background: var(--warning-soft);
    border: 1px solid var(--warning);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    animation: fadeSlideIn 0.25s ease;
}

.customer-notfound-card .notfound-message {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--warning);
}

.customer-notfound-card .notfound-message svg {
    width: 18px;
    height: 18px;
    fill: var(--warning);
    flex-shrink: 0;
}

.customer-profile-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-top: 12px;
    animation: fadeSlideIn 0.25s ease;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-xs);
}

.customer-profile-card:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: var(--shadow-sm);
}

.customer-profile-card .profile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.customer-profile-card .profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.customer-profile-card .profile-info {
    flex: 1;
    min-width: 0;
}

.customer-profile-card .profile-name {
    font-weight: 700;
    color: var(--text);
    font-size: 14px;
    margin-bottom: 2px;
}

.customer-profile-card .profile-phone {
    font-size: 12px;
    color: var(--text-muted);
}

.customer-profile-card .profile-address {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.customer-profile-card .profile-address svg {
    width: 14px;
    height: 14px;
    fill: var(--text-muted);
    flex-shrink: 0;
    margin-top: 1px;
}

.customer-profile-card .profile-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.customer-profile-card .profile-hint {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.customer-profile-card .profile-hint svg {
    width: 12px;
    height: 12px;
    fill: var(--accent);
}

.customer-profile-card .profile-use-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.customer-profile-card .profile-use-btn:hover {
    background: var(--accent-dark);
}

.customer-profile-card .profile-use-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================== TOAST ===================== */
.toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: var(--text);
    color: white;
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.2),
        0 12px 24px rgba(0, 0, 0, 0.15);
    z-index: 1100;
    animation: toastSlide 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.success {
    background: linear-gradient(
        180deg,
        var(--success-light) 0%,
        var(--success) 100%
    );
}

.toast.error {
    background: linear-gradient(
        180deg,
        var(--danger-light) 0%,
        var(--danger) 100%
    );
}

.toast svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

@keyframes toastSlide {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===================== SPINNER ===================== */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===================== EMPTY STATE ===================== */
.empty {
    text-align: center;
    padding: 72px 32px;
}

.empty-icon {
    width: 88px;
    height: 88px;
    background: linear-gradient(135deg, var(--bg) 0%, var(--surface) 100%);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    border: 2px dashed var(--border);
}

.empty-icon svg {
    width: 40px;
    height: 40px;
    fill: var(--text-muted);
}

.empty-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}

.empty-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ===================== DROPDOWNS ===================== */
.dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    z-index: 100;
    display: none;
    padding: 8px;
    animation: dropIn 0.2s ease;
}

.dropdown.show {
    display: block;
}

@keyframes dropIn {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}

.dropdown-item:hover {
    background: var(--bg);
}

.dropdown-item svg {
    width: 18px;
    height: 18px;
    fill: var(--text-muted);
}

.dropdown-item.danger {
    color: var(--danger);
}

.dropdown-item.danger svg {
    fill: var(--danger);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

/* ===================== ACTION MENU ===================== */
.action-menu {
    position: relative;
    display: inline-block;
}

.action-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow);
    transform: scale(1.05);
}

.action-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.actions-cell {
    width: 60px;
    text-align: right;
    padding-right: 24px;
}

/* ===================== TABLE CELL STYLES ===================== */
.pkg-code {
    font-weight: 800;
    color: var(--primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    transition: color 0.2s;
}

.pkg-code:hover {
    color: var(--accent);
}

.contact {
    max-width: 200px;
}

.contact-name {
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.contact-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-phone,
.contact-addr {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-phone svg,
.contact-addr svg {
    width: 11px;
    height: 11px;
    fill: currentColor;
    flex-shrink: 0;
}

.route {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--bg) 0%, var(--surface) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    box-shadow: var(--shadow-xs);
}

.route svg {
    width: 14px;
    height: 14px;
    fill: var(--text-muted);
    flex-shrink: 0;
}

.route-arrow {
    color: var(--accent);
    font-weight: 800;
}

.price {
    font-weight: 800;
    color: var(--success);
    font-size: 0.9rem;
}

.date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.date small {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

/* ===================== VIEWS ===================== */
.view {
    display: none;
}

.view.active {
    display: block;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .sidebar {
        display: none;
    }

    .main {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full,
    .form-group.span-3 {
        grid-column: span 1;
    }

    .form-grid.cols-3 {
        grid-template-columns: 1fr;
    }
}

/* =====================================================================
 * DASHBOARD DETAIL MODAL STYLES
 * These were in the old dashboard.html <style> block but got stripped
 * during migration. Paste into dashboard.html <style> tag or add to app.css
 * ===================================================================== */

/* Detail Modal Tabs */
.detail-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    background: var(--bg);
    padding: 0 24px;
}
.detail-tab {
    padding: 16px 24px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}
.detail-tab:hover {
    color: var(--text);
}
.detail-tab.active {
    color: var(--postal-blue);
}
.detail-tab.active::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--postal-blue);
    border-radius: 3px 3px 0 0;
}

/* Detail Content Panels */
.detail-content {
    display: none;
    padding: 24px;
}
.detail-content.active {
    display: block;
}

/* Detail Grid Layout */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.detail-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Detail Cards */
.detail-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.detail-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}
.detail-card-title {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

/* Detail Rows */
.detail-rows {
    padding: 16px 18px;
}
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}
.detail-row:last-child {
    border-bottom: none;
}
.detail-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}
.detail-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}
.detail-value.font-mono {
    font-family: "Courier New", monospace;
    letter-spacing: 0.05em;
}
.detail-value.price {
    color: var(--success);
}

/* Route Visual */
.route-visual {
    padding: 20px 18px;
}
.route-point {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.route-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid;
    flex-shrink: 0;
    margin-top: 4px;
}
.route-dot.from {
    border-color: var(--postal-blue);
    background: var(--accent-soft);
}
.route-dot.to {
    border-color: var(--success);
    background: var(--success-soft);
}
.route-line {
    width: 2px;
    height: 32px;
    background: linear-gradient(180deg, var(--postal-blue), var(--success));
    margin-left: 7px;
    margin: 8px 0 8px 7px;
}
.route-info {
    flex: 1;
}
.route-loc {
    font-weight: 700;
    color: var(--text);
    font-size: 0.95rem;
    display: block;
}
.route-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
}

/* Contact Block */
.contact-block {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px;
}
.contact-avatar {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
}
.contact-avatar.sender {
    background: linear-gradient(
        135deg,
        var(--postal-blue),
        var(--postal-blue-light)
    );
}
.contact-avatar.receiver {
    background: linear-gradient(135deg, var(--success), var(--success-light));
}
.contact-info-block {
    flex: 1;
}
.contact-name-big {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}
.contact-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.contact-detail svg {
    width: 14px;
    height: 14px;
    fill: var(--text-muted);
    flex-shrink: 0;
}

/* Activity Logs */
.logs-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 0 8px;
}
.log-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}
.log-item:last-child {
    border-bottom: none;
}
.log-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--bg);
    border: 1px solid var(--border);
}
.log-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--text-muted);
}
.log-icon.status {
    background: var(--warning-soft);
}
.log-icon.status svg {
    fill: var(--warning);
}
.log-icon.payment {
    background: var(--success-soft);
}
.log-icon.payment svg {
    fill: var(--success);
}
.log-icon.transfer {
    background: var(--purple-soft);
}
.log-icon.transfer svg {
    fill: var(--purple);
}
.log-content {
    flex: 1;
}
.log-title {
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.log-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.log-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}
.log-empty {
    padding: 48px;
    text-align: center;
    color: var(--text-muted);
}

/* Edit Notice */
.edit-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--warning-soft);
    border: 1px solid var(--warning);
    border-radius: var(--radius);
    margin-bottom: 24px;
    color: var(--warning);
    font-weight: 600;
    font-size: 0.9rem;
}
.edit-notice svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    flex-shrink: 0;
}

/* Detail Footer */
.detail-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-left {
    display: flex;
    gap: 12px;
}
.footer-right {
    display: flex;
    gap: 10px;
}

/* Button Variants */
.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #b91c1c 100%);
    border-color: var(--danger);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}
.btn-danger:hover {
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
}
.btn-purple {
    background: linear-gradient(135deg, var(--purple) 0%, #6d28d9 100%);
    border-color: var(--purple);
    color: white;
}

/* Payments Tab */
.payments-tab-container {
    padding: 16px;
}
.payments-loading,
.payments-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}
.payments-empty svg {
    width: 48px;
    height: 48px;
    fill: var(--text-muted);
    margin-bottom: 12px;
}
.payments-summary {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--bg-alt);
    border-radius: var(--radius);
}
.payments-summary-item {
    text-align: center;
    flex: 1;
}
.payments-summary-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}
.payments-summary-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}
.payments-summary-value.success {
    color: var(--success);
}
.payment-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    margin-bottom: 8px;
}
.payment-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--success-light), var(--success));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.payment-icon svg {
    fill: white;
    width: 18px;
    height: 18px;
}
.payment-info {
    flex: 1;
    min-width: 0;
}
.payment-amount {
    font-size: 16px;
    font-weight: 700;
    color: var(--success);
}
.payment-meta {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.payment-method {
    padding: 2px 8px;
    background: var(--bg-alt);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}
.payment-actions {
    display: flex;
    gap: 6px;
}
.sidebar-version {
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 12px;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.payment-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: var(--bg-alt);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.payment-action-btn:hover {
    background: var(--primary);
}
.payment-action-btn:hover svg {
    fill: white;
}
.payment-action-btn svg {
    fill: var(--text-secondary);
    width: 16px;
    height: 16px;
}
.payment-action-btn.danger:hover {
    background: var(--danger);
}

/* Responsive */
@media (max-width: 1200px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 900px) {
    .detail-footer {
        flex-direction: column;
        gap: 16px;
    }
    .footer-right {
        flex-wrap: wrap;
        justify-content: center;
    }
}
