:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #ec4899;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0, transparent 50%),
        radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.1) 0, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    z-index: 10;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    box-shadow: var(--glass-shadow);
    padding: 2.5rem;
    animation: fadeIn 0.8s ease-out;
}

.logo {
    text-align: center;
    margin-bottom: 2rem;
}

.logo h1 {
    font-size: 2.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.025em;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.btn-primary {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 1rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.footer-text {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-text a {
    color: var(--primary);
    text-decoration: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Background elements for depth */
.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--primary);
    filter: blur(120px);
    border-radius: 50%;
    z-index: -1;
    background-clip: padding-box;
    opacity: 0.1;
    animation: move 20s infinite alternate;
}

@keyframes move {
    from { transform: translate(-10%, -10%); }
    to { transform: translate(10%, 10%); }
}

/* Admin Dashboard Styles */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.sidebar {
    width: 280px;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--glass-border);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    z-index: 20;
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    list-style: none;
    flex-grow: 1;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover, .nav-link.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-main);
}

.nav-link i {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.main-content {
    flex-grow: 1;
    padding: 2.5rem;
    overflow-y: auto;
    position: relative;
    z-index: 10;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

/* Data Tables */
.data-table-container {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    border-radius: 1rem;
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    padding: 1rem 1.5rem;
    background: rgba(15, 23, 42, 0.4);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-main);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 1.25rem;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary { background: rgba(99, 102, 241, 0.2); color: #818cf8; }
.badge-success { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.badge-danger { background: rgba(239, 68, 68, 0.2); color: #f87171; }

/* Buttons Small */
.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Console Styles */
.console-wrapper {
    display: flex;
    flex-direction: column;
    height: 600px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 1rem;
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

#console-output {
    flex-grow: 1;
    padding: 1.5rem;
    font-family: 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.875rem;
    color: #e2e8f0;
    overflow-y: auto;
    white-space: pre-wrap;
    line-height: 1.5;
}

#console-output .line {
    margin-bottom: 0.25rem;
}

.console-input-wrapper {
    display: flex;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.4);
    border-top: 1px solid var(--glass-border);
}

.console-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: monospace;
    font-size: 1rem;
    padding: 0.5rem;
}

.console-input:focus {
    outline: none;
}

.terminal-prompt {
    color: var(--primary);
    margin-right: 0.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
}
