/* AiO Panel - Premium Modern UI */
:root {
    /* Dark Mode (OLED) - DEFAULT */
    --bg-primary: #000000;
    --bg-secondary: #0a0a10;
    --bg-card: #0f0f15;
    --bg-hover: #1c1c28;
    --accent-primary: #7c4dff;
    --accent-secondary: #651fff;
    --accent-gradient: linear-gradient(135deg, #7c4dff 0%, #651fff 100%);
    --text-primary: #ffffff;
    --text-secondary: #b0b0b8;
    --text-muted: #787885;
    --border-color: #22222d;
    --success: #00e676;
    --warning: #ffea00;
    --danger: #ff5252;
    --info: #00b0ff;
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.4);
    --shadow-md: 0 8px 16px rgba(0,0,0,0.5);
    --shadow-lg: 0 12px 24px rgba(0,0,0,0.6);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme='light'] {
    --bg-primary: #f4f7f6;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f0f2f5;
    --accent-primary: #1a73e8;
    --accent-secondary: #185abc;
    --accent-gradient: #1a73e8;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-muted: #70757a;
    --border-color: #dadce0;
    --success: #1e8e3e;
    --warning: #f9ab00;
    --danger: #d93025;
    --info: #1a73e8;
    --shadow-sm: 0 1px 2px 0 rgba(60,64,67,.3);
    --shadow-md: 0 1px 3px 0 rgba(60,64,67,.3);
    --shadow-lg: 0 4px 5px 0 rgba(0,0,0,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.admin-sidebar { background: linear-gradient(180deg, #0a0a10 0%, #000000 100%); }

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    color: var(--accent-primary);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 500;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-primary);
    color: white;
}

.nav-item i { width: 20px; text-align: center; }
.nav-divider { height: 1px; background: var(--border-color); margin: 12px 0; }

.sidebar-footer { padding: 16px; }

.credits-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.credits-label { font-size: 0.8rem; color: var(--text-muted); }
.credits-amount { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
    min-height: 100vh;
}

.main-content.full-width { margin-left: 0; }

.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Auth Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 20px;
}

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    width: 64px;
    height: 64px;
    background: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.8rem;
    color: white;
}

.auth-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.auth-form { display: flex; flex-direction: column; gap: 20px; }

.auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

.auth-links a {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.auth-links a:hover { text-decoration: underline; }

/* Forms */
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 0.9rem; color: var(--text-secondary); font-weight: 500; }
.form-group small { font-size: 0.8rem; color: var(--text-muted); }

.form-input {
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.form-input::placeholder { color: var(--text-muted); }
.form-input.small { padding: 6px 10px; font-size: 0.85rem; width: 120px; }
.form-input:disabled { opacity: 0.6; cursor: not-allowed; background: var(--bg-secondary); }

.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.form-inline { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-secondary);
}

.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-danger { background: var(--danger); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 24px;
}

.card-header {
    padding: 16px 24px;
    background: var(--bg-hover);
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.card-body { padding: 24px; }

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
}

.stat-icon {
    width: 56px;
    height: 56px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
}

.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 1.8rem; font-weight: 700; }
.stat-label { font-size: 0.9rem; color: var(--text-secondary); }

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.service-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.service-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.service-header {
    margin-bottom: 20px;
    text-align: center;
}

.service-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.service-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    display: block;
}

.service-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.service-form .form-group { margin-bottom: 12px; }

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--bg-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.table td { font-size: 0.95rem; }
.table tr:hover { background: var(--bg-hover); }
.table code {
    background: var(--bg-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--accent-primary);
}

/* Badges */
.badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.badge-completed { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.badge-pending { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.badge-failed { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.badge-refunded { background: rgba(59, 130, 246, 0.2); color: var(--info); }

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 100%;
    max-width: 480px;
    border: 1px solid var(--border-color);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h3 { font-size: 1.3rem; }
.modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.modal-close:hover { color: var(--text-primary); }

/* Utility */
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

/* Public Landing Page */
.top-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    position: relative;
    z-index: 1001; /* Above sticky bottom-bar if needed */
}

.top-title {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    pointer-events: none;
    letter-spacing: 0.5px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.flex-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-nav {
    display: flex;
    gap: 15px;
}

.bottom-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.main-nav a:hover, .main-nav a.active {
    color: var(--accent-primary);
}

/* Slider */
.slider-container {
    width: 100%;
    height: 400px;
    overflow: hidden;
    position: relative;
    background: #000;
}

.slide {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.slide.active { display: flex; }

.slide-content {
    background: rgba(0, 0, 0, 0.4);
    padding: 30px;
    border-radius: var(--radius-sm);
}

.slide-content h2 { font-size: 2.5rem; margin-bottom: 15px; font-weight: 600; }

/* Home Services */
.section { padding: 60px 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 2rem; color: var(--text-primary); font-weight: 600; }

.public-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.public-service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 30px;
    text-align: center;
    transition: var(--transition);
}

.public-service-card:hover { border-color: var(--accent-primary); transform: translateY(-5px); box-shadow: var(--shadow-sm); }
.ps-icon { font-size: 2.5rem; color: var(--accent-primary); margin-bottom: 20px; }
.ps-name { font-size: 1.25rem; font-weight: 600; margin-bottom: 10px; color: var(--text-primary); }
.ps-desc { color: var(--text-secondary); margin-bottom: 20px; font-size: 0.95rem; }
.ps-price { font-size: 1.5rem; font-weight: 700; color: var(--accent-primary); margin-bottom: 20px; display: block; }

/* Responsive System */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1001;
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-bottom: 20px;
}

@media (max-width: 991px) {
    .app-container { flex-direction: column; }
    .sidebar {
        left: -260px;
        transition: left 0.3s ease;
        box-shadow: 4px 0 10px rgba(0,0,0,0.1);
    }
    .sidebar.open { left: 0; }
    .main-content { margin-left: 0; padding: 20px; padding-top: 70px; }
    .mobile-toggle { display: block; }
    .stats-grid, .services-grid, .public-services-grid { grid-template-columns: 1fr; }
    .form-row { display: grid; grid-template-columns: 1fr !important; gap: 10px; }
    .page-header h1 { font-size: 1.4rem; }
    .top-title { display: none; }
}

@media (max-width: 768px) {
    .main-nav { flex-direction: column; gap: 10px; text-align: center; }
    .flex-container { flex-direction: column; gap: 15px; text-align: center; }
    .slider-container { height: 300px; }
    .slide-content h2 { font-size: 1.6rem; }
    .section { padding: 40px 15px; }
    .top-bar .flex-container { gap: 10px; }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide.active { animation: fadeIn 0.8s ease; }

/* Footer */
.main-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
}
