:root {
    --primary: #064e3b; /* Deep Emerald */
    --primary-light: #047857;
    --primary-dark: #022c22;
    --accent: #fbbf24; /* Gold/Yellow */
    --accent-hover: #f59e0b;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    color: var(--primary-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography Utilities */
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-right { text-align: right; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-6 { margin-top: 1.5rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
    font-size: 0.95rem;
}

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

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-1px);
}

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

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

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

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

.btn-lg {
    padding: 14px 28px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-full {
    width: 100%;
}

/* Navigation */
.navbar {
    background-color: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

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

.nav-links a:not(.btn) {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:not(.btn):hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 100px 0;
    color: white;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    color: white;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
}

.digital-only-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.9rem;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.2);
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.feature-card {
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    background: #ecfdf5;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

/* Sections */
.features {
    padding: 80px 24px;
}

.section-header {
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.plans-section {
    background-color: white;
    padding: 80px 0;
    border-top: 1px solid var(--border);
}

.plan-showcase {
    display: flex;
    background: var(--bg-main);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    max-width: 900px;
    margin: 0 auto;
}

.plan-image {
    flex: 1;
    background-size: cover;
    background-position: center;
    min-height: 300px;
}

.plan-details {
    flex: 1;
    padding: 40px;
    border: none;
    border-radius: 0;
    box-shadow: none;
    position: relative;
}

.badge {
    display: inline-block;
    background: var(--accent);
    color: var(--primary-dark);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 20px 0;
    color: var(--primary);
}

.multiplier {
    font-size: 3rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
}

.duration {
    font-size: 1.2rem;
    font-weight: 500;
}

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

.plan-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--text-main);
}

.fee-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 16px;
}

/* Auth Pages */
.auth-page {
    background-color: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

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

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    margin-bottom: 32px;
}

.auth-card {
    padding: 40px 32px;
}

.auth-card h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

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

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

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-main);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    background-color: var(--bg-main);
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(6, 78, 59, 0.1);
}

.fee-box {
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 24px;
}

.fee-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    color: #92400e;
}

.fee-header strong {
    font-size: 1.2rem;
}

.fee-box p {
    font-size: 0.85rem;
    color: #b45309;
    margin: 0;
}

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

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

.admin-hint {
    margin-top: 16px;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-error {
    background-color: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #ecfdf5;
    color: var(--success);
    border: 1px solid #a7f3d0;
}

/* Dashboard Layout */
.dashboard-body {
    background-color: #f1f5f9;
}

.dashboard-nav {
    background-color: var(--primary-dark);
}

.dashboard-nav .logo,
.dashboard-nav .user-greeting {
    color: white;
}

.dashboard-nav .btn-outline {
    border-color: rgba(255,255,255,0.3);
    color: white;
}

.dashboard-nav .btn-outline:hover {
    background-color: rgba(255,255,255,0.1);
}

.dashboard-container {
    padding-top: 32px;
    padding-bottom: 64px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 24px;
}

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

.card-header h3 {
    font-size: 1.2rem;
    margin: 0;
}

/* Balance Card */
.balance-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    margin-bottom: 24px;
}

.balance-card h3 {
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
    font-weight: 500;
}

.balance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.status-badge {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.balance-amount {
    font-size: 3.5rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 32px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.balance-amount .currency {
    font-size: 2rem;
    opacity: 0.8;
}

.balance-actions {
    display: flex;
    gap: 16px;
}

.balance-actions .btn-outline {
    border-color: rgba(255,255,255,0.3);
    color: white;
}

.balance-actions .btn-outline:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Invest Card */
.invest-card {
    background-color: var(--primary-dark);
    color: white;
    border: none;
    margin-bottom: 24px;
}

.invest-card .card-header {
    border-color: rgba(255,255,255,0.1);
}

.invest-card h3 {
    color: white;
}

.invest-card label {
    color: rgba(255,255,255,0.8);
}

.invest-card input {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    color: white;
}

.invest-card input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
}

.expected-return {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(0,0,0,0.2);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.expected-return strong {
    color: var(--accent);
    font-size: 1.2rem;
}

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

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

.data-table th,
.data-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

/* Admin Specific */
.admin-body {
    background-color: #f8fafc;
}

.admin-nav {
    background-color: #0f172a;
}

.admin-header {
    margin-bottom: 32px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.master-pool-card .stat-icon {
    background: #ecfdf5;
    color: var(--primary);
}

.profit-card .stat-icon {
    background: #f0fdf4;
    color: var(--success);
}

.liability-card .stat-icon {
    background: #fffbeb;
    color: var(--warning);
}

.stat-details h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-family: 'Inter', sans-serif;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 4px;
}

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

.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
}

.activity-content p {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

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

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 400px;
    animation: modalFadeIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

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

/* Footer */
footer {
    background-color: #0f172a;
    color: white;
    padding: 60px 0 24px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 48px;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-brand h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.footer-brand p {
    color: #94a3b8;
    max-width: 300px;
}

.footer-links h4 {
    color: white;
    margin-bottom: 16px;
}

.footer-links a {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .plan-showcase {
        flex-direction: column;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
}
