@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Core Palette - Deep Space / Cyberpunk Support */
    --bg-dark: #0f172a;
    --bg-gradient-start: #0f0c29;
    --bg-gradient-mid: #302b63;
    --bg-gradient-end: #24243e;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --blur-strength: 16px;

    /* Accents */
    --primary-color: #6366f1;
    /* Indigo */
    --primary-glow: rgba(99, 102, 241, 0.5);
    --secondary-color: #ec4899;
    /* Pink */
    --success-color: #10b981;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    /* Spacing - Compacted */
    --radius-lg: 16px;
    --radius-md: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-mid), var(--bg-gradient-end));
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    font-size: 14px;
    /* Default smaller */
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Utilities */
.container-center {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

.dashboard-layout {
    max-width: 1400px;
    width: 98%;
    margin: 1rem auto;
    animation: slideIn 0.6s ease-out;
}

/* Glass Card Component */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-strength));
    -webkit-backdrop-filter: blur(var(--blur-strength));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--glass-shadow);
    width: 100%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: skewX(-25deg);
    transition: 0.5s;
    pointer-events: none;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card-wide {
    max-width: 100%;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
}

/* Typography */
h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.5px;
}

input {
    width: 100%;
    padding: 0.6rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    background: rgba(15, 23, 42, 0.8);
}

input::placeholder {
    color: rgba(148, 163, 184, 0.4);
}

/* Icons within inputs handling */
.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-with-icon input {
    padding-left: 3rem;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary-color), #4f46e5);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
    background: linear-gradient(135deg, #4f46e5, var(--primary-color));
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Dashboard Elements */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.nav-brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-brand i {
    color: var(--primary-color);
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(30, 41, 59, 0.6);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.stat-info h3 {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.2rem;
}

.stat-info p {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
}

/* Modern Table */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.3);
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

th {
    text-align: left;
    padding: 0.8rem 1rem;
    background: rgba(20, 30, 46, 0.95);
    /* Darker header like image */
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--glass-border);
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-main);
    font-size: 0.85rem;
    transition: background 0.2s;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

tr:last-child td {
    border-bottom: none;
}

/* Status Badges */
.badge-id {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    padding: 0.2rem 0.5rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.status-dot {
    height: 6px;
    width: 6px;
    background-color: var(--success-color);
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    box-shadow: 0 0 6px var(--success-color);
}

/* Error Message */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(239, 68, 68, 0.2);
    margin-bottom: 1.5rem;
    display: none;
    font-size: 0.9rem;
    text-align: center;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .glass-card {
        padding: 1.5rem;
    }

    th,
    td {
        padding: 0.75rem;
    }

    .stat-card {
        padding: 0.75rem;
    }
}