/* ==================== BASE ==================== */
* { box-sizing: border-box; }
body { -webkit-font-smoothing: antialiased; }

.brand-logo {
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 10px 24px rgba(244, 63, 94, 0.18));
}

.brand-logo-auth {
    width: 88px;
    height: 88px;
}

.brand-logo-sidebar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

/* ==================== CARDS ==================== */
.card {
    background: linear-gradient(135deg, rgba(13, 17, 23, 0.95), rgba(22, 27, 38, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 14px;
}

/* ==================== INPUTS ==================== */
.input {
    width: 100%;
    background: rgba(8, 12, 21, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    color: #e5e7eb;
    font-size: 0.8rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus {
    border-color: rgba(236, 72, 153, 0.4);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.08);
}
.input::placeholder { color: rgba(156, 163, 175, 0.35); }
textarea.input { resize: vertical; font-family: 'Courier New', monospace; }
select.input { cursor: pointer; }
.label { display: block; font-size: 0.7rem; color: #9ca3af; margin-bottom: 0.3rem; font-weight: 500; }

/* ==================== BUTTONS ==================== */
.btn-pink {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1.2rem;
    background: linear-gradient(135deg, #ec4899, #db2777);
    color: white; font-size: 0.8rem; font-weight: 600;
    border-radius: 8px; border: none; cursor: pointer;
    transition: all 0.2s; box-shadow: 0 2px 12px rgba(236, 72, 153, 0.2);
}
.btn-pink:hover { box-shadow: 0 4px 20px rgba(236, 72, 153, 0.35); transform: translateY(-1px); }
.btn-pink:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-danger {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    background: rgba(239, 68, 68, 0.12); color: #f87171;
    font-weight: 500; border-radius: 8px; border: 1px solid rgba(239, 68, 68, 0.15);
    cursor: pointer; transition: all 0.2s; font-size: 0.75rem;
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.2); }

/* ==================== STATUS BADGES ==================== */
.status-badge {
    display: inline-block; padding: 0.12rem 0.45rem;
    border-radius: 5px; font-size: 0.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em;
}
.status-running, .status-approved { background: rgba(34, 197, 94, 0.12); color: #4ade80; }
.status-pending { background: rgba(234, 179, 8, 0.12); color: #facc15; }
.status-completed, .status-success { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }
.status-partial { background: rgba(236, 72, 153, 0.12); color: #f472b6; }
.status-failed, .status-failure, .status-suspended { background: rgba(239, 68, 68, 0.12); color: #f87171; }
.status-stopped { background: rgba(156, 163, 175, 0.12); color: #9ca3af; }

/* ==================== LOG ==================== */
.log-line { line-height: 1.5; }
.log-info { color: #d1d5db; }
.log-success { color: #4ade80; }
.log-error { color: #f87171; background: rgba(239, 68, 68, 0.04); }
.log-warn, .log-warning { color: #facc15; }

/* ==================== NAV ==================== */
.nav-item svg { width: 18px; height: 18px; }

/* ==================== ANNOUNCEMENT ==================== */
.announcement-scroll {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 30s linear infinite;
    padding-left: 100%;
}
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ==================== SCROLLBAR ==================== */
.custom-scroll::-webkit-scrollbar { width: 4px; height: 4px; }
.custom-scroll::-webkit-scrollbar-track { background: transparent; }
.custom-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.06); border-radius: 3px; }
.custom-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.12); }

/* ==================== ANIMATIONS ==================== */
.fade-in { animation: fadeIn 0.25s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.spinner {
    width: 14px; height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==================== TOAST ==================== */
.toast { min-width: 260px; backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, 0.04); }
.toast-success { background: rgba(34, 197, 94, 0.12); color: #4ade80; }
.toast-error { background: rgba(239, 68, 68, 0.12); color: #f87171; }
.toast-info { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }

/* ==================== HELPERS ==================== */
.empty-state { text-align: center; padding: 1.5rem 0; font-size: 0.7rem; color: #374151; }

/* ==================== TABLE ==================== */
table th { font-weight: 500; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.04em; }

/* ==================== TOKIUM-STYLE PANELS ==================== */
.tokium-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background:
        radial-gradient(circle at top right, rgba(244, 63, 94, 0.10), transparent 34%),
        linear-gradient(180deg, rgba(24, 24, 27, 0.96), rgba(9, 9, 11, 0.96));
}

.tokium-hero-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.tokium-kicker {
    color: #71717a;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-weight: 700;
}

.tokium-title {
    font-size: 1.85rem;
    line-height: 1.1;
    font-weight: 700;
    color: #fafafa;
}

.tokium-subtitle {
    max-width: 44rem;
    color: #a1a1aa;
    font-size: 0.92rem;
    line-height: 1.6;
}

.tokium-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(244, 63, 94, 0.22);
    background: rgba(244, 63, 94, 0.08);
    color: #fda4af;
    font-size: 0.72rem;
    font-weight: 600;
}

.tokium-surface {
    background: linear-gradient(180deg, rgba(24, 24, 27, 0.96), rgba(9, 9, 11, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.tokium-stat-card {
    padding: 1.15rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(180deg, rgba(24, 24, 27, 0.94), rgba(15, 15, 18, 0.94));
}

.tokium-stat-label {
    font-size: 0.66rem;
    font-weight: 700;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.tokium-stat-value {
    margin-top: 0.7rem;
    color: #fafafa;
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1;
}

.tokium-stat-note {
    margin-top: 0.55rem;
    color: #a1a1aa;
    font-size: 0.75rem;
}

.tokium-section-title {
    color: #fafafa;
    font-size: 0.95rem;
    font-weight: 600;
}

.tokium-section-subtitle {
    margin-top: 0.25rem;
    color: #71717a;
    font-size: 0.76rem;
}

.tokium-mini-panel {
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
}

.tokium-row-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    color: #e4e4e7;
    font-size: 0.8rem;
    text-align: left;
    transition: border-color 0.2s, background 0.2s;
}

.tokium-row-action:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.tokium-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
}

.tokium-selectable-row {
    padding: 0.95rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
    margin-bottom: 0.75rem;
}

.tokium-selectable-row:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.tokium-selectable-row-active {
    border-color: rgba(244, 63, 94, 0.28);
    background: rgba(244, 63, 94, 0.08);
}

.tokium-progress {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
}

.tokium-progress-bar {
    height: 100%;
    border-radius: inherit;
    transition: width 0.25s ease;
}

.tokium-metric-box {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.8rem 0.9rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    color: #a1a1aa;
}

.tokium-metric-box strong {
    font-size: 1rem;
    font-weight: 700;
}

.tokium-log-pane {
    border-radius: 16px;
    background: rgba(5, 5, 6, 0.54);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0.3rem;
}

.tokium-table thead tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #71717a;
}

.tokium-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.2s;
}

.tokium-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.btn-zinc,
.btn-zinc-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 0.95rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.btn-zinc {
    background: rgba(255, 255, 255, 0.03);
    color: #e4e4e7;
}

.btn-zinc:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.btn-zinc-danger {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.14);
    color: #fda4af;
}

.btn-zinc-danger:hover {
    background: rgba(239, 68, 68, 0.14);
}

@media (max-width: 1024px) {
    .tokium-hero {
        flex-direction: column;
    }

    .tokium-hero-side {
        width: 100%;
        align-items: flex-start;
    }
}
