/* FILE: /views/css/frontend-style.css */

/* ==========================================================================
   GLOBAL VARIABLES & TYPOGRAPHY
   ========================================================================== */
:root {
    --primary-blue: #2563eb;
    --dark-blue: #0b2239;
    --purple: #9333ea;
    --green: #16a34a;
    --red: #dc2626;
    --gold: #d97706;
    --orange: #ea580c;
    
    --text-main: #1e293b;
    --text-muted: #64748b;
    
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    background-color: #f1f5f9; /* Soft background for the whole site */
    margin: 0;
    padding: 0;
}

/* ==========================================================================
   DASHBOARD LAYOUT
   ========================================================================== */
.dashboard-wrapper { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 20px; 
}

.dashboard-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 30px; 
}

.dashboard-header h1 { 
    color: var(--dark-blue); 
    margin: 0 0 5px 0; 
}

.subtitle { 
    color: var(--text-muted); 
    margin: 0; 
}

.header-actions { 
    display: flex; 
    gap: 10px; 
}

.dashboard-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); 
    gap: 20px; 
}

/* ==========================================================================
   WIDGETS & CARDS
   ========================================================================== */
.widget { 
    background: #ffffff; 
    border-radius: 12px; 
    padding: 25px; 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03); 
    border: 1px solid var(--border-color); 
}

.widget h2 { 
    margin-top: 0; 
    font-size: 1.25rem; 
    color: var(--text-main); 
    border-bottom: 2px solid var(--bg-light); 
    padding-bottom: 10px; 
    margin-bottom: 20px; 
}

/* Stats Widget Specifics */
.stats-grid { 
    display: flex; 
    gap: 15px; 
    justify-content: space-between; 
}

.stat-box { 
    background: var(--bg-light); 
    padding: 15px; 
    border-radius: 8px; 
    flex: 1; 
    text-align: center; 
    border: 1px solid var(--border-color); 
}

.stat-label { 
    display: block; 
    font-size: 0.85rem; 
    color: var(--text-muted); 
    margin-bottom: 5px; 
    text-transform: uppercase; 
    letter-spacing: 0.5px;
}

.stat-value { 
    display: block; 
    font-size: 1.8rem; 
    font-weight: 700; 
}

/* Web3 Widget Specifics */
.web3-widget { 
    background: linear-gradient(145deg, #ffffff, #fcfaf0); 
    border-color: #fef08a; 
}

.reward-balance { margin-bottom: 15px; }

.wallet-section { 
    background: var(--bg-light); 
    padding: 15px; 
    border-radius: 8px; 
    border: 1px dashed #cbd5e1; 
}

.wallet-info code { 
    background: var(--border-color); 
    padding: 2px 6px; 
    border-radius: 4px; 
    color: #0f172a; 
}

/* ==========================================================================
   TABLES & DATA DISPLAY
   ========================================================================== */
.data-table { 
    width: 100%; 
    border-collapse: collapse; 
    text-align: left; 
}

.data-table th { 
    color: var(--text-muted); 
    font-size: 0.85rem; 
    padding-bottom: 10px; 
    border-bottom: 2px solid var(--border-color); 
}

.data-table td { 
    padding: 12px 0; 
    border-bottom: 1px solid #f1f5f9; 
    font-size: 0.95rem; 
}

.truncate { 
    max-width: 200px; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.empty-state { 
    color: #94a3b8; 
    font-style: italic; 
    text-align: center; 
    padding: 20px 0; 
}

/* ==========================================================================
   BUTTONS, ALERTS & BADGES
   ========================================================================== */
.btn { 
    padding: 10px 20px; 
    border-radius: 6px; 
    text-decoration: none; 
    font-weight: 600; 
    cursor: pointer; 
    border: none; 
    transition: opacity 0.2s; 
    display: inline-block;
}

.btn:hover { opacity: 0.9; }
.btn-primary { background: var(--primary-blue); color: white; }
.btn-secondary { background: var(--purple); color: white; }
.btn-outline { background: transparent; border: 2px solid var(--primary-blue); color: var(--primary-blue); }

.alert {
    padding: 10px; 
    border-radius: 6px; 
    margin-bottom: 15px; 
}

.alert-warning { 
    background: #fef3c7; 
    color: #92400e; 
    border: 1px solid #fde68a; 
}

.badge { 
    padding: 4px 8px; 
    border-radius: 99px; 
    font-size: 0.75rem; 
    font-weight: 700; 
    color: white; 
}

.badge-success { background: var(--green); }
.badge-warning { background: var(--orange); }
.badge-danger { background: var(--red); }

/* ==========================================================================
   TEXT UTILITIES
   ========================================================================== */
.text-blue { color: var(--primary-blue); }
.text-green { color: var(--green); }
.text-purple { color: var(--purple); }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }

/* ==========================================================================
   RESPONSIVE QUERIES
   ========================================================================== */
@media (max-width: 768px) {
    .dashboard-header { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 15px; 
    }
    .stats-grid { flex-direction: column; }
    .dashboard-grid { grid-template-columns: 1fr; }
}
/* ==========================================================================
   GLOBAL LAYOUT (Header & Footer)
   ========================================================================== */
   
/* Navigation Bar */
.main-nav {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark-blue);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary-blue);
}

.nav-btn {
    padding: 8px 15px;
    font-size: 0.9rem;
}

.lang-toggle {
    font-size: 0.85rem;
    color: var(--border-color);
}

.active-lang {
    color: var(--primary-blue) !important;
    font-weight: 800;
}

/* Main Content Area */
.main-content {
    min-height: calc(100vh - 160px); /* Pushes the footer down */
    padding-top: 30px;
    padding-bottom: 50px;
}

/* Footer */
.main-footer {
    background-color: var(--dark-blue);
    color: #cbd5e1;
    padding: 30px 20px;
    text-align: center;
    font-size: 0.9rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
}

.footer-links a:hover {
    color: #ffffff;
}

/* Mobile Responsiveness for Header */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}
/* ==========================================================================
   HOME / LANDING PAGE
   ========================================================================== */
.hero-section {
    text-align: center;
    padding: 60px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 4rem;
    color: var(--dark-blue);
    margin-bottom: 15px;
    font-weight: 800;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-top: 0;
    margin-bottom: 40px;
    line-height: 1.4;
}

.hero-actions .btn-lg {
    padding: 15px 35px;
    font-size: 1.2rem;
    border-radius: 50px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.login-prompt {
    margin-top: 20px;
    font-size: 1rem;
    color: var(--text-muted);
}

.login-prompt a {
    text-decoration: none;
    font-weight: bold;
    transition: opacity 0.2s;
}

.login-prompt a:hover {
    opacity: 0.8;
}

/* Feature Grid Integration */
.features-container {
    max-width: 1100px;
    margin: 0 auto 60px auto;
    padding: 0 20px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    text-align: left;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature-card h3 {
    margin: 0 0 15px 0;
    color: var(--dark-blue);
    font-size: 1.4rem;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}
/* Secondary App Menu */
.sub-nav-wrapper {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.dashboard-tab-menu {
    display: flex;
    gap: 25px;
    padding-top: 10px;
    padding-bottom: 0;
    overflow-x: auto;
    white-space: nowrap;
}

.dashboard-tab-menu a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1rem;
    padding: 10px 5px;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.dashboard-tab-menu a:hover {
    color: var(--primary-blue);
}

.dashboard-tab-menu a.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

.dashboard-tab-menu a.menu-right {
    margin-left: auto;
    color: var(--text-main);
}