:root {
    --bg: #060816;
    --panel: rgba(15, 23, 42, 0.84);
    --text: #f8f6ff;
    --muted: #9fa8c7;
    --accent: #8b5cf6;
    --accent-2: #22d3ee;
    --border: rgba(255, 255, 255, 0.14);
    --surface: rgba(255, 255, 255, 0.05);
    --input-bg: rgba(6, 10, 24, 0.65);
    --input-text: #f8f6ff;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top left, rgba(139,92,246,0.28), transparent 26%), linear-gradient(135deg, #03040c 0%, #090f25 100%);
    min-height: 100vh;
    transition: background 0.25s ease, color 0.25s ease;
}

body {
    background: radial-gradient(circle at top left, rgba(139,92,246,0.28), transparent 26%), linear-gradient(135deg, #03040c 0%, #090f25 100%);
}

.page-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 20px 60px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    margin-bottom: 22px;
    background: rgba(14, 20, 44, 0.9);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 22px;
    box-shadow: 0 18px 48px rgba(0,0,0,0.14);
}

.login-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 28px 26px;
    margin-bottom: 22px;
    background: rgba(34, 40, 74, 0.96);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 28px;
}

.login-banner .hero-copy {
    max-width: 540px;
}

.large-cta {
    min-width: 220px;
    padding: 16px 24px;
    font-size: 1rem;
}

.header-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--text);
}

.site-tag {
    text-transform: uppercase;
    letter-spacing: 0.35em;
    color: var(--accent-2);
    font-size: 0.75rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-cta,
.login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    padding: 12px 20px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 18px 38px rgba(139,92,246,0.18);
}

.ghost-btn {
    background: rgba(255,255,255,0.08);
    color: var(--text);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.topbar-cta,
.hero-cta,
.large-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    color: white;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 18px 38px rgba(139,92,246,0.18);
}

.floating-login {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 24px 64px rgba(139,92,246,0.25);
}

.secondary-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    background: rgba(255,255,255,0.08);
    color: var(--text);
    border: 1px solid var(--border);
}

.hero-card, .status-card {
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: 0 24px 80px rgba(2, 8, 23, 0.16);
    backdrop-filter: blur(18px);
    border-radius: 28px;
    transition: transform 0.2s ease, border-color 0.2s ease;
    color: var(--text);
}

.status-card:hover, .hero-card:hover, .order-card:hover, .kanban-card:hover {
    transform: translateY(-2px);
    border-color: rgba(34, 211, 238, 0.32);
}

.hero-card {
    padding: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.35em;
    font-size: 0.78rem;
    color: var(--accent-2);
    margin: 0 0 8px;
}

h1, h2, p { margin: 0; }

h1 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.2;
    margin-bottom: 8px;
}

.hero-copy {
    color: var(--muted);
    max-width: 640px;
    line-height: 1.7;
}

.search-bar {
    display: flex;
    gap: 12px;
    background: var(--surface);
    padding: 12px;
    border-radius: 16px;
    min-width: min(420px, 100%);
    flex-wrap: wrap;
}

.search-bar input, .search-bar select, .admin-form input, .admin-form select, .admin-form textarea, .share-link-input {
    flex: 1;
    border: 1px solid var(--border);
    background: var(--input-bg);
    border-radius: 12px;
    padding: 12px 14px;
    color: var(--input-text);
    outline: none;
}

.admin-form textarea {
    width: 100%;
    min-height: 110px;
    resize: vertical;
}

.search-bar button, .submit-btn, .ghost-btn, .action-links button {
    border: 0;
    cursor: pointer;
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    text-decoration: none;
}

.status-card {
    padding: 28px;
    margin-bottom: 24px;
}

.card-header, .table-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.status-pill {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.16);
    color: #0f766e;
    font-size: 0.95rem;
}

.progress-block { margin-bottom: 24px; }
.progress-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: var(--muted);
}
.progress-bar {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.detail-box {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
}
.detail-box span {
    display: block;
    color: var(--muted);
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.admin-shell { max-width: 1280px; }
.admin-header { margin-bottom: 18px; }
.ghost-btn { background: rgba(255,255,255,0.08); }
.theme-toggle { display: none !important; }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    padding: 20px;
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.08);
}
.stat-card.stat-warning { background: linear-gradient(145deg, rgba(250, 204, 21, 0.18), rgba(250, 204, 21, 0.08)); }
.stat-card.stat-urgent { background: linear-gradient(145deg, rgba(248, 113, 113, 0.18), rgba(248, 113, 113, 0.08)); }
.stat-card.stat-accent { background: linear-gradient(145deg, rgba(34, 211, 238, 0.16), rgba(34, 211, 238, 0.06)); }
.stat-label {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.stat-value {
    font-size: 1.85rem;
    line-height: 1.1;
}
.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--muted);
    background: rgba(255,255,255,0.04);
    border: 1px solid transparent;
}
.nav-link.active {
    color: white;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: transparent;
}
.share-link-box {
    margin-top: 18px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(34, 211, 238, 0.16);
    background: rgba(34, 211, 238, 0.08);
}
.share-link-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.share-link-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.share-link-input {
    flex: 1;
    min-width: 280px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 12px 14px;
    background: rgba(6, 10, 24, 0.65);
    color: var(--text);
}
.featured-announcement {
    background: linear-gradient(145deg, rgba(36, 99, 235, 0.16), rgba(56, 189, 248, 0.08));
}
.priority-info {
    background: rgba(34, 211, 238, 0.16);
    color: #bef7ff;
}
.admin-card { margin-bottom: 20px; }
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--muted);
}
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 12px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.08); }
th { color: var(--muted); font-weight: 600; }
.action-links { display: flex; gap: 8px; align-items: center; }
.inline-form { display: inline-flex; }
.action-links button { padding: 8px 12px; background: rgba(255,255,255,0.09); color: var(--text); }
.message-box {
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(34,211,238,0.12);
    color: #0f766e;
    margin-bottom: 16px;
}
.empty-state, .empty-text { text-align: center; color: var(--muted); }

.order-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.order-card {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.order-card h3, .kanban-card h4 {
    margin-bottom: 6px;
}

.order-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.priority-badge {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    color: #111827;
}

.priority-urgent {
    background: rgba(248, 113, 113, 0.18);
    color: #7f1d1d;
}

.priority-high {
    background: rgba(250, 204, 21, 0.18);
    color: #713f12;
}

.priority-normal {
    background: rgba(34, 211, 238, 0.16);
    color: #0f766e;
}

.progress-block.compact .progress-meta {
    font-size: 0.92rem;
    margin-bottom: 8px;
}

.muted {
    color: var(--muted);
}

h2, h3, h4, strong, span, p, li, td, th, label {
    color: inherit;
}

.chip {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-size: 0.82rem;
}

.order-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.note-text {
    margin-top: 12px;
    line-height: 1.6;
}

.order-actions {
    margin-top: 12px;
}

.detail-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
}

.detail-link.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    font-weight: 600;
}

.reset-filter {
    text-align: center;
    white-space: nowrap;
}

.delivery-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #111827;
}

.delivery-badge.large {
    padding: 10px 16px;
    font-size: 0.95rem;
}

.delivery-urgent {
    background: rgba(248, 113, 113, 0.18);
    color: #7f1d1d;
}

.delivery-warning {
    background: rgba(250, 204, 21, 0.18);
    color: #713f12;
}

.delivery-normal {
    background: rgba(34, 211, 238, 0.16);
    color: #0f766e;
}

.order-card.card-delivery-urgent {
    border-left: 4px solid #f87171;
    box-shadow: inset 4px 0 0 rgba(248, 113, 113, 0.15);
}

.order-card.card-delivery-warning {
    border-left: 4px solid #facc15;
    box-shadow: inset 4px 0 0 rgba(250, 204, 21, 0.12);
}

.order-card.card-delivery-normal {
    border-left: 4px solid rgba(34, 211, 238, 0.5);
}

.featured-announcement {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(34, 211, 238, 0.14));
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.featured-announcement.priority-warning {
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.18), rgba(248, 113, 113, 0.1));
}

.featured-announcement.priority-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(34, 211, 238, 0.12));
}

.featured-announcement-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.featured-body {
    line-height: 1.7;
    margin-bottom: 16px;
}

.detail-hero {
    margin-bottom: 24px;
}

.delivery-alert-card {
    border-width: 1px;
    border-style: solid;
}

.delivery-alert-card.delivery-urgent {
    border-color: rgba(248, 113, 113, 0.35);
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.12), rgba(15, 23, 42, 0.84));
}

.delivery-alert-card.delivery-warning {
    border-color: rgba(250, 204, 21, 0.35);
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.1), rgba(15, 23, 42, 0.84));
}

.delivery-alert-card.delivery-normal {
    border-color: rgba(34, 211, 238, 0.25);
}

.delivery-alert-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.stage-timeline {
    display: grid;
    gap: 0;
    position: relative;
}

.stage-step {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 16px;
    padding-bottom: 24px;
    position: relative;
}

.stage-step:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 13px;
    top: 28px;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.stage-step.complete:not(:last-child)::before {
    background: linear-gradient(180deg, var(--accent-2), rgba(255, 255, 255, 0.1));
}

.stage-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    margin-top: 2px;
}

.stage-step.complete .stage-dot {
    background: var(--accent-2);
    border-color: var(--accent-2);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.15);
}

.stage-step.current .stage-dot {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: transparent;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2);
}

.stage-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 4px;
}

.stage-step.current .stage-content strong {
    color: #fff;
}

.history-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.history-item {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 16px;
    padding-bottom: 20px;
    position: relative;
}

.history-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 18px;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.history-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    margin-top: 6px;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.history-body {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.history-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.history-meta {
    margin-top: 6px;
    font-size: 0.9rem;
}

.history-timeline.compact .history-body {
    padding: 10px 12px;
}

.history-admin-block {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.history-admin-block h3 {
    margin: 0 0 16px;
    font-size: 1.1rem;
}

.history-form {
    margin-top: 16px;
}

.note-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(15, 23, 42, 0.84));
}

.empty-state.compact {
    padding: 20px 0;
}

.empty-state.compact p {
    color: var(--muted);
}

.priority-info {
    background: rgba(34, 211, 238, 0.16);
    color: #bef7ff;
}

.priority-success {
    background: rgba(34, 197, 94, 0.18);
    color: #bbf7d0;
}

.priority-warning {
    background: rgba(250, 204, 21, 0.18);
    color: #fde68a;
}

.announcement-banner {
    margin-bottom: 24px;
}

.announcement-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.16), rgba(34, 211, 238, 0.12));
    border: 1px solid rgba(255, 255, 255, 0.12);
}

@media (max-width: 780px) {
    .hero-card { flex-direction: column; align-items: flex-start; }
    .search-bar { width: 100%; flex-direction: column; }
    .detail-grid, .form-grid { grid-template-columns: 1fr; }
    .card-header, .table-head { flex-direction: column; align-items: flex-start; }
    .order-grid { grid-template-columns: 1fr; }
    .delivery-alert-inner, .featured-announcement-inner, .history-top {
        flex-direction: column;
        align-items: flex-start;
    }
    .order-card {
        padding: 20px;
    }
    .order-top h3 {
        font-size: 1.05rem;
        word-break: break-word;
    }
}
