:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: rgba(25, 25, 25, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent-color: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.4);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

.admin-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background-image: radial-gradient(circle at top right, rgba(99, 102, 241, 0.15), transparent 40%),
                      radial-gradient(circle at bottom left, rgba(139, 92, 246, 0.1), transparent 40%);
}

.sidebar {
    width: 260px;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(16px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 200;
}

.sidebar-header {
    padding: 1.5rem 2rem;
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #a1a1aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 1rem;
}

.nav-links {
    list-style: none;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.nav-links li a:hover, .nav-links li a.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-links li a.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-color);
    border-left: 3px solid var(--accent-color);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.main-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.navbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 1rem 3rem;
    background: transparent;
    position: sticky;
    top: 0;
    z-index: 100;
}

.spacer {
    flex: 1;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
}

.btn-logout {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.1);
}

main {
    flex: 1;
    padding: 1rem 3rem 3rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.glass-panel {
    background: var(--bg-secondary);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

h2 {
    font-weight: 600;
    letter-spacing: -0.5px;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

input, select {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-primary:hover {
    background: #4f46e5;
    box-shadow: 0 0 15px var(--accent-glow);
    transform: translateY(-2px);
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

th {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
}

tr {
    transition: background-color 0.2s ease;
}

tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-active {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

/* Modal Styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0, 0, 0, 0.6); 
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-primary);
    background-image: radial-gradient(circle at top right, rgba(99, 102, 241, 0.1), transparent 60%);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2.5rem;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    box-shadow: 0 15px 50px rgba(0,0,0,0.5);
    position: relative;
    animation: modalFadeIn 0.3s ease-out forwards;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.modal-content::-webkit-scrollbar {
    display: none;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.close-btn:hover {
    color: white;
}

.modal-header {
    margin-bottom: 2rem;
}
