/* ClearOrbit — Custom styles beyond Tailwind */

:root {
    --bg: #0a0a0a;
    --card: #111111;
    --border: #1f1f1f;
    --border-subtle: #27272a;
    --text: #f4f4f5;
    --muted: #71717a;
    --brand: #7c3aed;
    --brand-dark: #6d28d9;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
}

/* Glass card — no backdrop-filter (GPU performance) */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 24px;
}

.glass-card-sm {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 16px;
}

/* Brand gradient button */
.btn-brand {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: filter 150ms ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-brand:hover { filter: brightness(1.1); }
.btn-brand:disabled { opacity: 0.6; cursor: not-allowed; filter: none; }

/* Secondary button */
.btn-secondary {
    background: transparent;
    color: #f4f4f5;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    border: 1px solid #27272a;
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease;
}
.btn-secondary:hover { background: #1f1f1f; border-color: #3f3f46; }

/* Danger button */
.btn-danger {
    background: transparent;
    color: #ef4444;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    border: 1px solid #ef4444/30;
    cursor: pointer;
    transition: background 150ms ease;
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.1); }

/* Form inputs */
.input-field {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid #27272a;
    border-radius: 8px;
    padding: 0.625rem 0.875rem;
    color: #f4f4f5;
    font-size: 0.875rem;
    transition: border-color 150ms ease;
    outline: none;
}
.input-field::placeholder { color: #52525b; }
.input-field:focus { border-color: #7c3aed; }

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}
.badge-success { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.badge-danger  { background: rgba(239, 68, 68, 0.15);  color: #ef4444; }
.badge-brand   { background: rgba(124, 58, 237, 0.15); color: #9d5ff3; }
.badge-muted   { background: rgba(113, 113, 122, 0.15); color: #a1a1aa; }

/* Data table */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #1f1f1f;
}
.data-table td {
    padding: 0.875rem 1rem;
    font-size: 0.8125rem;
    color: #f4f4f5;
    border-bottom: 1px solid #1f1f1f;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 150ms ease;
}
.modal-backdrop.open { opacity: 1; }
.modal-box {
    background: #111111;
    border: 1px solid #1f1f1f;
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Fade in */
.fade-in { animation: fadeIn 150ms ease forwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Stat card */
.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #27272a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3f3f46; }

/* Admin layout */
.admin-content {
    margin-left: 0;
    transition: margin-left 150ms ease;
}
@media (min-width: 1024px) {
    .admin-content { margin-left: 14rem; }
}

/* Platform color dot */
.platform-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(124, 58, 237, 0.3);
    border-top-color: #7c3aed;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast notification */
#toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}
.toast {
    background: #111111;
    border: 1px solid #27272a;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    color: #f4f4f5;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: fadeIn 150ms ease forwards;
    pointer-events: all;
    max-width: 360px;
}
.toast-success { border-color: rgba(34, 197, 94, 0.3); }
.toast-error   { border-color: rgba(239, 68, 68, 0.3); }
.toast-warning { border-color: rgba(245, 158, 11, 0.3); }

/* Tabs */
.tab-nav { display: flex; gap: 0.25rem; border-bottom: 1px solid #1f1f1f; }
.tab-btn {
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #71717a;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 150ms ease, border-color 150ms ease;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}
.tab-btn.active { color: #7c3aed; border-bottom-color: #7c3aed; }
.tab-btn:hover:not(.active) { color: #f4f4f5; }

/* Pagination */
.pagination { display: flex; align-items: center; gap: 0.5rem; }
.page-btn {
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    border: 1px solid #27272a;
    color: #71717a;
    transition: all 150ms ease;
}
.page-btn:hover:not(:disabled) { background: #1f1f1f; color: #f4f4f5; }
.page-btn.active { background: #7c3aed; border-color: #7c3aed; color: white; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
