@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;700&display=swap');

:root {
    --bg-900: #0f172a;
    --bg-800: #1e293b;
    --card: #ffffff;
    --card-stroke: #e2e8f0;
    --text-strong: #1e293b;
    --text-subtle: #64748b;
    --accent: #6366f1; /* Indigo 500 */
    --accent-hover: #4f46e5;
    --shadow-strong: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #f8fafc;
    color: var(--text-strong);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.011em;
}

h1, h2, h3, .brand-font {
    font-family: 'Inter', system-ui, sans-serif;
    letter-spacing: -0.025em;
    font-weight: 700;
}

body.app-shell {
    background: #f1f5f9;
}

/* Cleaner Header */
.app-header {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
}

.auth-shell main,
.auth-shell header {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.surface-card {
    background: var(--card);
    border: 1px solid var(--card-stroke);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

body.app-shell .bg-white {
    background: var(--card) !important;
    border-color: var(--card-stroke) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-soft) !important;
}

body.app-shell .shadow-sm { box-shadow: var(--shadow-soft) !important; }
body.app-shell .shadow-lg { box-shadow: var(--shadow-strong) !important; }

/* Refined Inputs */
input, select, textarea {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    border-radius: 8px; /* Slightly tighter radius for inputs */
    color: var(--text-strong); /* Ensure text is dark */
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05); /* Subtle inner depth */
}

input:hover, select:hover, textarea:hover {
    border-color: #94a3b8;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15); /* Soft focus ring */
    background: #ffffff;
}

/* Modern Buttons */
button, .btn {
    font-weight: 600;
    border-radius: 8px;
    letter-spacing: -0.01em;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

button:hover:not(:disabled), .btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

button:active:not(:disabled), .btn:active:not(:disabled) {
    transform: translateY(0px);
    box-shadow: none;
}

.btn-primary, .bg-gray-900, .bg-slate-900, .bg-blue-600, .bg-indigo-600 {
    background-color: var(--bg-900) !important; /* Unified dark button */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.bg-emerald-600 {
    background-color: #059669 !important;
}

.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(226, 232, 240, 0.8);
    color: var(--text-subtle);
}

.table {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: rgba(241, 245, 249, 0.6);
    border-collapse: separate;
    border-spacing: 0;
}

.table thead {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}



/* --- TABLE POLISH --- */
.table {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15,23,42,0.06);
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin-bottom: 0;
}
.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: var(--accent);
    background: #f1f5f9;
    padding: 0.85rem 1.2rem;
    border-bottom: 2px solid #e2e8f0;
    border-top: none;
}
.table tbody td {
    padding: 0.85rem 1.2rem;
    color: var(--text-strong);
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.97rem;
    background: #fff;
    border-top: none;
}
.table tbody tr:last-child td {
    border-bottom: none;
}
.table tbody tr {
    transition: background 0.15s;
}
.table tbody tr:hover {
    background: #f3f4f6;
}
.table td, .table th {
    vertical-align: middle;
    border-right: none;
}
.table th:first-child, .table td:first-child {
    border-top-left-radius: var(--radius-lg);
    border-bottom-left-radius: var(--radius-lg);
}
.table th:last-child, .table td:last-child {
    border-top-right-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}

/* Remove background and border from sticky cells for a flat look */
.table .sticky {
    background: transparent !important;
    box-shadow: none !important;
}

/* Remove blue backgrounds from table content */
.table .bg-blue-100,
.table .bg-blue-50 {
    background: #f1f5f9 !important;
    color: var(--accent) !important;
    font-weight: 600;
    border-radius: 6px;
    padding: 0.2em 0.7em;
    font-size: 0.93em;
}

/* Remove blue from table header backgrounds */
.table th {
    background: #f1f5f9 !important;
}

.card-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

#mobile-menu {
    backdrop-filter: blur(18px);
    background: rgba(15, 23, 42, 0.85);
    box-shadow: var(--shadow-strong);
}

.table-container,
.overflow-x-auto {
    scrollbar-width: thin;
}

.overflow-x-auto::-webkit-scrollbar,
body::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.overflow-x-auto::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.55);
    border-radius: 999px;
}

.app-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.1);
    color: #4c1d95;
    font-weight: 600;
}

.stat-spotlight {
    position: relative;
    overflow: hidden;
}

.stat-spotlight::after {
    content: '';
    position: absolute;
    inset: -10%;
    background: radial-gradient(circle at 40% 0%, rgba(124, 58, 237, 0.08), transparent 40%);
    pointer-events: none;
}

.glow-border {
    position: relative;
}

.glow-border::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(120deg, rgba(124, 58, 237, 0.35), rgba(6, 182, 212, 0.35));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.fab-action {
    position: fixed;
    bottom: 18px;
    right: 18px;
    z-index: 60;
    background: linear-gradient(135deg, #7c3aed, #06b6d4);
    color: white;
    padding: 14px 18px;
    border-radius: 14px;
    box-shadow: 0 18px 36px rgba(6, 182, 212, 0.35);
}

.toast-modern {
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-soft);
}
