/* ============================================================
   Digi Panel - Custom Stylesheet
   assets/css/style.css
   ============================================================ */

/* ── Google Font ───────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
    --clr-primary:    #6366f1;   /* Indigo */
    --clr-primary-dk: #4f46e5;
    --clr-accent:     #f59e0b;   /* Amber */
    --clr-success:    #10b981;
    --clr-danger:     #ef4444;
    --clr-warning:    #f59e0b;
    --clr-info:       #3b82f6;

    /* Sidebar */
    --sidebar-bg:     #0f172a;
    --sidebar-hover:  #1e293b;
    --sidebar-active: #6366f1;
    --sidebar-text:   #94a3b8;
    --sidebar-active-text: #ffffff;
    --sidebar-width:  260px;

    /* Body */
    --body-bg:        #f1f5f9;
    --card-bg:        #ffffff;
    --text-primary:   #1e293b;
    --text-muted:     #64748b;
    --border-color:   #e2e8f0;
    --nav-bg:         #0f172a;

    --radius:         0.75rem;
    --shadow-sm:      0 1px 3px rgba(0,0,0,.08);
    --shadow-md:      0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:      0 8px 32px rgba(0,0,0,.14);
    --transition:     .2s ease;
}

/* ── Base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--body-bg);
    color: var(--text-primary);
    font-size: 0.925rem;
    line-height: 1.6;
}

a { color: var(--clr-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--clr-primary-dk); }

/* ── Accent Button ─────────────────────────────────────────── */
.btn-accent {
    background: linear-gradient(135deg, var(--clr-accent) 0%, #d97706 100%);
    color: #fff;
    border: none;
    font-weight: 600;
    padding: .45rem 1.1rem;
    border-radius: .5rem;
    transition: transform var(--transition), box-shadow var(--transition);
}
.btn-accent:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245,158,11,.4);
    color: #fff;
}

/* ── Primary Gradient Button ───────────────────────────────── */
.btn-primary-gradient {
    background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-primary-dk) 100%);
    color: #fff;
    border: none;
    font-weight: 600;
    border-radius: .5rem;
    transition: transform var(--transition), box-shadow var(--transition);
}
.btn-primary-gradient:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99,102,241,.4);
    color: #fff;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    padding: 1rem 1.25rem;
}

/* ── Stat Cards ────────────────────────────────────────────── */
.stat-card {
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition), box-shadow var(--transition);
    color: #fff;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.stat-card .stat-icon {
    width: 58px; height: 58px;
    background: rgba(255,255,255,.18);
    border-radius: .75rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}
.stat-card .stat-label  { font-size: .8rem; opacity: .85; font-weight: 500; }
.stat-card .stat-value  { font-size: 1.75rem; font-weight: 800; line-height: 1.1; }

.stat-indigo  { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.stat-emerald { background: linear-gradient(135deg, #10b981, #059669); }
.stat-amber   { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-rose    { background: linear-gradient(135deg, #f43f5e, #e11d48); }
.stat-sky     { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.stat-violet  { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

/* ── Sidebar Layout ────────────────────────────────────────── */
.panel-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    z-index: 1000;
    transition: transform var(--transition);
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 1.5rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
    display: flex;
    align-items: center;
    gap: .75rem;
}
.sidebar-brand .brand-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-dk));
    border-radius: .6rem;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.1rem;
}
.sidebar-brand .brand-name {
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
}
.sidebar-brand .brand-sub {
    color: var(--sidebar-text);
    font-size: .72rem;
}

.sidebar-nav { padding: .75rem 0; flex: 1; }

.nav-section-label {
    color: var(--sidebar-text);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .75rem 1.25rem .25rem;
}

.sidebar .nav-link {
    color: var(--sidebar-text);
    padding: .6rem 1.25rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    border-radius: 0;
    font-size: .875rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
    position: relative;
}
.sidebar .nav-link i {
    width: 20px;
    text-align: center;
    font-size: .95rem;
}
.sidebar .nav-link:hover {
    background: var(--sidebar-hover);
    color: #fff;
}
.sidebar .nav-link.active {
    background: rgba(99,102,241,.18);
    color: var(--clr-primary);
    font-weight: 600;
}
.sidebar .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--clr-primary);
    border-radius: 0 2px 2px 0;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,.06);
}
.sidebar-footer .user-info {
    display: flex; align-items: center; gap: .75rem;
    color: #fff;
}
.sidebar-footer .user-avatar {
    width: 36px; height: 36px;
    background: var(--clr-primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: .9rem;
    color: #fff;
    flex-shrink: 0;
}
.sidebar-footer .user-name  { font-size: .85rem; font-weight: 600; }
.sidebar-footer .user-email { font-size: .73rem; color: var(--sidebar-text); }

/* ── Main Content Area ──────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.top-bar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: .75rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky; top: 0; z-index: 100;
    box-shadow: var(--shadow-sm);
}
.top-bar .page-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}
.top-bar .wallet-badge {
    background: linear-gradient(135deg, var(--clr-success), #059669);
    color: #fff;
    padding: .35rem .9rem;
    border-radius: 2rem;
    font-size: .83rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.content-body { padding: 1.75rem; flex: 1; }

/* ── Table Styles ───────────────────────────────────────────── */
.table {
    font-size: .875rem;
}
.table thead th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 2px solid var(--border-color);
    padding: .75rem 1rem;
    background: #f8fafc;
}
.table tbody td {
    padding: .85rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}
.table-hover tbody tr:hover { background: #f8fafc; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-control, .form-select {
    border: 1.5px solid var(--border-color);
    border-radius: .5rem;
    padding: .55rem .9rem;
    font-size: .9rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus, .form-select:focus {
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.form-label { font-weight: 600; font-size: .85rem; color: var(--text-primary); }

/* ── Auth Pages ─────────────────────────────────────────────── */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}
.auth-page::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(99,102,241,.18) 0%, transparent 70%);
    top: -200px; right: -200px;
    pointer-events: none;
}
.auth-page::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(245,158,11,.1) 0%, transparent 70%);
    bottom: -100px; left: -100px;
    pointer-events: none;
}

.auth-card {
    background: rgba(255,255,255,.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 1.25rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 24px 64px rgba(0,0,0,.5);
    position: relative; z-index: 1;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    margin-bottom: 2rem;
}
.auth-logo .logo-icon {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-accent));
    border-radius: .9rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: #fff;
}
.auth-logo .logo-text { color: #fff; font-size: 1.5rem; font-weight: 800; }

.auth-card h2 { color: #fff; font-weight: 700; font-size: 1.35rem; }
.auth-card .text-muted-light { color: rgba(255,255,255,.55); font-size: .88rem; }

.auth-card .form-label { color: rgba(255,255,255,.8); }
.auth-card .form-control {
    background: rgba(255,255,255,.06);
    border: 1.5px solid rgba(255,255,255,.12);
    color: #fff;
}
.auth-card .form-control::placeholder { color: rgba(255,255,255,.35); }
.auth-card .form-control:focus {
    background: rgba(255,255,255,.09);
    border-color: var(--clr-primary);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(99,102,241,.2);
}
.auth-card .form-text { color: rgba(255,255,255,.45); }
.auth-card a { color: #a5b4fc; }
.auth-card a:hover { color: #c7d2fe; }

/* ── Public Landing Page ────────────────────────────────────── */
#mainNav {
    background: var(--nav-bg);
    padding: .9rem 0;
    box-shadow: 0 2px 20px rgba(0,0,0,.3);
}
#mainNav .navbar-brand { font-size: 1.2rem; letter-spacing: -.02em; }
#mainNav .nav-link { font-weight: 500; color: rgba(255,255,255,.75); }
#mainNav .nav-link:hover { color: #fff; }

.hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 40%, #0f172a 100%);
    min-height: 92vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 5rem 0;
}
.hero-section::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236366f1' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(99,102,241,.15);
    border: 1px solid rgba(99,102,241,.3);
    color: #a5b4fc;
    padding: .35rem 1rem;
    border-radius: 2rem;
    font-size: .82rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}
.hero-title .text-gradient {
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    color: rgba(255,255,255,.65);
    font-size: 1.1rem;
    line-height: 1.75;
    margin-bottom: 2.5rem;
    max-width: 560px;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}
.hero-stat-value { font-size: 1.75rem; font-weight: 800; color: #fff; }
.hero-stat-label { font-size: .8rem; color: rgba(255,255,255,.5); font-weight: 500; }

.hero-image-card {
    background: rgba(255,255,255,.04);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 32px 64px rgba(0,0,0,.4);
}

/* Floating cards on hero */
.floating-card {
    background: var(--card-bg);
    border-radius: .75rem;
    padding: .75rem 1rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .85rem;
    font-weight: 600;
    position: absolute;
    animation: float 3s ease-in-out infinite;
}
.floating-card.card-1 { top: 15%; right: -20px; animation-delay: 0s; }
.floating-card.card-2 { bottom: 20%; left: -20px; animation-delay: 1.5s; }

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

/* ── Service Cards (Landing) ─────────────────────────────────── */
.service-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    height: 100%;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--clr-primary);
}
.service-icon {
    width: 50px; height: 50px;
    border-radius: .75rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

/* ── Feature Icon Boxes ──────────────────────────────────────── */
.feature-box {
    text-align: center;
    padding: 2rem 1rem;
}
.feature-icon {
    width: 70px; height: 70px;
    background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(99,102,241,.04));
    border: 1px solid rgba(99,102,241,.2);
    border-radius: 1rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.75rem;
    color: var(--clr-primary);
    margin: 0 auto 1.25rem;
}

/* ── Step Cards ──────────────────────────────────────────────── */
.step-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    transition: transform var(--transition), box-shadow var(--transition);
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step-number {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-dk));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: 1.1rem;
    margin: 0 auto 1.25rem;
}

/* ── CTA Section ─────────────────────────────────────────────── */
.cta-section {
    background: linear-gradient(135deg, #0f172a, #1e1b4b);
    color: #fff;
    padding: 5rem 0;
}

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
    background: #0f172a;
    color: rgba(255,255,255,.6);
    padding: 3rem 0 1.5rem;
    border-top: 1px solid rgba(255,255,255,.06);
}
.site-footer .footer-brand { color: #fff; font-weight: 700; font-size: 1.1rem; }
.site-footer a { color: rgba(255,255,255,.5); }
.site-footer a:hover { color: #fff; }
.site-footer hr { border-color: rgba(255,255,255,.06); }

/* ── Badges ──────────────────────────────────────────────────── */
.badge { font-weight: 600; padding: .38em .7em; font-size: .78rem; border-radius: .4rem; }

/* ── Wallet Info Block ───────────────────────────────────────── */
.wallet-card {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
    border-radius: var(--radius);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}
.wallet-card::after {
    content: '\f555';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: -20px; bottom: -30px;
    font-size: 8rem;
    color: rgba(255,255,255,.04);
    pointer-events: none;
}
.wallet-amount { font-size: 2.5rem; font-weight: 800; }
.wallet-label  { font-size: .85rem; opacity: .65; }

/* ── Sidebar overlay on mobile ──────────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 999;
}

/* ── Mobile toggle button ───────────────────────────────────── */
.sidebar-toggle {
    display: none;
    background: none;
    border: 1.5px solid var(--border-color);
    border-radius: .5rem;
    padding: .4rem .6rem;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.1rem;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-overlay.active { display: block; }
    .main-content { margin-left: 0; }
    .sidebar-toggle { display: inline-flex; align-items: center; }
    .hero-stats { gap: 1.5rem; }
}

@media (max-width: 575.98px) {
    .content-body { padding: 1rem; }
    .auth-card { padding: 1.75rem; }
    .wallet-amount { font-size: 2rem; }
}

/* ── Utilities ──────────────────────────────────────────────── */
.text-gradient {
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.text-accent { color: var(--clr-accent) !important; }

.section-heading { font-size: 2rem; font-weight: 800; }
.section-sub { color: var(--text-muted); font-size: 1rem; max-width: 580px; margin: 0 auto; }

.divider { height: 3px; width: 60px; background: linear-gradient(90deg, var(--clr-primary), var(--clr-accent)); border-radius: 3px; }

/* Scrollbar */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Loading spinner */
.spinner-sm { width: 1rem; height: 1rem; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}
.empty-state i { font-size: 3rem; margin-bottom: 1rem; opacity: .3; }

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp .5s ease forwards; }
