/* ============================================================
   OGOGUARD Admin Dashboard – Design System
   Premium dark-first design with Orange accent palette
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
    /* Brand Colors */
    --primary: #FF6D00;
    --primary-light: #FF8F00;
    --primary-dark: #E65100;
    --primary-glow: rgba(255, 109, 0, 0.3);
    --primary-subtle: rgba(255, 109, 0, 0.08);

    /* Semantic Colors */
    --success: #10B981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning: #F59E0B;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --error: #EF4444;
    --error-bg: rgba(239, 68, 68, 0.1);
    --info: #3B82F6;
    --info-bg: rgba(59, 130, 246, 0.1);

    /* Dark Theme (Default) */
    --bg-base: #0B0F19;
    --bg-surface: #111827;
    --bg-card: #1F2937;
    --bg-card-hover: #263346;
    --bg-input: #1a2332;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px var(--primary-glow);

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --topbar-height: 64px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme */
body.light-theme {
    --bg-base: #F8FAFC;
    --bg-surface: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F1F5F9;
    --bg-input: #F1F5F9;
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 30px rgba(255, 109, 0, 0.15);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: var(--text-primary);
}

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

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ---------- LOGIN SCREEN ---------- */
.login-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-base);
    position: relative;
    overflow: hidden;
}

.login-screen::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-glow), transparent 60%);
    animation: float 8s ease-in-out infinite;
}

.login-screen::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15), transparent 60%);
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -30px); }
}

.login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    padding: 48px 40px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    animation: slideUp 0.6s var(--transition-slow);
}

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

.login-logo {
    text-align: center;
    margin-bottom: 40px;
}

.logo-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: var(--shadow-glow); }
    50% { box-shadow: 0 0 50px var(--primary-glow); }
}

.logo-icon .material-icons-round {
    font-size: 36px;
    color: white;
}

.login-logo h1 {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 500;
}

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

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

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 20px !important;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 14px 14px 44px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    transition: all var(--transition-fast);
    outline: none;
}

.input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-subtle);
}

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

.toggle-password {
    position: absolute;
    right: 12px;
    padding: 4px;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

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

.toggle-password .material-icons-round {
    font-size: 20px;
}

.login-error {
    padding: 12px 16px;
    background: var(--error-bg);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    color: var(--error);
    font-size: 14px;
    margin-bottom: 16px;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.login-footer {
    position: relative;
    z-index: 1;
    margin-top: 32px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.btn-danger {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

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

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

.btn-success:hover {
    background: var(--success);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn-full {
    width: 100%;
    padding: 16px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.btn-icon:hover {
    background: var(--primary-subtle);
    color: var(--primary);
}

.btn-icon .material-icons-round {
    font-size: 22px;
}

.btn-loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------- APP LAYOUT ---------- */
.app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ---------- SIDEBAR ---------- */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: all var(--transition-slow);
    position: relative;
    z-index: 20;
    flex-shrink: 0;
}

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

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo .material-icons-round {
    font-size: 28px;
    color: var(--primary);
}

.sidebar-title {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--primary-subtle);
    color: var(--primary);
    letter-spacing: 1px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    transition: all var(--transition-fast);
    position: relative;
}

.nav-item:hover {
    background: var(--primary-subtle);
    color: var(--primary);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.nav-item .material-icons-round {
    font-size: 22px;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--primary-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-avatar .material-icons-round {
    font-size: 20px;
    color: var(--primary);
}

.admin-details {
    display: flex;
    flex-direction: column;
}

.admin-name {
    font-size: 13px;
    font-weight: 600;
}

.admin-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* ---------- MAIN CONTENT ---------- */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.topbar {
    height: var(--topbar-height);
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface);
    flex-shrink: 0;
}

.sidebar-toggle {
    display: none;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    flex: 1;
}

.topbar-actions {
    display: flex;
    gap: 4px;
}

.content-area {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    overflow-x: hidden;
}

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

.stat-card {
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

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

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--primary-subtle);
    transform: translate(30px, -30px);
    transition: all var(--transition-normal);
}

.stat-card:hover::after {
    transform: translate(20px, -20px);
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.orange { background: var(--primary-subtle); color: var(--primary); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.blue { background: var(--info-bg); color: var(--info); }
.stat-icon.yellow { background: var(--warning-bg); color: var(--warning); }
.stat-icon.red { background: var(--error-bg); color: var(--error); }

.stat-icon .material-icons-round {
    font-size: 24px;
}

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

.stat-trend.up { background: var(--success-bg); color: var(--success); }
.stat-trend.down { background: var(--error-bg); color: var(--error); }

.stat-value {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* ---------- SECTION ---------- */
.section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
}

.section-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title .material-icons-round {
    font-size: 20px;
    color: var(--primary);
}

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

/* ---------- SEARCH ---------- */
.search-input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    min-width: 240px;
    transition: all var(--transition-fast);
}

.search-input:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-subtle);
}

.search-input .material-icons-round {
    font-size: 18px;
    color: var(--text-muted);
}

.search-input input {
    border: none;
    background: none;
    outline: none;
    flex: 1;
    font-size: 14px;
}

/* ---------- TABLE ---------- */
.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    font-size: 14px;
}

.data-table thead th {
    padding: 14px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
    border-bottom: 1px solid var(--border);
}

.data-table tbody tr:hover {
    background: var(--primary-subtle);
}

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

.data-table td {
    padding: 14px 20px;
    white-space: nowrap;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--primary);
    flex-shrink: 0;
}

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

.user-info-cell .name {
    font-weight: 600;
    font-size: 14px;
}

.user-info-cell .email {
    font-size: 12px;
    color: var(--text-muted);
}

/* ---------- BADGES ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-parent { background: var(--info-bg); color: var(--info); }
.badge-child { background: var(--warning-bg); color: var(--warning); }
.badge-admin { background: var(--primary-subtle); color: var(--primary); }
.badge-active { background: var(--success-bg); color: var(--success); }
.badge-expired { background: var(--error-bg); color: var(--error); }
.badge-pending { background: var(--warning-bg); color: var(--warning); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-failed { background: var(--error-bg); color: var(--error); }
.badge-trial { background: var(--info-bg); color: var(--info); }
.badge-lite { background: rgba(148,163,184,0.1); color: var(--text-secondary); }
.badge-family { background: var(--primary-subtle); color: var(--primary); }
.badge-premium { background: var(--warning-bg); color: var(--warning); }
.badge-popular { background: var(--primary-subtle); color: var(--primary); }

/* ---------- TABLE ACTIONS ---------- */
.table-actions {
    display: flex;
    gap: 4px;
}

.table-actions .btn-icon {
    width: 32px;
    height: 32px;
}

.table-actions .btn-icon .material-icons-round {
    font-size: 18px;
}

/* ---------- PAGINATION ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
}

.pagination-controls {
    display: flex;
    gap: 4px;
}

.pagination-controls button {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 13px;
    font-weight: 600;
}

.pagination-controls button:hover {
    background: var(--primary-subtle);
    color: var(--primary);
}

.pagination-controls button.active {
    background: var(--primary);
    color: white;
}

.pagination-controls button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ---------- MODAL ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.2s ease;
}

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

.modal {
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    animation: modalSlide 0.3s var(--transition-slow);
    overflow: hidden;
}

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

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

.modal-title {
    font-size: 18px;
    font-weight: 700;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

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

.modal-body label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.modal-body input,
.modal-body select,
.modal-body textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    transition: all var(--transition-fast);
    outline: none;
}

.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-subtle);
}

.modal-body textarea {
    resize: vertical;
    min-height: 80px;
}

.modal-footer {
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid var(--border);
}

/* ---------- TOAST NOTIFICATIONS ---------- */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    font-weight: 500;
    pointer-events: auto;
    animation: toastIn 0.3s ease;
    min-width: 300px;
    max-width: 450px;
}

.toast.removing {
    animation: toastOut 0.3s ease forwards;
}

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

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

.toast-success { border-left: 3px solid var(--success); }
.toast-error { border-left: 3px solid var(--error); }
.toast-info { border-left: 3px solid var(--info); }
.toast-warning { border-left: 3px solid var(--warning); }

.toast .material-icons-round {
    font-size: 20px;
}

.toast-success .material-icons-round { color: var(--success); }
.toast-error .material-icons-round { color: var(--error); }
.toast-info .material-icons-round { color: var(--info); }
.toast-warning .material-icons-round { color: var(--warning); }

/* ---------- EMPTY STATE ---------- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    color: var(--text-muted);
    text-align: center;
}

.empty-state .material-icons-round {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 14px;
    max-width: 400px;
}

/* ---------- LOADING ---------- */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ---------- PLAN CARDS ---------- */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    padding: 24px;
}

.plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all var(--transition-normal);
    position: relative;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.plan-card.popular {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(255,109,0,0.05), rgba(255,143,0,0.03));
}

.plan-card.inactive {
    opacity: 0.5;
}

.plan-popular-badge {
    position: absolute;
    top: -1px;
    right: 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 0 0 8px 8px;
    letter-spacing: 1px;
}

.plan-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.plan-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}

.plan-price-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.plan-features {
    list-style: none;
    margin-bottom: 24px;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.plan-features li .material-icons-round {
    font-size: 18px;
    color: var(--success);
}

.plan-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
}

.plan-actions {
    display: flex;
    gap: 8px;
}

/* ---------- FILTER ROW ---------- */
.filter-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-select {
    padding: 8px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-select:focus {
    border-color: var(--primary);
}

/* ---------- DETAIL GRID ---------- */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.detail-item {
    padding: 12px 16px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
}

.detail-item label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 4px !important;
}

.detail-item .value {
    font-size: 15px;
    font-weight: 600;
}

.detail-item.full {
    grid-column: 1 / -1;
}

/* ---------- CHIP INPUT ---------- */
.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--primary-subtle);
    border-radius: 20px;
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
}

.chip button {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: all var(--transition-fast);
}

.chip button:hover {
    background: var(--primary);
    color: white;
}

.chip button .material-icons-round {
    font-size: 14px;
}

.chip-input-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.chip-input-row input {
    flex: 1;
}

/* ---------- TOGGLE SWITCH ---------- */
.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle {
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    position: relative;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.toggle.active {
    background: var(--primary);
    border-color: var(--primary);
}

.toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.toggle.active::after {
    transform: translateX(20px);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: -280px;
        z-index: 50;
        box-shadow: var(--shadow-lg);
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar-toggle {
        display: flex;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .content-area {
        padding: 16px;
    }

    .section-header {
        padding: 16px;
    }

    .data-table td,
    .data-table th {
        padding: 10px 14px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .modal {
        margin: 16px;
        max-height: 90vh;
    }

    .plans-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- ANIMATION UTILITIES ---------- */
.animate-in {
    animation: slideUp 0.4s var(--transition-slow);
}

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }

/* ---------- REVENUE DISPLAY ---------- */
.revenue-highlight {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
}

/* ---------- QUICK CHARTS (CSS only) ---------- */
.mini-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 48px;
    margin-top: 12px;
}

.mini-bar {
    flex: 1;
    background: var(--primary-subtle);
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    transition: all var(--transition-normal);
    position: relative;
}

.mini-bar:hover {
    background: var(--primary);
}

.mini-bar:hover::after {
    content: attr(data-value);
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}

/* ---------- CHECKBOX ---------- */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ---------- NUMBER INPUT ---------- */
input[type="number"] {
    -moz-appearance: textfield;
}

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