/* ============================================================
   CEBU JIMNY COMMUNITY - ADMIN STYLES
   Dark theme admin dashboard with matching design system
   ============================================================ */

/* ----- CSS CUSTOM PROPERTIES ----- */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --text-primary: #f0f0f5;
    --text-secondary: #9090a5;
    --text-muted: #606078;
    --accent: #e87a2e;
    --accent-light: #f09a5e;
    --accent-dark: #c05a1e;
    --accent-glow: rgba(232, 122, 46, 0.3);
    --border: #1e1e2e;
    --border-accent: #2a2a40;
    --success: #22c55e;
    --error: #ef4444;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 8px 32px rgba(0,0,0,0.4);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.6);
    --shadow-accent: 0 4px 20px rgba(232, 122, 46, 0.2);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --max-width: 1100px;
}

/* ----- RESET & BASE ----- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; }

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

.hidden { display: none !important; }

/* ----- BUTTONS ----- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-full { width: 100%; justify-content: center; }

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(232, 122, 46, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--border-accent);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(232, 122, 46, 0.08);
}

.btn-outline.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(232, 122, 46, 0.1);
}

.btn-danger {
    background: transparent;
    color: var(--error);
    border: 1.5px solid var(--error);
}

.btn-danger:hover {
    background: var(--error);
    color: #fff;
}

/* ============================================================
   LOGIN SCREEN
   ============================================================ */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(232, 122, 46, 0.06) 0%, transparent 60%),
        var(--bg-primary);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    margin-bottom: 24px;
}

.login-logo .logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    margin: 0 auto;
    box-shadow: var(--shadow-accent);
}

.login-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.login-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 13px;
    color: var(--error);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-form {
    text-align: left;
    margin-bottom: 24px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.login-form .form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 15px;
    transition: var(--transition);
    outline: none;
}

.login-form .form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232, 122, 46, 0.1);
}

.login-footer {
    margin-bottom: 20px;
}

.login-back {
    font-size: 13px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.login-back:hover {
    color: var(--accent);
}

.login-hint {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.login-hint code {
    background: var(--bg-primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--accent);
}

/* ============================================================
   SIDEBAR TOGGLE BUTTON (shared)
   ============================================================ */
.sidebar-toggle-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 18px;
}

.sidebar-toggle-btn:hover {
    background: var(--bg-card);
    color: var(--accent);
}

/* ============================================================
   MOBILE HEADER
   ============================================================ */
.admin-mobile-header {
    display: none;
    position: sticky;
    top: 0;
    z-index: 101;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    align-items: center;
    justify-content: space-between;
}

.admin-mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 16px;
}

.admin-mobile-link {
    color: var(--text-muted);
    font-size: 16px;
    padding: 6px;
}

.admin-mobile-link:hover {
    color: var(--accent);
}

/* ============================================================
   LAYOUT CONTAINER
   ============================================================ */
.admin {
    display: flex;
    min-height: 100vh;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transition: width var(--transition), transform var(--transition);
    overflow: hidden;
}

.sidebar.collapsed {
    width: 64px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 16px 20px;
    border-bottom: 1px solid var(--border);
    min-height: 64px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    white-space: nowrap;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    transition: opacity var(--transition);
}

.sidebar.collapsed .sidebar-brand-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.sidebar-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo-icon.small {
    width: 36px;
    height: 36px;
    font-size: 16px;
    flex-shrink: 0;
}

.sidebar-collapse-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    font-size: 12px;
    flex-shrink: 0;
}

.sidebar-collapse-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.sidebar.collapsed .sidebar-collapse-btn {
    transform: rotate(180deg);
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    white-space: nowrap;
    position: relative;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 16px;
    flex-shrink: 0;
}

.sidebar-link .sidebar-link-text {
    transition: opacity var(--transition);
}

.sidebar.collapsed .sidebar-link .sidebar-link-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-link:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: rgba(232, 122, 46, 0.12);
    color: var(--accent-light);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}

.sidebar-badge {
    margin-left: auto;
    padding: 2px 8px;
    background: rgba(232, 122, 46, 0.15);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-light);
    transition: opacity var(--transition);
}

.sidebar.collapsed .sidebar-badge {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

/* Sidebar divider & label */
.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 16px 12px 12px;
}

.sidebar-label {
    padding: 4px 12px 8px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: opacity var(--transition);
}

.sidebar.collapsed .sidebar-label {
    opacity: 0;
    height: 0;
    overflow: hidden;
    padding: 0;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 12px 8px;
    border-top: 1px solid var(--border);
}

.sidebar-logout {
    color: var(--error) !important;
}

.sidebar-logout:hover {
    background: rgba(239, 68, 68, 0.1) !important;
}

/* Sidebar Overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.sidebar-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* ============================================================
   TOP BAR
   ============================================================ */
.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-page-title h2 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.topbar-page-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-badge {
    padding: 4px 12px;
    background: rgba(232, 122, 46, 0.1);
    border: 1px solid rgba(232, 122, 46, 0.2);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-light);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.admin-main {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left var(--transition);
}

.sidebar.collapsed ~ .admin-main {
    margin-left: 64px;
}

.admin-content {
    flex: 1;
    padding: 32px;
}

/* ============================================================
   PAGE SYSTEM
   ============================================================ */
.admin-page {
    display: none;
    animation: pageIn 0.3s ease;
}

.admin-page.active {
    display: block;
}

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

.admin-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.admin-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-section-title {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-section-title i {
    color: var(--accent);
    font-size: 16px;
}

.admin-section-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* Toggle switch */
.toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    padding: 4px 0;
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-switch {
    width: 36px;
    height: 20px;
    background: var(--border-accent);
    border-radius: 100px;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-label input:checked + .toggle-switch {
    background: rgba(232, 122, 46, 0.3);
}

.toggle-label input:checked + .toggle-switch::after {
    left: 19px;
    background: var(--accent);
}

.toggle-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    transition: var(--transition);
}

.toggle-label input:checked ~ .toggle-text {
    color: var(--accent);
}

/* ============================================================
   EVENT FORM
   ============================================================ */
.event-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-row {
    margin-bottom: 20px;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.required { color: var(--error); }

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 14px;
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232, 122, 46, 0.1);
}

.form-input::placeholder { color: var(--text-muted); }

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239090a5' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

select.form-input option {
    background: var(--bg-primary);
    color: var(--text-primary);
}

input[type="number"].form-input {
    -moz-appearance: textfield;
}

input[type="number"].form-input::-webkit-inner-spin-button,
input[type="number"].form-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

/* Checkbox */
.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: normal;
    padding: 8px 0;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-accent);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.checkbox-label input:checked + .checkbox-custom {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox-label input:checked + .checkbox-custom::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 11px;
    color: #fff;
}

/* ============================================================
   EVENTS TABLE
   ============================================================ */
.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.events-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.events-table thead {
    background: var(--bg-secondary);
}

.events-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.events-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.events-table tbody tr {
    transition: var(--transition);
}

.events-table tbody tr:hover {
    background: var(--bg-card-hover);
}

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

.event-title-cell {
    font-weight: 600;
    color: var(--text-primary);
}

.event-badge-cell {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(232, 122, 46, 0.1);
    border: 1px solid rgba(232, 122, 46, 0.2);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-light);
    white-space: nowrap;
}

.event-actions {
    display: flex;
    gap: 6px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-accent);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
}

.btn-icon:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(232, 122, 46, 0.08);
}

.btn-icon.btn-icon-danger:hover {
    border-color: var(--error);
    color: var(--error);
    background: rgba(239, 68, 68, 0.08);
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: rgba(232, 122, 46, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-muted);
}

/* ============================================================
   DASHBOARD STATS
   ============================================================ */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.dashboard-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.dashboard-stat-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.dsc-icon {
    width: 52px;
    height: 52px;
    background: rgba(232, 122, 46, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--accent);
    flex-shrink: 0;
}

.dsc-body {
    display: flex;
    flex-direction: column;
}

.dsc-number {
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.dsc-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Dashboard Sections */
.dashboard-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quick-actions .btn {
    justify-content: center;
}

.quick-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.quick-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.quick-info-item i {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.quick-info-item strong {
    color: var(--text-primary);
}

/* ============================================================
   REGISTRANTS PAGE
   ============================================================ */
.reg-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.reg-filter label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.reg-filter .form-input {
    max-width: 300px;
}

.reg-total {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    text-align: right;
}

/* ============================================================
   DATA ACTIONS
   ============================================================ */
.data-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ============================================================
   RETENTION SETTING (Past Events)
   ============================================================ */
.retention-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.retention-desc i {
    color: var(--accent);
    font-size: 16px;
}

.retention-form {
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

@media (max-width: 480px) {
    .retention-form {
        flex-direction: column;
        align-items: stretch;
    }

    .retention-form .form-group {
        max-width: none !important;
    }

    .retention-form .btn {
        align-self: stretch !important;
    }
}

/* ============================================================
   RETENTION PREVIEW
   ============================================================ */
.retention-preview {
    margin-top: 20px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    animation: retPreviewIn 0.2s ease;
}

.retention-preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.retention-preview-header i {
    color: var(--accent);
    font-size: 16px;
}

.retention-preview-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.retention-preview-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    transition: var(--transition);
}

.retention-preview-item:hover {
    border-color: var(--border-accent);
}

.retention-preview-date {
    color: var(--accent);
    font-weight: 600;
    white-space: nowrap;
    min-width: 90px;
    flex-shrink: 0;
}

.retention-preview-name {
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.retention-preview-age {
    color: var(--text-muted);
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.retention-preview-empty {
    font-size: 13px;
    color: var(--text-muted);
    padding: 8px 0;
}

@keyframes retPreviewIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    .retention-preview-item {
        flex-wrap: wrap;
        gap: 4px 12px;
    }

    .retention-preview-age {
        margin-left: auto;
    }
}

/* ============================================================
   ADD REGISTRATION MODAL
   ============================================================ */
.addreg-modal-dialog {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-xl);
    padding: 40px 36px 32px;
    max-width: 480px;
    width: 100%;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(0,0,0,0.4);
    animation: modalSlideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.addreg-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 14px;
}

.addreg-modal-close:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-accent);
}

.addreg-modal-header {
    text-align: center;
    margin-bottom: 28px;
}

.addreg-modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: rgba(232, 122, 46, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--accent);
}

.addreg-modal-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.addreg-modal-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

.addreg-form {
    text-align: left;
}

.addreg-form .form-group {
    margin-bottom: 18px;
}

.addreg-form label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

.addreg-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.addreg-form-actions .btn {
    flex: 1;
    justify-content: center;
}

@media (max-width: 480px) {
    .addreg-modal-dialog {
        padding: 32px 24px 28px;
    }

    .addreg-form-actions {
        flex-direction: column-reverse;
    }
}

/* ============================================================
   CONFIRMATION MODAL
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    padding: 24px;
    animation: modalFadeIn 0.2s ease;
}

.modal-overlay.hidden {
    display: none;
}

.modal-dialog {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    padding: 36px 32px 28px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(0,0,0,0.4);
    animation: modalSlideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.modal-icon.warning {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.modal-icon.danger {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.modal-icon.info {
    background: rgba(232, 122, 46, 0.12);
    color: var(--accent);
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-message {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 28px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-actions .btn {
    min-width: 120px;
    justify-content: center;
}

.btn-danger {
    background: var(--error);
    color: #fff;
    border: none;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
}

@media (max-width: 480px) {
    .modal-dialog {
        padding: 28px 24px 24px;
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-actions .btn {
        min-width: auto;
        width: 100%;
    }
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: toastIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.hidden {
    display: none;
}

.toast i { font-size: 18px; }

.toast.success i { color: var(--success); }
.toast.error i { color: var(--error); }

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================================
   ADMIN FOOTER
   ============================================================ */
.admin-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-primary);
    padding: 20px 0;
}

.admin-footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
}

.admin-footer-link {
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.admin-footer-link:hover {
    color: var(--accent);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .dashboard-sections {
        grid-template-columns: 1fr;
    }

    .admin-content {
        padding: 24px;
    }

    .admin-topbar {
        padding: 12px 24px;
    }

    .topbar-page-subtitle {
        display: none;
    }
}

@media (max-width: 768px) {
    /* Show mobile header */
    .admin-mobile-header {
        display: flex;
    }

    /* Top bar: hide sidebar toggle from topbar (moved to mobile header) */
    .admin-topbar .sidebar-toggle-btn {
        display: none;
    }

    /* Sidebar becomes off-canvas overlay */
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: block;
    }

    .sidebar.collapsed {
        width: 260px;
    }

    .sidebar.collapsed .sidebar-brand-text {
        opacity: 1;
        width: auto;
        overflow: visible;
    }

    .sidebar.collapsed .sidebar-link .sidebar-link-text {
        opacity: 1;
        width: auto;
        overflow: visible;
    }

    .sidebar.collapsed .sidebar-badge {
        opacity: 1;
        width: auto;
        overflow: visible;
    }

    .sidebar.collapsed .sidebar-label {
        opacity: 1;
        height: auto;
        overflow: visible;
        padding: 4px 12px 8px;
    }

    .sidebar.collapsed .sidebar-collapse-btn {
        transform: rotate(0deg);
    }

    /* Hide desktop collapse button on mobile */
    .sidebar-collapse-btn {
        display: none;
    }

    /* Main content takes full width */
    .admin-main {
        margin-left: 0 !important;
    }

    .admin-section {
        padding: 24px 20px;
    }

    .admin-content {
        padding: 20px 16px;
    }

    .admin-topbar {
        padding: 10px 16px;
    }

    .form-row-2,
    .form-row-3 {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .admin-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .login-card {
        padding: 32px 24px;
    }

    .events-table th,
    .events-table td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .event-actions {
        flex-direction: column;
    }

    .data-actions {
        flex-direction: column;
    }

    .dashboard-stats {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 12px;
    }

    .dashboard-stat-card {
        padding: 16px;
        gap: 12px;
    }

    .dsc-number {
        font-size: 22px;
    }

    .toast {
        bottom: 16px;
        right: 16px;
        left: 16px;
    }

    .admin-footer-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .topbar-page-title h2 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .dashboard-stats {
        grid-template-columns: 1fr 1fr;
    }

    .topbar-right .admin-badge {
        display: none;
    }

    .topbar-right .btn-sm {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* ============================================================
   TESTIMONIALS PAGE
   ============================================================ */
.testimonial-form {
    max-width: 700px;
}

.test-rating {
    color: #f59e0b;
    font-size: 14px;
    letter-spacing: 2px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .testimonial-form .form-row-3 {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   PASSWORD SETTINGS
   ============================================================ */
.password-form-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-form-desc i {
    color: var(--accent);
    font-size: 16px;
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    font-size: 16px;
    transition: var(--transition);
    line-height: 1;
}

.password-toggle:hover {
    color: var(--accent);
}

.password-toggle.visible {
    color: var(--accent);
}

.password-form-actions {
    margin-top: 4px;
}

.password-strength {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 12px;
}

.password-strength-bar {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.password-strength-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease, background 0.3s ease;
    width: 0%;
}

.password-strength-fill.weak {
    width: 25%;
    background: #ef4444;
}

.password-strength-fill.medium {
    width: 50%;
    background: #f59e0b;
}

.password-strength-fill.strong {
    width: 75%;
    background: #22c55e;
}

.password-strength-fill.very-strong {
    width: 100%;
    background: #16a34a;
}

.password-strength-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 70px;
    text-align: right;
}

.password-strength-label.weak { color: #ef4444; }
.password-strength-label.medium { color: #f59e0b; }
.password-strength-label.strong { color: #22c55e; }
.password-strength-label.very-strong { color: #16a34a; }

@media (max-width: 768px) {
    .password-form .form-row-3 {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-accent); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============================================================
   SELECTION
   ============================================================ */
::selection {
    background: rgba(232, 122, 46, 0.3);
    color: #fff;
}
