:root {
    --primary: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.2);
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg-main: #f1f5f9;
    --card-bg: rgba(255, 255, 255, 0.9);
    --nav-bg: rgba(255, 255, 255, 0.82);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border: #e2e8f0;
    --radius-lg: 1rem;
    --radius-md: 0.75rem;
    --shadow-main: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
}

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem;
}

.admin-main {
    flex-grow: 1;
    min-width: 0;
}

/* Glassmorphism Header */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.025em;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Premium Card */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-main);
    padding: 1.8rem;
}

/* Sidebar Styling */
.sidebar-nav {
    list-style: none;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 0.25rem;
}

.sidebar-nav li a i {
    width: 20px;
    margin-right: 12px;
}

.sidebar-nav li a:hover {
    background: rgba(139, 92, 246, 0.05);
    color: var(--primary);
}

.sidebar-nav li a.active {
    background: var(--primary);
    color: white !important;
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Enhanced Search Bar */
.search-container {
    display: flex;
    align-items: center;
    background: white;
    padding: 0.6rem 1.2rem;
    border-radius: 9999px;
    border: 2px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.search-container:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    width: 320px;
}

.search-input {
    border: none;
    background: transparent;
    outline: none;
    padding: 0.25rem 0.5rem;
    width: 100%;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.7rem 1.4rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px var(--primary-glow);
}

/* Modern Table */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

thead th {
    text-align: left;
    padding: 0.8rem 1rem;
    background: #f8fafc;
    color: var(--secondary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    border-bottom: 2px solid var(--border);
}

thead th:first-child {
    border-top-left-radius: var(--radius-md);
}

thead th:last-child {
    border-top-right-radius: var(--radius-md);
}

td {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
    vertical-align: middle;
}

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

tr:hover td {
    background: rgba(139, 92, 246, 0.03);
}

/* Status Badges */
.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* Action Links */
.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 0.6rem;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text-secondary);
}

.action-icon:hover {
    background: #f1f5f9;
    transform: scale(1.15) rotate(5deg);
}

/* Form Styling */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
    outline: none;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}