:root {
    --ink-blue: #001d39;
    --gold: #fcb21a;
    --bg-light: #f4f7f9;
}

* {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-user-select: text;
    touch-action: manipulation;
    box-sizing: border-box;
}

/* force remove all default link styling */
a {
    text-decoration: none !important;
    color: inherit !important;
}

a:visited {
    text-decoration: none !important;
    color: inherit !important;
}

a:hover {
    text-decoration: none !important;
    color: inherit !important;
}

a:focus {
    text-decoration: none !important;
    outline: none !important;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

html {
    font-size: 16px;
}

body { 
    margin: 0; 
    font-family: 'Segoe UI', sans-serif; 
    background: var(--bg-light); 
    font-size: 16px;
    width: 100%;
    overflow-x: hidden;
}

.dashboard-container { 
    display: flex; 
    flex-direction: row;
    min-height: 100vh; 
    width: 100%;
    overflow-x: hidden;
    height: auto;
}

/* Sidebar */
.side-nav { 
    width: 340px; 
    background: #001d39; 
    color: white; 
    padding: 20px 12px; 
    overflow-y: auto;
    overflow-x: hidden;
    flex-shrink: 0;
    font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    height: auto;
}
.nav-logo { 
    font-size: 2.8rem !important; 
    font-weight: 900 !important;
    margin-bottom: 25px !important; 
    border-bottom: 4px solid #fcb21a !important;
    padding: 12px 8px 12px 8px !important;
    word-break: break-word !important;
    letter-spacing: 2px !important;
    color: #fcb21a !important;
    display: block !important;
    text-align: center !important;
    border-radius: 8px !important;
    line-height: 1.3 !important;
}
.nav-logo span { 
    color: #fcb21a !important;
    font-weight: 900 !important;
}

.side-nav ul { 
    list-style: none !important; 
    padding: 0 !important; 
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
}
.side-nav li { 
    margin: 0 !important;
    display: block !important;
    list-style: none !important;
    list-style-type: none !important;
}
.side-nav li a { 
    color: #ffffff !important;
    text-decoration: none !important; 
    display: block !important; 
    padding: 11px 12px !important; 
    margin-bottom: 8px !important; 
    border-radius: 6px !important; 
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.2px !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    outline: none !important;
    transition: color 0.2s ease !important;
    list-style: none !important;
    list-style-type: none !important;
}
.side-nav li a, .side-nav li a:visited, .side-nav li a:focus, .side-nav li a:active {
    text-decoration: none !important;
    outline: none !important;
    color: #ffffff !important;
}
.side-nav li a:hover { 
    color: #fcb21a !important;
    text-decoration: none !important;
}
.side-nav li a.active { 
    color: #fcb21a !important; 
    text-decoration: none !important;
}

/* Remove all link underlines and enforce button style */
.side-nav a, .side-nav a:visited, .side-nav a:focus {
    text-decoration: none !important;
    outline: none !important;
    border-bottom: none !important;
    color: inherit !important;
}

.side-nav li a::before, 
.side-nav li a::after {
    content: none !important;
}

/* Override Bootstrap link styling */
.side-nav a[href], 
.side-nav a[href]:visited, 
.side-nav a[href]:hover, 
.side-nav a[href]:focus, 
.side-nav a[href]:active {
    text-decoration: none !important;
    border: none !important;
}

/* Special Navigation Links */
.logout-link {
    color: #ff9999 !important;
}

.logout-link:hover {
    color: #ff6b6b !important;
    text-decoration: none !important;
}

/* Section Headers */
.side-nav li[style*="TUTOR"] {
    background: rgba(252, 178, 26, 0.15) !important;
    border-radius: 6px !important;
    margin-bottom: 15px !important;
}

.side-nav li[style*="PROFILE"] {
    background: rgba(46, 204, 113, 0.1) !important;
    border-radius: 6px !important;
    margin-bottom: 15px !important;
}

/* Content Area */
.main-view { 
    flex: 1; 
    padding: 40px; 
    width: calc(100% - 340px) !important;
    min-width: 0;
    overflow: auto;
    background: #f4f7f9;
    height: auto;
}
.top-bar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}
.badge { 
    background: var(--ink-blue); 
    color: var(--gold); 
    padding: 5px 15px; 
    border-radius: 20px; 
    font-weight: bold;
    white-space: nowrap;
}

.welcome-box { 
    background: white; 
    padding: 25px; 
    border-radius: 12px; 
    border-left: 6px solid var(--gold); 
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    word-break: break-word;
    overflow-wrap: break-word;
}

.consult-banner { 
    margin-top: 50px; 
    background: linear-gradient(135deg, #001d39 0%, #003366 100%); 
    color: white; 
    padding: 40px; 
    border-radius: 15px; 
    position: relative; 
    overflow: hidden;
}
.btn-gold { 
    display: inline-block; 
    margin-top: 20px; 
    background: var(--gold); 
    color: var(--ink-blue); 
    padding: 12px 25px; 
    border-radius: 6px; 
    text-decoration: none; 
    font-weight: bold; 
    transition: 0.3s;
    white-space: nowrap;
}
.btn-gold:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 5px 15px rgba(252, 178, 26, 0.4); 
}

/* Mobile: Keep same layout, just adjust sizing */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    body {
        font-size: 14px;
    }

    .dashboard-container {
        flex-direction: column;
    }

    .side-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100% !important;
        height: auto;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        z-index: 1001;
        padding: 15px !important;
        border-radius: 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        margin: 0;
    }

    .side-nav.active {
        display: flex;
    }

    .mobile-nav-toggle {
        display: block;
        position: sticky;
        top: 0;
        width: calc(100% - 20px);
        margin: 10px;
        background: #001d39;
        color: white;
        border: none;
        padding: 12px 15px;
        font-size: 24px;
        cursor: pointer;
        z-index: 1002;
        border-radius: 5px;
    }

    .mobile-nav-toggle.active {
        background: #fcb21a;
        color: #001d39;
    }

    .main-view {
        padding: 20px 15px !important;
        flex: 1;
        min-width: 0;
        overflow: auto;
        height: auto;
        margin-top: 0;
    }

    .nav-logo { 
        font-size: 1.5rem !important;
        margin-bottom: 20px !important;
    }

    .top-bar { 
        gap: 10px;
        margin-bottom: 20px;
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        align-items: start !important;
    }

    .profile-header {
        grid-column: 2 !important;
        grid-row: 1 / 3 !important;
    }

    .badge {
        padding: 3px 8px; 
        font-size: 0.8rem;
    }

    .welcome-box { 
        padding: 20px;
    }

    h1 { font-size: 1.2rem !important; }
    h2 { font-size: 1rem !important; }
    h3 { font-size: 0.95rem !important; }
}

@media (max-width: 480px) {
    html {
        font-size: 13px;
    }

    body {
        font-size: 13px;
    }

    .dashboard-container {
        flex-direction: column;
    }

    .side-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100% !important;
        height: auto;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        z-index: 999;
        padding: 12px 10px !important;
        margin: 0;
        border-radius: 0;
    }

    .side-nav.active {
        display: flex;
    }

    .mobile-nav-toggle {
        display: block;
        position: sticky;
        top: 0;
        width: calc(100% - 20px);
        margin: 8px;
        padding: 10px 12px;
        font-size: 20px;
        z-index: 1000;
    }

    .nav-logo { 
        font-size: 1.2rem !important;
        margin-bottom: 15px !important;
        padding-bottom: 10px !important;
    }

    .side-nav li a { 
        padding: 10px 12px !important;
        font-size: 0.85rem !important;
        margin-bottom: 8px !important;
    }

    .main-view { 
        padding: 15px 10px !important;
        margin-top: 0;
    }

    .top-bar { 
        gap: 8px;
        margin-bottom: 15px;
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        align-items: start !important;
    }

    .profile-header {
        grid-column: 2 !important;
        grid-row: 1 / 3 !important;
        min-width: 95px !important;
        padding: 8px !important;
    }

    .user-greeting h2 {
        font-size: 1.1rem !important;
    }

    .user-greeting small {
        font-size: 0.8rem !important;
    }

    .welcome-box { 
        padding: 15px;
    }

    input, button, select, textarea { 
        font-size: 16px !important; 
        min-height: 44px !important;
        padding: 10px !important;
    }

    h1 { font-size: 1rem !important; }
    h2 { font-size: 0.9rem !important; }
    h3 { font-size: 0.85rem !important; }
}

@media (max-width: 360px) {
    html {
        font-size: 12px;
    }

    .dashboard-container {
        flex-direction: column;
    }

    .mobile-nav-toggle {
        display: block;
        position: sticky;
        top: 0;
        width: calc(100% - 20px);
        margin: 8px;
        padding: 8px 10px;
        font-size: 18px;
    }

    .side-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100% !important;
        height: auto;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        padding: 10px 6px !important;
        z-index: 999;
        margin: 0;
    }

    .side-nav.active {
        display: flex;
    }

    .nav-logo { 
        font-size: 1rem !important;
        margin-bottom: 8px !important;
    }

    .side-nav li a { 
        padding: 6px 8px !important;
        font-size: 0.65rem !important;
    }

    .main-view {
        padding: 10px 8px !important;
        flex: 1;
        min-width: 0;
        overflow: auto;
        height: auto;
        margin-top: 0;
    }

    .top-bar {
        gap: 8px;
    }

    .user-greeting h2 {
        font-size: 1rem;
    }

    .welcome-box {
        padding: 10px !important;
    }

    .welcome-box h1 {
        font-size: 1rem;
    }

    button, input, textarea, select {
        font-size: 14px !important;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 12px !important;
    }

    body,
    .main-view,
    .service-content,
    .content-area {
        font-size: 12px !important;
        line-height: 1.15 !important;
    }

    .side-nav li a,
    .top-bar *,
    .user-greeting *,
    .profile-header *,
    .welcome-box *,
    .consult-banner *,
    .stat-card *,
    .course-card *,
    .service-card *,
    .services-wrap *,
    .services-hero *,
    h1, h2, h3, h4, h5, h6,
    p, span, small,
    a, button, label {
        white-space: nowrap !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
        text-overflow: ellipsis !important;
        overflow: hidden !important;
    }

    .main-view,
    .service-content,
    .content-area,
    .top-bar,
    .welcome-box,
    .consult-banner,
    .stat-card,
    .course-card,
    .service-card,
    .services-wrap,
    .services-hero {
        overflow-x: auto !important;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 11px !important;
    }

    body,
    .main-view,
    .service-content,
    .content-area {
        font-size: 11px !important;
        line-height: 1.1 !important;
    }
}