@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body.admin-body {
    font-family: 'Inter', 'Microsoft YaHei', sans-serif;
    background-color: #F0F2F5;
}

.sidebar-item-active {
    background-color: #1890FF;
    color: white;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(24, 144, 255, 0.14), transparent 24%),
        linear-gradient(180deg, #f5f7fb 0%, #eef2f8 100%);
}

.login-card {
    width: min(460px, calc(100vw - 24px));
    padding: 32px;
    border-radius: 20px;
    background: white;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.login-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #1677ff;
    display: grid;
    place-items: center;
}

.login-kicker {
    margin: 0 0 4px;
    color: #1677ff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.login-card h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: #111827;
}

.login-copy {
    margin: 18px 0 0;
    color: #6b7280;
    line-height: 1.8;
}

.login-form {
    display: grid;
    gap: 16px;
    margin-top: 22px;
}

.login-form label {
    display: grid;
    gap: 8px;
}

.login-form span {
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.login-form input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #f9fafb;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.login-form input:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
}

.login-submit {
    margin-top: 6px;
    padding: 14px 18px;
    border: 0;
    border-radius: 12px;
    background: #1677ff;
    color: white;
    font-weight: 700;
    cursor: pointer;
}

.logout-btn {
    border: 0;
    border-radius: 10px;
    padding: 8px 14px;
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

#detail-panel {
    min-height: 420px;
}

.detail-empty {
    height: 100%;
    min-height: 320px;
    display: grid;
    place-content: center;
    text-align: center;
    color: #9ca3af;
}

.detail-card {
    display: grid;
    gap: 18px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 14px;
    align-items: center;
}

.detail-thumb {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    object-fit: cover;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}

.detail-thumb-fallback {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: #f3f4f6;
    color: #1677ff;
    font-size: 30px;
}

.visual-fallback {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #f3f4f6;
    color: #1677ff;
    font-size: 20px;
    border: 1px solid #e5e7eb;
}

.detail-card h3 {
    margin: 0;
    color: #111827;
    font-size: 24px;
    letter-spacing: -0.03em;
}

.detail-card p {
    margin: 6px 0 0;
    color: #6b7280;
    line-height: 1.7;
}

.detail-grid {
    display: grid;
    gap: 14px;
}

.detail-section {
    padding: 16px;
    border-radius: 16px;
    background: #f9fafb;
    border: 1px solid #eef2f7;
}

.detail-section h4 {
    margin: 0 0 12px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.detail-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed #e5e7eb;
}

.detail-row:last-child {
    border-bottom: 0;
}

.detail-label {
    color: #6b7280;
    font-size: 13px;
}

.detail-value {
    color: #111827;
    font-weight: 600;
    word-break: break-word;
    white-space: pre-wrap;
}

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

.detail-btn {
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.detail-btn.mark-paid {
    background: rgba(22, 119, 255, 0.12);
    color: #1677ff;
}

.detail-btn.retry {
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
}

.detail-btn.cancel {
    background: rgba(239, 68, 68, 0.14);
    color: #b91c1c;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-chip.unpaid { background: #fff7ed; color: #c2410c; }
.status-chip.paid,
.status-chip.delivered,
.status-chip.completed { background: #ecfdf3; color: #047857; }
.status-chip.pending,
.status-chip.processing,
.status-chip.waiting_online { background: #eff6ff; color: #1d4ed8; }
.status-chip.retry,
.status-chip.expired,
.status-chip.cancelled { background: #fef2f2; color: #b91c1c; }

.visual-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.visual-chip {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 12px;
    background: white;
    border: 1px solid #e5e7eb;
}

.visual-image {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 12px;
    background: #f9fafb;
    padding: 6px;
}

.visual-meta {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.visual-meta strong {
    color: #111827;
    font-size: 13px;
    line-height: 1.35;
    word-break: break-word;
}

.visual-meta span {
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.order-row-active {
    background: #eff6ff !important;
}

.toast-stack {
    position: fixed;
    right: 22px;
    bottom: 22px;
    display: grid;
    gap: 10px;
    z-index: 60;
}

.toast {
    min-width: 280px;
    max-width: min(420px, calc(100vw - 24px));
    padding: 14px 16px;
    border-radius: 14px;
    color: white;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.22);
}

.toast.info { background: #111827; }
.toast.success { background: #047857; }
.toast.error { background: #b91c1c; }
