/* 1. Layout Base */
html, body {
    height: 100%;
    margin: 0;
}

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background: #f0f2f5; 
    display: flex;
    flex-direction: column;
}

/* 2. Navigation & Burger Menu */
nav { 
    background: #1a237e; 
    padding: 10px 5%; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
}

/* Desktop Links */
.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-links li a {
    text-decoration: none;
    color: #ffffff !important; 
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: #ffca28 !important; 
}

/* Icons & Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

/* Hamburger Icon Styling */
.burger {
    display: none; 
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
    z-index: 1001;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: #ffffff; 
    margin: 5px;
    transition: all 0.3s ease;
    border-radius: 3px;
}

/* 3. Main Content Containers - WIDENED FOR DESKTOP */
.main-container, .dashboard-container { 
    width: 95%; /* Ensures it doesn't touch screen edges */
    max-width: 1400px; /* Increased from 1100px */
    margin: 30px auto; 
    background: white; 
    padding: 30px; 
    border-radius: 8px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    flex: 1 0 auto; 
}

.header-section { 
    margin-bottom: 30px; 
    border-left: 5px solid #1a237e; 
    padding-left: 15px; 
}

.header-section h1 { margin: 0; color: #1a237e; }
.header-section p { margin: 5px 0 0; color: #666; }

/* 4. Dashboard Widgets (Cards) */
.widget-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 20px; 
    margin-bottom: 30px; 
}

.widget-card { 
    background: white; 
    padding: 25px; 
    border-radius: 12px; 
    display: flex; 
    align-items: center; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s;
    border: 1px solid #eee;
}

.widget-card:hover { transform: translateY(-5px); }
.widget-icon { font-size: 2.5rem; margin-right: 20px; }
.widget-info h3 { margin: 0; font-size: 0.85rem; color: #777; text-transform: uppercase; letter-spacing: 1px; }
.widget-info .stat { margin: 5px 0 0 0; font-size: 1.8rem; font-weight: bold; color: #333; }

/* Widget Accents */
.blue { border-bottom: 5px solid #1a237e; }
.green { border-bottom: 5px solid #2e7d32; }
.gold { border-bottom: 5px solid #f57c00; }

/* 5. Financial Overview Card */
.billing-summary {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #eee;
    margin-bottom: 30px;
}

.billing-flex { 
    display: flex; 
    justify-content: space-between; 
    margin: 20px 0;
}

.bill-item { text-align: center; flex: 1; }
.bill-item label { display: block; color: #888; font-size: 0.8rem; margin-bottom: 5px; }
.bill-item .val { font-size: 1.3rem; font-weight: bold; color: #222; }

/* 6. Forms & Inputs */
input, select, textarea { 
    width: 100%; 
    padding: 12px; 
    margin-top: 8px; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    box-sizing: border-box; 
    font-size: 1rem;
}

/* 7. Buttons */
button, .btn-submit, .btn-primary { 
    background: #2e7d32; 
    color: white; 
    border: none; 
    padding: 12px 25px; 
    cursor: pointer; 
    border-radius: 4px; 
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s;
}
.btn-primary { background: #1a237e; }

/* 8. Footer Styling */
.main-footer {
    flex-shrink: 0;
    background: #2c3e50;
    color: #ecf0f1;
    padding: 25px 0;
    margin-top: 50px;
    border-top: 5px solid #1a237e;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.main-footer .container, 
.footer-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* 9. Mobile Navigation Logic (FIXED SPACING) */
@media (max-width: 992px) {
    .burger {
        display: block;
        order: 2;
    }

    .logo-container {
        order: 1;
    }

    .nav-links {
        position: fixed;
        right: -100%; 
        top: 70px;
        flex-direction: column;
        background: #1a237e; 
        width: 220px; 
        height: auto; 
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        transition: 0.3s ease;
        box-shadow: -5px 5px 15px rgba(0,0,0,0.3);
        padding: 0; 
        gap: 0; 
        display: block; 
        z-index: 1001;
    }

    .nav-links.nav-active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
        display: block;
        margin: 0;
        padding: 0;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .nav-links li a {
        font-size: 0.85rem !important; 
        padding: 12px 20px; 
        display: block;
        text-align: left; 
    }

    .logout-btn {
        margin: 15px 20px !important; 
        width: calc(100% - 40px) !important;
        font-size: 0.8rem !important;
        display: block;
        padding: 10px;
    }
}

/* 10. Dashboard Responsive */
@media (max-width: 768px) {
    .billing-flex { flex-direction: column; gap: 20px; }
    .footer-content { flex-direction: column; text-align: center; gap: 15px; }
    .widget-grid { grid-template-columns: 1fr; }
    .main-container, .dashboard-container { padding: 15px; margin: 15px auto; width: 92%; }
}

/* --- Modern Tutorial Modal Styling --- */
.t-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000000;
    padding: 20px;
}

.t-modal-content {
    background: white;
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    position: relative;
    animation: t-modalEntry 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.t-modal-header {
    margin-bottom: 25px;
    text-align: center;
}

.t-modal-header h2 {
    color: #1a237e;
    font-size: 1.8rem;
    margin: 0;
}

.t-close {
    position: absolute;
    top: 20px;
    right: 25px;
    cursor: pointer;
    font-size: 28px;
    color: #ccc;
    transition: color 0.3s;
}
.t-close:hover { color: #d32f2f; }

/* --- Step Layout --- */
.t-modal-body {
    display: flex;
    flex-direction: column;
    gap: 25px; 
    margin-bottom: 30px;
}

.t-step {
    display: flex;
    align-items: flex-start;
    background: #f8f9ff;
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid #1a237e;
}

.t-icon {
    font-size: 24px;
    min-width: 45px;
    height: 45px;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    margin-right: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.t-step div { flex: 1; }

.t-step h3 {
    color: #1a237e;
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.t-step p {
    color: #555;
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
}

/* --- Footer & Button --- */
.t-modal-footer {
    margin-top: 10px;
}

.t-btn {
    background: #1a237e;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(26, 35, 126, 0.3);
}

.t-btn:hover {
    background: #ffca28;
    color: #1a237e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 202, 40, 0.4);
}

@keyframes t-modalEntry {
    from { transform: scale(0.8) translateY(30px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

/* Mobile Adjustments */
@media (max-width: 500px) {
    .t-modal-content { padding: 25px; }
    .t-step { flex-direction: column; align-items: center; text-align: center; }
    .t-icon { margin-right: 0; margin-bottom: 10px; }
}