/**
 * Gemnative – Full Design System
 * Premium modern interface with animations
 */

/* ─── CSS Variables ─────────────────────────────────────── */
:root {
    --primary: #6c5ce7;
    --primary-light: #a29bfe;
    --primary-dark: #5f3dc4;
    --accent: #00cec9;
    --accent-light: #81ecec;
    --success: #00b894;
    --success-light: #55efc4;
    --warning: #fdcb6e;
    --danger: #e17055;
    --danger-light: #fab1a0;
    --dark: #0a0a1a;
    --dark-light: #141432;
    --dark-card: #1a1a3e;
    --dark-border: #2d2d5e;
    --text: #e4e4f0;
    --text-muted: #9999b8;
    --white: #ffffff;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --gradient-primary: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    --gradient-accent: linear-gradient(135deg, #00cec9 0%, #81ecec 100%);
    --gradient-bg: linear-gradient(135deg, #0a0a1a 0%, #141432 50%, #1a1040 100%);
    --gradient-card: linear-gradient(145deg, rgba(26, 26, 62, 0.8), rgba(20, 20, 50, 0.6));
}

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

html {
    scroll-behavior: smooth;
}

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

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent);
}

img {
    max-width: 100%;
}

/* ─── Container ─────────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: var(--transition);
}

.btn:hover::after {
    opacity: 1;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
}

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

.btn-success:hover {
    background: #00a382;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-light);
    color: var(--primary-light);
}

.btn-outline:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

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

.btn-danger:hover {
    background: #d63031;
}

.btn-warning {
    background: var(--warning);
    color: var(--dark);
}

.btn-warning:hover {
    background: #f9bf3b;
}

.btn-full {
    width: 100%;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-xs {
    padding: 5px 10px;
    font-size: 0.75rem;
    border-radius: 6px;
}

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

.btn.loading .btn-text {
    display: none;
}

.btn.loading .btn-loader {
    display: inline-block;
}

.btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

/* ─── Forms ─────────────────────────────────────────────── */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

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

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

/* ─── Alerts ────────────────────────────────────────────── */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.alert-error {
    background: rgba(225, 112, 85, 0.15);
    border: 1px solid var(--danger);
    color: var(--danger-light);
}

.alert-success {
    background: rgba(0, 184, 148, 0.15);
    border: 1px solid var(--success);
    color: var(--success-light);
}

.alert-info {
    background: rgba(108, 92, 231, 0.15);
    border: 1px solid var(--primary);
    color: var(--primary-light);
}

/* ─── Navbar ────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--dark-border);
    padding: 16px 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--white);
    font-weight: 700;
    font-size: 1.2rem;
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    color: var(--white);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--white);
}

.nav-btn-outline {
    padding: 8px 20px !important;
    border: 1.5px solid var(--primary-light) !important;
    border-radius: 8px !important;
    color: var(--primary-light) !important;
}

.nav-btn-outline:hover {
    background: var(--primary) !important;
    color: var(--white) !important;
    border-color: var(--primary) !important;
}

.nav-btn-primary {
    padding: 8px 20px !important;
    background: var(--gradient-primary) !important;
    border-radius: 8px !important;
    color: var(--white) !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
    border-radius: 2px;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        background: rgba(10, 10, 26, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 24px;
        transform: translateY(-120%);
        transition: var(--transition);
        border-bottom: 1px solid var(--dark-border);
    }

    .nav-links.open {
        transform: translateY(0);
    }
}

/* ─── Auth Pages ────────────────────────────────────────── */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 32px;
    text-decoration: none;
}

.auth-logo .logo-icon {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    border-radius: 12px;
}

.auth-logo .logo-text {
    color: var(--white);
    font-weight: 700;
    font-size: 1.3rem;
}

.auth-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 6px;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 28px;
    font-size: 0.95rem;
}

.auth-form {
    margin-top: 8px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary-light);
    font-weight: 600;
}

.admin-icon {
    background: linear-gradient(135deg, #e17055, #fdcb6e) !important;
}

/* ─── Packages ──────────────────────────────────────────── */
.packages-hero {
    padding: 140px 0 60px;
    text-align: center;
    background: radial-gradient(ellipse at top, rgba(108, 92, 231, 0.15), transparent 60%);
}

.packages-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 12px;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

.packages-section {
    padding: 40px 0 80px;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.package-card {
    background: var(--gradient-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--transition);
    overflow: hidden;
}

.package-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 20px 60px rgba(108, 92, 231, 0.2);
}

.package-badge {
    position: absolute;
    top: 16px;
    right: -32px;
    background: var(--gradient-accent);
    color: var(--dark);
    padding: 4px 40px;
    font-size: 0.75rem;
    font-weight: 700;
    transform: rotate(45deg);
    text-transform: uppercase;
}

.package-header {
    margin-bottom: 20px;
}

.package-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
}

.package-price {
    display: flex;
    align-items: center;
    gap: 12px;
}

.price-old {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.price-current {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent);
}

.package-body {
    flex: 1;
    margin-bottom: 24px;
}

.package-body p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.package-footer {
    margin-top: auto;
}

/* ─── Checkout ──────────────────────────────────────────── */
.checkout-section {
    padding: 120px 0 80px;
}

.checkout-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 768px) {
    .checkout-wrapper {
        grid-template-columns: 1fr;
    }
}

.checkout-summary h2,
.checkout-payment h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 24px;
}

.summary-card {
    background: var(--gradient-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.summary-item .label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.summary-item .value {
    font-weight: 600;
    color: var(--text);
}

.summary-item .value.small {
    font-size: 0.85rem;
    max-width: 250px;
    text-align: right;
}

.summary-item .value.line-through {
    text-decoration: line-through;
    color: var(--text-muted);
}

.summary-item.discount .value {
    color: var(--success);
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    margin-top: 8px;
    border-top: 2px solid var(--primary);
}

.summary-total .label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
}

.summary-total .value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
}

.payment-info-box {
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
}

.sim-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-accent);
    color: var(--dark);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.sim-icon {
    font-size: 1.1rem;
}

.payment-info-box p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.buyer-info {
    background: var(--gradient-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.info-row .value {
    font-weight: 500;
    color: var(--text);
    font-size: 0.9rem;
}

/* ─── Success Page ──────────────────────────────────────── */
.success-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.success-container {
    max-width: 500px;
    width: 100%;
}

.success-card {
    background: var(--gradient-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.success-card h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
}

.success-subtitle {
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* SVG Checkmark Animation */
.success-checkmark {
    margin: 0 auto 32px;
    width: 80px;
    height: 80px;
}

.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: var(--success);
    stroke-miterlimit: 10;
    box-shadow: inset 0 0 0 var(--success);
    animation: fillCheck 0.4s ease-in-out 0.4s forwards,
        scaleCheck 0.3s ease-in-out 0.9s both;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: var(--success);
    fill: none;
    animation: strokeCheck 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-width: 3;
    animation: strokeCheck 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

.success-details {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
    text-align: left;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.detail-row .value {
    font-weight: 600;
    color: var(--text);
}

.status-paid {
    color: var(--success) !important;
    font-weight: 700 !important;
}

.success-sms-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(0, 184, 148, 0.1);
    border: 1px solid rgba(0, 184, 148, 0.3);
    border-radius: var(--radius);
    padding: 14px 20px;
    margin-bottom: 28px;
}

.sms-icon {
    font-size: 1.3rem;
}

.success-sms-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

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

/* ─── Profile Page ──────────────────────────────────────── */
.profile-section {
    padding: 120px 0 80px;
}

.profile-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 30px;
    align-items: start;
}

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

.profile-card {
    background: var(--gradient-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    padding: 36px;
    text-align: center;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
}

.profile-card h2 {
    color: var(--white);
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.profile-info .info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-info .info-item:last-child {
    border-bottom: none;
}

.profile-info .info-item .label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.profile-info .info-item .value {
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
}

.orders-card {
    background: var(--gradient-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    padding: 36px;
}

.orders-card h2 {
    color: var(--white);
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}

.empty-state p {
    margin-bottom: 16px;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius);
    padding: 16px 20px;
    transition: var(--transition);
}

.order-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.order-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.order-title strong {
    color: var(--white);
    font-size: 0.95rem;
}

.order-id {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.order-meta {
    display: flex;
    gap: 12px;
    align-items: center;
}

.order-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.order-status {
    font-size: 0.75rem;
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 600;
}

.order-status.status-paid {
    background: rgba(0, 184, 148, 0.15);
    color: var(--success);
}

.order-amount {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent);
}

/* ─── Footer ────────────────────────────────────────────── */
.site-footer {
    padding: 24px 0;
    text-align: center;
    border-top: 1px solid var(--dark-border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ─── Admin Layout ──────────────────────────────────────── */
.admin-body {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--dark-light);
    border-right: 1px solid var(--dark-border);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 24px 20px;
    border-bottom: 1px solid var(--dark-border);
}

.sidebar-header .logo-text {
    color: var(--white);
    font-weight: 700;
    font-size: 1.1rem;
}

.sidebar-nav {
    padding: 16px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    text-decoration: none;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-nav a.active {
    color: var(--primary-light);
    background: rgba(108, 92, 231, 0.1);
    border-left-color: var(--primary);
}

.sidebar-nav .logout-link:hover {
    color: var(--danger);
}

.sidebar-divider {
    height: 1px;
    background: var(--dark-border);
    margin: 8px 20px;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 6px;
    padding: 10px 24px;
    align-items: center;
}

.lang-switcher .lang-option {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
    transition: var(--transition);
}

.lang-switcher .lang-option:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.lang-switcher .lang-option.active {
    color: var(--primary-light);
    background: rgba(108, 92, 231, 0.15);
    border-color: rgba(108, 92, 231, 0.3);
}

/* Navbar Language Switcher (public pages) */
.nav-lang-switcher {
    display: flex;
    gap: 4px;
    margin-left: 16px;
    align-items: center;
}

.nav-lang-switcher .lang-option {
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.nav-lang-switcher .lang-option:hover {
    color: var(--white);
}

.nav-lang-switcher .lang-option.active {
    color: var(--primary-light);
    background: rgba(108, 92, 231, 0.15);
}

.nav-icon {
    font-size: 1.1rem;
}

.admin-main {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    border-bottom: 1px solid var(--dark-border);
    background: rgba(10, 10, 26, 0.6);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--white);
}

.admin-user {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.3rem;
    cursor: pointer;
}

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

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stats-mini {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

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

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.stat-icon {
    font-size: 2rem;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--white);
    display: block;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.stat-primary {
    border-left: 3px solid var(--primary);
}

.stat-success {
    border-left: 3px solid var(--success);
}

.stat-warning {
    border-left: 3px solid var(--warning);
}



/* Admin Card */
.admin-card {
    background: var(--gradient-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
}

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

.card-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
}

/* Admin Table */
.table-responsive {
    overflow-x: auto;
}

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

.admin-table thead th {
    padding: 14px 16px;
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--dark-border);
    background: rgba(255, 255, 255, 0.02);
}

.admin-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.9rem;
}

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

.admin-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.msg-cell {
    max-width: 350px;
    word-break: break-word;
    font-size: 0.85rem;
    color: var(--text-muted);
}

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

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(0, 184, 148, 0.15);
    color: var(--success);
}

.badge-secondary {
    background: rgba(153, 153, 184, 0.15);
    color: var(--text-muted);
}

/* Admin Form */
.admin-form {
    padding: 24px;
}

.admin-form textarea {
    resize: vertical;
    min-height: 100px;
}

/* Sim badge small */
.sim-badge-sm {
    background: rgba(0, 206, 201, 0.15);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ─── Admin Mobile Responsive ───────────────────────────── */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

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

    .admin-main {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

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

    .admin-header {
        padding: 16px;
    }

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

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

/* ─── Animations ────────────────────────────────────────── */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes strokeCheck {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes fillCheck {
    100% {
        box-shadow: inset 0 0 0 30px rgba(0, 184, 148, 0.08);
    }
}

@keyframes scaleCheck {

    0%,
    100% {
        transform: none;
    }

    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.6s ease forwards;
    opacity: 0;
}

/* ─── Glassmorphism decorative elements ─────────────────── */
.auth-page::before {
    content: '';
    position: fixed;
    top: -30%;
    left: -20%;
    width: 60%;
    height: 60%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.12), transparent 70%);
    pointer-events: none;
}

.auth-page::after {
    content: '';
    position: fixed;
    bottom: -30%;
    right: -20%;
    width: 50%;
    height: 50%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 206, 201, 0.08), transparent 70%);
    pointer-events: none;
}

/* ─── Utility ───────────────────────────────────────────── */
.text-center {
    text-align: center;
}

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

.mb-20 {
    margin-bottom: 20px;
}

/* ─── Coupon Section (Checkout) ─────────────────────────── */
.coupon-section {
    margin-top: 28px;
}

.coupon-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 12px;
}

.coupon-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.coupon-input-group {
    display: flex;
    gap: 8px;
}

.coupon-input-group input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    transition: var(--transition);
}

.coupon-input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.coupon-error {
    color: var(--danger);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 4px 0;
}

.coupon-applied {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 184, 148, 0.1);
    border: 1px solid rgba(0, 184, 148, 0.3);
    padding: 12px 16px;
    border-radius: var(--radius);
}

.coupon-badge {
    flex: 1;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--success-light);
}

/* ─── Referral Card (Profile) ──────────────────────────── */
.referral-card {
    background: var(--gradient-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-top: 20px;
}

.referral-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
}

.referral-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 18px;
    line-height: 1.6;
}

.referral-code-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(108, 92, 231, 0.12);
    border: 1px dashed var(--primary-light);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 12px;
}

.referral-code-box .code {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-light);
    letter-spacing: 3px;
}

.referral-link input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: var(--font);
    cursor: text;
}

.referral-stats {
    margin-top: 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.referral-notice {
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.3);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--primary-light);
}

/* ─── Profile Layout ───────────────────────────────────── */
.profile-section {
    padding: 120px 0 80px;
}

.profile-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 32px;
    align-items: start;
}

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

.profile-sidebar {
    display: flex;
    flex-direction: column;
}

.profile-card {
    background: var(--gradient-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--white);
}

.profile-card h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 20px;
}

.profile-info {
    text-align: left;
}

.profile-info .info-item {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.profile-info .info-item:last-child {
    border-bottom: none;
}

.profile-info .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.profile-info .value {
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 500;
}

/* ─── Orders List (Profile) ────────────────────────────── */
.orders-card {
    background: var(--gradient-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.orders-card h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 24px;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    transition: var(--transition);
}

.order-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary);
}

.order-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.order-title strong {
    font-size: 0.95rem;
    color: var(--white);
}

.order-id {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 8px;
    border-radius: 4px;
}

.order-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.order-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.order-status {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
}

.order-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.order-amount {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent);
}

/* ─── Status Badges ────────────────────────────────────── */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-paid,
.status-active {
    background: rgba(0, 184, 148, 0.15);
    color: var(--success);
    border: 1px solid rgba(0, 184, 148, 0.3);
}

.status-pending {
    background: rgba(253, 203, 110, 0.15);
    color: var(--warning);
    border: 1px solid rgba(253, 203, 110, 0.3);
}

.status-cancelled,
.status-inactive {
    background: rgba(225, 112, 85, 0.15);
    color: var(--danger);
    border: 1px solid rgba(225, 112, 85, 0.3);
}

/* ─── Filter Bar (Admin) ──────────────────────────────── */
.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--dark-border);
    transition: var(--transition);
    text-decoration: none;
}

.filter-btn:hover {
    background: rgba(108, 92, 231, 0.1);
    border-color: var(--primary);
    color: var(--primary-light);
}

.filter-btn.active {
    background: var(--gradient-primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ─── Admin Form Grid ─────────────────────────────────── */
.admin-form .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.admin-form .form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.admin-form .form-group input,
.admin-form .form-group select {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.9rem;
    transition: var(--transition);
}

.admin-form .form-group input:focus,
.admin-form .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

/* ─── Coupon Tags (Admin Orders) ──────────────────────── */
.coupon-tag {
    display: inline-flex;
    flex-direction: column;
    background: rgba(108, 92, 231, 0.12);
    border: 1px solid rgba(108, 92, 231, 0.25);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-light);
}

.coupon-tag small {
    font-size: 0.7rem;
    color: var(--success);
}

.coupon-code {
    color: var(--primary-light);
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.usage-badge {
    background: rgba(255, 255, 255, 0.06);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.ref-bonus {
    color: var(--success);
    font-weight: 600;
    font-size: 0.85rem;
}

.text-muted {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ─── Status Select (Admin) ───────────────────────────── */
.inline-form {
    display: inline-block;
}

.status-select {
    padding: 5px 8px;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--dark-border);
    border-radius: 6px;
    color: var(--text);
    font-family: var(--font);
    cursor: pointer;
    transition: var(--transition);
}

.status-select:focus {
    outline: none;
    border-color: var(--primary);
}

.status-select option {
    background: var(--dark-card);
    color: var(--text);
}

/* ─── Admin Actions Cell ──────────────────────────────── */
.actions-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.cell-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.cell-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ─── Empty States ────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 48px 20px;
}

.empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 16px;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.empty-text {
    text-align: center;
    color: var(--text-muted);
    padding: 32px;
}

/* ─── Responsive Tweaks ───────────────────────────────── */
@media (max-width: 768px) {
    .order-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .order-right {
        flex-direction: row;
        align-items: center;
        width: 100%;
        justify-content: space-between;
    }

    .referral-code-box {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .filter-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .filter-btn {
        white-space: nowrap;
    }

    .actions-cell {
        justify-content: flex-start;
    }

    .admin-form .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Phase 2: Abandoned Cart Banner ────────────────── */
.abandoned-cart-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    background: linear-gradient(135deg, rgba(253, 203, 110, 0.12), rgba(225, 112, 85, 0.1));
    border: 1px solid rgba(253, 203, 110, 0.3);
    border-radius: var(--radius-lg, 14px);
    margin-bottom: 24px;
    animation: pulse-border 2s ease-in-out infinite alternate;
}

@keyframes pulse-border {
    from {
        border-color: rgba(253, 203, 110, 0.3);
    }

    to {
        border-color: rgba(253, 203, 110, 0.6);
    }
}

.ab-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.ab-content {
    flex: 1;
}

.ab-content strong {
    color: var(--warning, #fdcb6e);
    display: block;
    margin-bottom: 4px;
    font-size: 1rem;
}

.ab-content p {
    color: var(--text-muted, #a0a0b8);
    font-size: 0.85rem;
    margin: 0;
}

.ab-actions {
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .abandoned-cart-banner {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
}

/* ─── Phase 2: Settings Page Enhancements ───────────── */
.admin-form textarea {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--dark-border, #2a2a4a);
    border-radius: var(--radius, 10px);
    color: var(--white, #fff);
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.82rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.admin-form textarea:focus {
    border-color: var(--primary, #6c5ce7);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
    outline: none;
}

.admin-form textarea::placeholder {
    color: var(--text-muted, #a0a0b8);
    opacity: 0.5;
}

.admin-form small.text-muted {
    display: block;
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--text-muted, #a0a0b8);
    opacity: 0.7;
}

.admin-form small code {
    background: rgba(108, 92, 231, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.78rem;
    color: var(--primary-light, #a29bfe);
}

/* ─── Phase 2: Msg Cell (truncate long messages) ────── */
.msg-cell {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ─── Phase 2: Empty state improvements ─────────────── */
.empty-state code {
    background: rgba(108, 92, 231, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.82rem;
    color: var(--primary-light, #a29bfe);
}

/* ─── Phase 2: Card Header with actions ─────────────── */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.card-header h2 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--white, #fff);
}

/* ─── Phase 2: Stat card variants ───────────────────── */
.stat-card.stat-warning {
    border-color: rgba(253, 203, 110, 0.3);
}

.stat-card.stat-warning .stat-icon {
    color: var(--warning, #fdcb6e);
}