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

:root {
    color-scheme: dark;
    --bg-main: #0b0f19;
    --bg-card: rgba(17, 24, 39, 0.7);
    --bg-card-hover: rgba(31, 41, 55, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    
    --primary: hsl(243, 75%, 59%);
    --primary-hover: hsl(243, 75%, 65%);
    --primary-light: rgba(79, 70, 229, 0.15);
    
    --secondary: hsl(270, 70%, 60%);
    --secondary-light: rgba(147, 51, 234, 0.15);
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-inverse: #0b0f19;
    
    --success: hsl(142, 71%, 45%);
    --success-light: rgba(16, 185, 129, 0.15);
    
    --warning: hsl(38, 92%, 50%);
    --warning-light: rgba(245, 158, 11, 0.15);
    
    --danger: hsl(350, 89%, 60%);
    --danger-light: rgba(239, 68, 68, 0.15);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --shadow-main: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
    --glow-primary: 0 0 20px rgba(79, 70, 229, 0.3);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

select option {
    background-color: #0f172a;
    color: #f3f4f6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(147, 51, 234, 0.12) 0px, transparent 50%);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Glassmorphism containers */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-main);
    padding: 2rem;
    transition: var(--transition);
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    font-family: var(--font-heading);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glow-primary);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
}

.nav-link:hover, .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* Dashboard Layout */
.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Button UI */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(79, 70, 229, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

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

.btn-success:hover {
    background: hsl(142, 71%, 50%);
}

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

.btn-danger:hover {
    background: hsl(350, 89%, 65%);
}

/* Forms styling */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: #fff;
    font-family: var(--font-body);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

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

/* Badge status colors */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 50px;
}

.badge-draft { background: rgba(255, 255, 255, 0.1); color: var(--text-muted); }
.badge-pending { background: var(--warning-light); color: var(--warning); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-info { background: var(--primary-light); color: var(--primary); }

/* Steps / Progress Flow */
.wizard-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 3rem;
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 1;
}

.step-progress-bar {
    position: absolute;
    top: 20px;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    z-index: 2;
    width: 0%;
    transition: var(--transition);
}

.wizard-step {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
}

.step-num {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-main);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--transition);
    color: var(--text-muted);
}

.wizard-step.active .step-num {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    box-shadow: var(--glow-primary);
}

.wizard-step.completed .step-num {
    border-color: var(--success);
    background: var(--success);
    color: #fff;
}

.step-title {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    text-align: center;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.wizard-step.active .step-title {
    color: #fff;
}

/* Wizard Section */
.wizard-section {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.wizard-section.active {
    display: block;
}

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

/* Live Fee Panel */
.fee-panel {
    background: rgba(79, 70, 229, 0.08);
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.fee-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.fee-row.total {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.75rem;
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff;
}

/* Drag & Drop Area */
.file-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.02);
}

.file-dropzone:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

/* Database Status Flow Visualizer */
.flow-diagram {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 500px;
    margin: 2rem auto;
}

.flow-node {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.flow-node.active {
    background: var(--primary-light);
    border-color: var(--primary);
    box-shadow: var(--glow-primary);
}

.flow-arrow {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
}

/* Sidebar Dashboard Navigation */
.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

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

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid transparent;
}

.sidebar-link:hover, .sidebar-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
}

.sidebar-link.active {
    background: var(--primary-light);
    color: #fff;
    border-color: rgba(79, 70, 229, 0.3);
}

/* Table Style */
.table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.custom-table th {
    padding: 1rem;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 600;
}

.custom-table td {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

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

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    padding: 2.5rem;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

/* ==========================================================================
   THEME VARIATIONS
   ========================================================================== */

/* LIGHT THEME OVERRIDES */
body.theme-light {
    --bg-main: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --border-color: rgba(0, 0, 0, 0.08);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --shadow-main: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    color-scheme: light;
    background-image: 
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.04) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(147, 51, 234, 0.04) 0px, transparent 50%);
}

body.theme-light select option {
    background-color: #ffffff;
    color: #0f172a;
}

body.theme-light .navbar {
    background: rgba(248, 250, 252, 0.8);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.theme-light .logo {
    color: #0f172a;
}

body.theme-light .nav-link {
    color: #64748b;
}

body.theme-light .nav-link:hover, body.theme-light .nav-link.active {
    color: var(--primary);
    background: rgba(0, 0, 0, 0.03);
}

body.theme-light .form-control {
    background: rgba(0, 0, 0, 0.02);
    color: #0f172a;
    border-color: rgba(0, 0, 0, 0.1);
}

body.theme-light .form-control:focus {
    background: #fff;
    border-color: var(--primary);
}

body.theme-light .step-num {
    background: #f1f5f9;
}

body.theme-light .modal-content {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15);
}

body.theme-light .flow-node {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}

body.theme-light .custom-table th {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .custom-table td {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

/* CYBERPUNK THEME OVERRIDES */
body.theme-cyber {
    --bg-main: #05010d;
    --bg-card: rgba(13, 3, 26, 0.75);
    --bg-card-hover: rgba(25, 6, 51, 0.85);
    --border-color: rgba(244, 63, 94, 0.25);
    --primary: hsl(320, 100%, 50%); /* Neon Pink */
    --primary-hover: hsl(320, 100%, 60%);
    --secondary: hsl(180, 100%, 50%); /* Neon Cyan */
    --text-main: #fcfaff;
    --text-muted: #a78bfa;
    --glow-primary: 0 0 20px rgba(244, 63, 94, 0.4);
    background-image: 
        radial-gradient(at 0% 0%, rgba(244, 63, 94, 0.15) 0px, transparent 45%),
        radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.12) 0px, transparent 45%);
}

body.theme-cyber select option {
    background-color: #0d031a;
    color: #fcfaff;
}

body.theme-cyber .form-control {
    border-color: rgba(167, 139, 250, 0.3);
}

body.theme-cyber .wizard-steps::before {
    background: rgba(244, 63, 94, 0.1);
}

body.theme-cyber .step-num {
    background: #0d031a;
    border-color: rgba(244, 63, 94, 0.25);
}

body.theme-cyber .modal-content {
    background: #0d031a;
    border-color: var(--border-color);
}

