:root {
    --bg-color: #0B0E14;
    --panel-bg: rgba(22, 27, 34, 0.65);
    --panel-border: rgba(255, 255, 255, 0.08);
    --text-primary: #F0F6FC;
    --text-secondary: #8B949E;
    --primary-blue: #2F81F7;
    --primary-blue-hover: #1F6FEB;
    --success-green: #3FB950;
    --danger-red: #F85149;
    --warning-orange: #D29922;
    --premium-purple: #A371F7;
    --glass-blur: blur(16px);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(47, 129, 247, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(163, 113, 247, 0.08) 0%, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
}

.hidden {
    display: none !important;
}

.highlight {
    color: var(--primary-blue);
}

/* Glassmorphism Panels */
.glass-panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 16px;
}

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success-green);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    z-index: 9999;
    animation: slideIn 0.3s ease-out forwards;
}

.toast.error {
    background: var(--danger-red);
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Login View */
#login-view {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: var(--glass-blur);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 24px 48px rgba(0,0,0,0.4);
}

.logo-area {
    margin-bottom: 30px;
}

.icon-box {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-blue), #A371F7);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(47, 129, 247, 0.3);
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.input-group input {
    width: 100%;
    padding: 14px 14px 14px 44px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    transition: all 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: rgba(0,0,0,0.4);
}

button {
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--primary-blue-hover);
    transform: translateY(-2px);
}

/* Dashboard View */
#dashboard-view {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    border-radius: 0;
    border-top: none;
    border-bottom: none;
    border-left: none;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 10;
}

.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    border-bottom: 1px solid var(--panel-border);
}

.sidebar-nav {
    padding: 20px 12px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.nav-item.active {
    color: white;
    background: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(47, 129, 247, 0.2);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--panel-border);
}

.btn-danger-outline {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--danger-red);
    color: var(--danger-red);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-danger-outline:hover {
    background: var(--danger-red);
    color: white;
}

.main-content {
    flex-grow: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 72px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--panel-border);
    backdrop-filter: var(--glass-blur);
    position: sticky;
    top: 0;
    z-index: 5;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.admin-profile img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.content-wrapper {
    padding: 32px;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.stat-card {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.blue { background: rgba(47, 129, 247, 0.15); color: var(--primary-blue); }
.stat-icon.purple { background: rgba(163, 113, 247, 0.15); color: var(--premium-purple); }
.stat-icon.green { background: rgba(63, 185, 80, 0.15); color: var(--success-green); }
.stat-icon.orange { background: rgba(210, 153, 34, 0.15); color: var(--warning-orange); }

.stat-info h3 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 500;
}

.stat-info p {
    font-size: 28px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

.mt-20 { margin-top: 24px; }

/* Tables */
.panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--panel-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-box input {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--panel-border);
    padding: 8px 12px 8px 36px;
    border-radius: 8px;
    color: white;
    width: 250px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary-blue);
    font-size: 14px;
}

.table-container {
    overflow-x: auto;
}

.table-container.large {
    min-height: 500px;
}

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

.data-table th, .data-table td {
    padding: 16px 24px;
    text-align: left;
    border-bottom: 1px solid var(--panel-border);
}

.data-table th {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.data-table td {
    font-size: 15px;
}

.user-cell {
    display: flex;
    flex-direction: column;
}

.user-email {
    font-size: 13px;
    color: var(--text-secondary);
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge.premium {
    background: rgba(163, 113, 247, 0.15);
    color: var(--premium-purple);
    border: 1px solid rgba(163, 113, 247, 0.3);
}

.badge.normal {
    background: rgba(139, 148, 158, 0.15);
    color: var(--text-secondary);
    border: 1px solid rgba(139, 148, 158, 0.3);
}

/* Form */
.notification-composer {
    max-width: 800px;
}

.form-group {
    padding: 20px 24px;
    border-bottom: 1px solid var(--panel-border);
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 12px 16px;
    color: white;
    font-family: 'Inter', sans-serif;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.form-group select option {
    background: var(--bg-color);
    color: white;
}

#notification-form .btn-primary {
    margin: 20px 24px;
    width: auto;
    padding: 12px 24px;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0,0,0,0.5);
    animation: slideUp 0.3s ease-out;
}

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

.modal-actions {
    padding: 20px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: rgba(0,0,0,0.2);
}

.modal-actions button {
    width: auto;
    padding: 10px 20px;
}

.border-danger {
    border-color: var(--danger-red);
}

.bg-danger {
    background: var(--danger-red);
}
.bg-danger:hover {
    background: #c9302c;
}
.text-danger {
    color: var(--danger-red);
}

/* Action Buttons */
.btn-action {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-notif { background: rgba(47, 129, 247, 0.2); color: var(--primary-blue); }
.btn-notif:hover { background: var(--primary-blue); color: white; }

.btn-edit { background: rgba(163, 113, 247, 0.2); color: var(--premium-purple); }
.btn-edit:hover { background: var(--premium-purple); color: white; }

.btn-delete { background: rgba(248, 81, 73, 0.2); color: var(--danger-red); }
.btn-delete:hover { background: var(--danger-red); color: white; }

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}
.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255,255,255,0.1);
  transition: .4s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
}
input:checked + .slider {
  background-color: var(--primary-blue);
}
input:checked + .slider:before {
  transform: translateX(22px);
}
.slider.round {
  border-radius: 34px;
}
.slider.round:before {
  border-radius: 50%;
}

/* Timeline */
.timeline {
    border-left: 2px solid var(--panel-border);
    padding-left: 20px;
    margin-left: 10px;
}
.timeline-item {
    position: relative;
    margin-bottom: 20px;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -27px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: var(--primary-blue);
    border-radius: 50%;
    border: 3px solid var(--panel-bg);
}
.timeline-date {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.timeline-title {
    font-size: 14px;
    font-weight: 500;
}
.timeline-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* App Icon */
.app-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(255,255,255,0.05);
}

