:root {
    --bg-dark: #030712;
    --bg-darker: #020617;
    --sidebar-bg: rgba(15, 23, 42, 0.4);
    --card-bg: rgba(30, 41, 59, 0.3);
    --glass-border: rgba(148, 163, 184, 0.1);
    --glass-border-hover: rgba(148, 163, 184, 0.2);
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-dark);
    background-image: radial-gradient(circle at 50% 0%, var(--bg-darker) 0%, var(--bg-dark) 100%);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-left: 0.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-link:hover, .nav-link.active {
    background: var(--card-bg);
    color: var(--text-primary);
    transform: translateX(4px);
    border: 1px solid var(--glass-border-hover);
}

.nav-link.active {
    border-left: 4px solid var(--accent);
    background: rgba(59, 130, 246, 0.1);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 3rem 4rem;
    overflow-y: auto;
    background: transparent;
}

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

.title {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.date {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 24px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--glass-border-hover);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 1rem 0;
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Forms & Tables */
.card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    margin-bottom: 2rem;
}

.table, .data-table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .data-table th {
    text-align: left;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td, .data-table td {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 0.95rem;
    vertical-align: middle;
}

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

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.39);
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
}

.btn-danger { 
    background: rgba(239, 68, 68, 0.1); 
    color: var(--danger); 
}
.btn-danger:hover { 
    background: var(--danger);
    color: #fff;
    opacity: 0.9;
}

/* Status Badges & Dots */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-new         { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.status-reviewed    { background: rgba(234, 179, 8, 0.15);  color: #fbbf24; }
.status-shortlisted { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.status-rejected    { background: rgba(239, 68, 68, 0.15);  color: #f87171; }
.status-unread      { background: rgba(239, 68, 68, 0.15);  color: #f87171; }
.status-read        { background: rgba(234, 179, 8, 0.15);  color: #fbbf24; }
.status-replied     { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.status-archived    { background: rgba(100, 116, 139, 0.15); color: #94a3b8; }

.dot-new         { background: #60a5fa; }
.dot-reviewed    { background: #fbbf24; }
.dot-shortlisted { background: #34d399; }
.dot-rejected    { background: #f87171; }
.dot-unread      { background: #f87171; }
.dot-read        { background: #fbbf24; }
.dot-replied     { background: #34d399; }
.dot-archived    { background: #94a3b8; }

/* Input fields */
.form-group {
    margin-bottom: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-label, label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control, input, textarea, select {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-control:focus, input:focus, textarea:focus, select:focus {
    border-color: var(--accent);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

select option {
    background: var(--bg-dark);
    color: white;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    font-weight: 500;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--success);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.main-content > * {
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
