/**
 * CREST Olympiads - Dashboard Styling
 * =====================================
 * Modern card-based dashboard design using the navy color palette.
 * Works with Materialize/Bootstrap 3 framework.
 *
 * Created: 2026-01-27
 */

/* ==========================================================================
   CSS Custom Properties for Dashboard
   ========================================================================== */

:root {
    /* Dashboard-specific spacing */
    --dashboard-gap: 16px;
    --dashboard-radius: 8px;
    --card-padding: 20px;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   Dashboard Layout - Clean Spacing Control
   ========================================================================== */

/* Dashboard pages don't show marquee, so reduce body padding-top
   Normal pages: 114px (navbar + marquee)
   Dashboard pages: navbar only, no marquee */
@media only screen and (min-width: 1024px) {
    body.dashboard-page {
        padding-top: 110px;
    }
}

/* Dashboard container */
.dashboard-page .container {
    padding-top: 0;
    padding-bottom: 8px;
    margin-top: 0;
}

.dashboard-page .col-md-10.content,
.dashboard-page .content-wrapper {
    background-color: #FAFAFA;
    min-height: calc(100vh - 200px);
    padding: 12px 16px;
}

/* Dashboard h1 styling */
.dashboard-page h1 {
    margin: 8px 0 12px 0;
    padding: 0;
    font-size: 22px;
    color: #212121;
    text-align: center;
    font-family: 'Ultra', sans-serif;
}

/* Row containing h1 */
.dashboard-page .row.text-center {
    margin-top: 0;
    margin-bottom: 8px;
}

/* Row contact section */
.dashboard-page .row.contact {
    margin-top: 8px;
}

/* Well/card containers */
.dashboard-page .well {
    margin-bottom: 12px;
    padding: 16px;
    border-radius: 8px;
}

/* Dashboard well - replaces inline margin:2rem */
.dashboard-well {
    margin: 0 2rem 12px 2rem;
    padding: 16px;
    border-radius: 8px;
}

.dashboard-container {
    padding: var(--dashboard-gap);
    max-width: 1400px;
    margin: 0 auto;
}

/* ==========================================================================
   Dashboard Cards
   ========================================================================== */

.dashboard-card {
    background: #FFFFFF;
    border: 1px solid #EEEEEE;
    border-radius: var(--dashboard-radius);
    padding: var(--card-padding);
    margin-bottom: var(--dashboard-gap);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.dashboard-card:hover {
    box-shadow: var(--shadow-md);
}

/* Card Header */
.dashboard-card-header {
    font-size: 16px;
    font-weight: 600;
    color: #424242;
    padding-bottom: 12px;
    border-bottom: 1px solid #EEEEEE;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-card-header .material-icons,
.dashboard-card-header i {
    color: #616161;
    margin-right: 8px;
}

/* Card Body */
.dashboard-card-body {
    color: #424242;
}

/* Card Footer */
.dashboard-card-footer {
    padding-top: 12px;
    border-top: 1px solid #EEEEEE;
    margin-top: 16px;
}

/* ==========================================================================
   Welcome Banner / Hero Card
   ========================================================================== */

.welcome-banner {
    background: #0F5A7E;
    color: #FFFFFF;
    border-radius: var(--dashboard-radius);
    padding: 24px 28px;
    margin-bottom: var(--dashboard-gap);
    box-shadow: var(--shadow-md);
}

.welcome-banner h2,
.welcome-banner h3 {
    color: #FFFFFF;
    margin: 0 0 8px 0;
}

.welcome-banner p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.welcome-banner .student-name {
    font-weight: 700;
}

.welcome-banner .class-info {
    opacity: 0.85;
    font-size: 14px;
}

/* ==========================================================================
   Quick Action Cards / Module Boxes
   ========================================================================== */

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--dashboard-gap);
    margin-bottom: var(--dashboard-gap);
}

.action-card {
    background: #FFFFFF;
    border: 1px solid #EEEEEE;
    border-radius: var(--dashboard-radius);
    padding: 20px 16px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.action-card:hover {
    border-color: #cfbaf0;  /* Periwinkle accent on hover */
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.action-card .icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #F5F5F5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.action-card .icon i,
.action-card .icon .material-icons {
    color: #616161;
    font-size: 24px;
}

/* Action card icon variants - use pastel accents sparingly */
.action-card.accent-warm .icon { border-bottom: 2px solid #fde4cf; }
.action-card.accent-pink .icon { border-bottom: 2px solid #ffcfd2; }
.action-card.accent-lavender .icon { border-bottom: 2px solid #cfbaf0; }
.action-card.accent-mint .icon { border-bottom: 2px solid #98f5e1; }

.action-card .title {
    color: #424242;
    font-weight: 600;
    font-size: 14px;
    margin: 0;
}

.action-card .subtitle {
    color: #757575;
    font-size: 12px;
    margin-top: 4px;
}

/* Variant: Subscription Card */
.action-card.subscription {
    background: #0F5A7E;
    border: none;
}

.action-card.subscription .icon {
    background: rgba(255, 255, 255, 0.2);
}

.action-card.subscription .icon i {
    color: #FFFFFF;
}

.action-card.subscription .title,
.action-card.subscription .subtitle {
    color: #FFFFFF;
}

.action-card.subscription:hover {
    box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   Stats Cards
   ========================================================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--dashboard-gap);
    margin-bottom: var(--dashboard-gap);
}

.stat-card {
    background: #FFFFFF;
    border: 1px solid #EEEEEE;
    border-radius: var(--dashboard-radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #424242;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 14px;
    color: #757575;
    font-weight: 500;
}

.stat-card .stat-change {
    font-size: 12px;
    margin-top: 8px;
}

.stat-card .stat-change.positive {
    color: #4CAF50;
}

.stat-card .stat-change.negative {
    color: #E53935;
}

/* ==========================================================================
   Progress Cards
   ========================================================================== */

.progress-card {
    background: #FFFFFF;
    border: 1px solid #EEEEEE;
    border-radius: var(--dashboard-radius);
    padding: 20px;
    margin-bottom: var(--dashboard-gap);
}

.progress-card .progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.progress-card .progress-title {
    font-weight: 600;
    color: #424242;
    font-size: 14px;
}

.progress-card .progress-value {
    font-weight: 700;
    color: #424242;
    font-size: 14px;
}

.progress-card .progress {
    height: 8px;
    background: #EEEEEE;
    border-radius: 4px;
    overflow: hidden;
}

.progress-card .progress .determinate {
    background: #0F5A7E;
    border-radius: 4px;
}

/* ==========================================================================
   Dashboard Tables
   ========================================================================== */

.dashboard-table {
    width: 100%;
    background: #FFFFFF;
    border-radius: var(--dashboard-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.dashboard-table thead th {
    background: #0F5A7E;
    color: #FFFFFF;
    font-weight: 600;
    font-size: 13px;
    padding: 14px 16px;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #EEEEEE;
    color: #424242;
    font-size: 14px;
}

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

.dashboard-table tbody tr:hover {
    background: #FAFAFA;
}

/* Responsive Table - Cards on Mobile */
@media (max-width: 768px) {
    .responsive-table-cards thead {
        display: none;
    }

    .responsive-table-cards tbody tr {
        display: block;
        background: #FFFFFF;
        border: 1px solid #EEEEEE;
        border-radius: var(--dashboard-radius);
        padding: 16px;
        margin-bottom: 12px;
        box-shadow: var(--shadow-sm);
    }

    .responsive-table-cards tbody td {
        display: block;
        padding: 8px 0;
        border-bottom: none;
        text-align: left;
    }

    .responsive-table-cards tbody td:before {
        content: attr(data-label);
        font-weight: 600;
        color: #757575;
        font-size: 12px;
        text-transform: uppercase;
        display: block;
        margin-bottom: 4px;
    }
}

/* ==========================================================================
   Notification / Alert Cards
   ========================================================================== */

.notification-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: var(--dashboard-radius);
    margin-bottom: 12px;
}

.notification-card.info {
    background: #FAFAFA;
    border-left: 3px solid #cfbaf0;  /* Periwinkle accent */
}

.notification-card.success {
    background: #E8F5E9;
    border-left: 4px solid #4CAF50;
}

.notification-card.warning {
    background: #FFF3E0;
    border-left: 4px solid #FB8C00;
}

.notification-card.error {
    background: #FFEBEE;
    border-left: 4px solid #E53935;
}

.notification-card .icon i {
    font-size: 24px;
}

.notification-card.info .icon i { color: #0F5A7E; }
.notification-card.success .icon i { color: #4CAF50; }
.notification-card.warning .icon i { color: #FB8C00; }
.notification-card.error .icon i { color: #E53935; }

.notification-card .content {
    flex: 1;
}

.notification-card .title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.notification-card .message {
    font-size: 13px;
    color: #616161;
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #757575;
}

.empty-state .icon {
    font-size: 64px;
    color: #BDBDBD;
    margin-bottom: 16px;
}

.empty-state .title {
    font-size: 18px;
    font-weight: 600;
    color: #424242;
    margin-bottom: 8px;
}

.empty-state .description {
    font-size: 14px;
    margin-bottom: 20px;
}

/* ==========================================================================
   Dashboard Buttons
   ========================================================================== */

.btn-dashboard {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    border: none;
}

.btn-dashboard.primary {
    background: #0F5A7E;
    color: #FFFFFF;
}

.btn-dashboard.primary:hover {
    background: #1A7BA8;
}

.btn-dashboard.secondary {
    background: transparent;
    color: #0F5A7E;
    border: 1px solid #0F5A7E;
}

.btn-dashboard.secondary:hover {
    background: #0F5A7E;
    color: #FFFFFF;
}

.btn-dashboard.small {
    padding: 6px 12px;
    font-size: 12px;
}

/* ==========================================================================
   Badge Styles
   ========================================================================== */

.badge-dashboard {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-dashboard.success {
    background: #E8F5E9;
    color: #2E7D32;
}

.badge-dashboard.warning {
    background: #FFF3E0;
    color: #E65100;
}

.badge-dashboard.info {
    background: #F5F5F5;
    color: #424242;
    border: 1px solid #E0E0E0;
}

.badge-dashboard.pending {
    background: #EEEEEE;
    color: #616161;
}

/* ==========================================================================
   Section Headers
   ========================================================================== */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #EEEEEE;
}

.section-header h3,
.section-header .title {
    font-size: 18px;
    font-weight: 600;
    color: #424242;
    margin: 0;
}

.section-header .view-all {
    font-size: 13px;
    color: #0F5A7E;  /* Keep navy for interactive links */
    font-weight: 500;
    text-decoration: none;
}

.section-header .view-all:hover {
    text-decoration: underline;
}

/* ==========================================================================
   List Items
   ========================================================================== */

.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #EEEEEE;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #F5F5F5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.list-item .avatar i {
    color: #616161;
    font-size: 20px;
}

.list-item .content {
    flex: 1;
    min-width: 0;
}

.list-item .title {
    font-weight: 600;
    font-size: 14px;
    color: #424242;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-item .subtitle {
    font-size: 12px;
    color: #757575;
    margin: 2px 0 0;
}

.list-item .action {
    flex-shrink: 0;
}

/* ==========================================================================
   Dashboard Mobile Overrides
   ========================================================================== */

@media (max-width: 768px) {
    .dashboard-container {
        padding: 12px;
    }

    .dashboard-card {
        padding: 16px;
    }

    .welcome-banner {
        padding: 20px;
    }

    .welcome-banner h2 {
        font-size: 20px;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .action-card {
        padding: 16px 12px;
    }

    .action-card .icon {
        width: 40px;
        height: 40px;
    }

    .action-card .icon i {
        font-size: 20px;
    }

    .action-card .title {
        font-size: 12px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card .stat-value {
        font-size: 24px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    /* Dashboard h1 - mobile sizing */
    .dashboard-page h1 {
        font-size: 18px;
    }

    /* Hello section - mobile adjustment */
    .hello-section {
        margin-left: 0;
        margin-right: 0;
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* Hello section - extra small screen adjustment */
    .hello-section {
        padding: 10px 12px;
    }
}

/* ==========================================================================
   Hello Section Base Styles
   ========================================================================== */

#hello {
    position: static;
    top: auto;
    margin-left: 0;
}

/* Modern Hello Section - White card with navy left accent border */
.hello-section {
    background: #FFFFFF;
    color: #424242;
    padding: 16px 20px;
    border-radius: var(--dashboard-radius);
    margin-bottom: 12px;
    border-left: 4px solid #0F5A7E;  /* Navy accent to match menu bar */
    box-shadow: none;
}

.hello-section strong {
    font-weight: 600;
    color: #424242;
}

.hello-section a {
    color: #0F5A7E;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hello-section a:hover {
    color: #1A7BA8;
}

.hello-section p {
    margin: 6px 0 0 0;
    font-size: 13px;
    color: #616161;
}

/* Hello Section - Avatar + Text layout */
.hello-section {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.hello-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.hello-avatar-edit {
    position: absolute;
    bottom: -2px;
    right: -4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #0F5A7E;
    color: #fff;
    border: 2px solid #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: background 0.2s;
}

.hello-avatar-edit:hover {
    background: #1A7BA8;
}

.hello-avatar-edit .material-icons {
    font-size: 12px;
}

.hello-text {
    min-width: 0;
    flex: 1;
}

/* Avatar Edit Modal */
.hello-avatar-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hello-avatar-modal-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    max-width: 420px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

.hello-avatar-modal-card h5 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: #0A4560;
    text-align: center;
}

/* Two-option picker row (Upload Photo + Choose Avatar) */
.hello-pic-row {
    display: flex;
    gap: 14px;
    margin-bottom: 16px;
}

.hello-pic-box {
    flex: 1;
    padding: 16px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hello-pic-box:hover {
    border-color: #a3c4f3;
    background: #f8f9fa;
}

.hello-pic-box.selected {
    border-color: #0F5A7E;
    background: linear-gradient(135deg, #a3c4f3 0%, #98f5e1 100%);
}

.hello-pic-box i.box-icon {
    font-size: 36px;
    color: #0F5A7E;
    margin-bottom: 8px;
}

.hello-pic-box .box-title {
    font-size: 13px;
    font-weight: 600;
    color: #0A4560;
    margin-bottom: 4px;
}

.hello-pic-box .box-subtitle {
    font-size: 10px;
    color: #666;
}

.hello-upload-content .photo-uploaded {
    display: none;
}

.hello-upload-content.has-photo .photo-default {
    display: none;
}

.hello-upload-content.has-photo .photo-uploaded {
    display: block;
}

.hello-uploaded-preview {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #0F5A7E;
    margin-bottom: 6px;
}

.hello-pic-box .change-photo-link {
    font-size: 11px;
    color: #0F5A7E;
    text-decoration: underline;
}

.hello-avatar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.hello-avatar-grid .avatar-character-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 8px 4px;
    border-radius: 10px;
    border: 3px solid transparent;
    transition: all 0.2s;
    background: #f8f9fa;
}

.hello-avatar-grid .avatar-character-card:hover {
    transform: scale(1.05);
    border-color: #a3c4f3;
    background: #e8f4fd;
}

.hello-avatar-grid .avatar-character-card.selected {
    border-color: #0F5A7E;
    background: linear-gradient(135deg, #a3c4f3 0%, #98f5e1 100%);
}

.hello-avatar-grid .avatar-character-card img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 4px;
}

.hello-avatar-grid .avatar-character-card .avatar-char-name {
    font-size: 10px;
    font-weight: 600;
    color: #0A4560;
    text-align: center;
    line-height: 1.2;
}

.hello-avatar-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.hello-avatar-modal-cancel,
.hello-avatar-modal-save {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.hello-avatar-modal-cancel {
    background: #e0e0e0;
    color: #424242;
}

.hello-avatar-modal-cancel:hover {
    background: #d0d0d0;
}

.hello-avatar-modal-save {
    background: #0F5A7E;
    color: #fff;
}

.hello-avatar-modal-save:hover {
    background: #1A7BA8;
}

@media (max-width: 500px) {
    .hello-pic-row {
        flex-direction: column;
        gap: 10px;
    }

    .hello-pic-box {
        min-height: 90px;
    }

    .hello-avatar-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hello-avatar-modal-card {
        padding: 16px;
    }
}

/* ==========================================================================
   Dashboard Horizontal Menu - Navy Brand Strip Design
   Note: !important required here to override base menu.css styles
   ========================================================================== */

div#menu {
    background-color: #0F5A7E !important;
    border-bottom: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

div#menu ul.main-menu,
div#menu ul.main-menu.clearfix {
    background-color: #0F5A7E !important;
    background-image: none !important;
}

div#menu ul.main-menu > li {
    background-color: #0F5A7E !important;
    border-right: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-bottom: none !important;
}

div#menu ul.main-menu > li:last-child {
    border-right: none !important;
}

div#menu ul.main-menu > li > a {
    color: #FFFFFF !important;
    background-color: #0F5A7E !important;
}

div#menu ul.main-menu > li > a:hover {
    color: #FFFFFF !important;
    background-color: #1A7BA8 !important;
    border-bottom: 3px solid rgba(152, 245, 225, 0.5) !important;
}

div#menu ul.main-menu > li.active > a {
    color: #FFFFFF !important;
    background-color: #1A7BA8 !important;
    border-bottom: 3px solid #98f5e1 !important;
}

div#menu label#toggle-menu {
    background-color: #0F5A7E !important;
    color: #FFFFFF !important;
}

/* Submenu styling for navy menu */
div#menu .sub-menu {
    background-color: #FFFFFF !important;
    border: 1px solid #E0E0E0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

div#menu .sub-menu li a {
    color: #424242 !important;
    background-color: #FFFFFF !important;
}

div#menu .sub-menu li a:hover {
    color: #0F5A7E !important;
    background-color: #F5F5F5 !important;
}

/* Hide sidebar menu on tablet and mobile - use mobile fullscreen menu instead */
@media (max-width: 1023px) {
    div#menu {
        display: none !important;
    }
}

/* Override old box styles from user/index.php */
.col-md-10.content .col-md-4 > a > div,
.module-box {
    background: #FFFFFF;
    border: 1px solid #EEEEEE;
    border-radius: var(--dashboard-radius);
    padding: 20px;
    text-align: center;
    transition: all 0.2s ease;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.col-md-10.content .col-md-4 > a > div:hover,
.module-box:hover {
    border-color: #cfbaf0;  /* Periwinkle accent on hover */
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.col-md-10.content .col-md-4 > a > div i,
.module-box i {
    color: #616161;
    font-size: 48px;
    margin-bottom: 12px;
}

.col-md-10.content .col-md-4 > a > div span,
.module-box span {
    display: block;
    color: #424242;
    font-weight: 600;
    font-size: 14px;
}

/* ==========================================================================
   Global Page Styling - Consistent across all pages
   ========================================================================== */

/* Page headings - consistent styling */
.container h1 {
    color: #212121;
    font-family: 'Ultra', sans-serif;
    margin-bottom: var(--spacing-md);
}

/* Dashboard well container */
.dashboard-well,
.well.dashboard-well {
    background: #FFFFFF;
    border: 1px solid #EEEEEE;
    border-radius: 8px;
    padding: var(--spacing-md);
    margin: 0 var(--spacing-lg) var(--spacing-md) var(--spacing-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Collapsible sections - consistent styling */
.collapsible {
    border: 1px solid #EEEEEE;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.collapsible-header {
    background: #FAFAFA;
    color: #424242;
    font-weight: 500;
    border-bottom: 1px solid #EEEEEE;
}

.collapsible-header:hover {
    background: #F5F5F5;
}

.collapsible-header i {
    color: #616161;
}

.collapsible li.active .collapsible-header {
    background: #FFFFFF;
    border-left: 3px solid #cfbaf0;
}

.collapsible-body {
    background: #FFFFFF;
    padding: var(--spacing-md);
}

/* ==========================================================================
   Table Styling - Soothing Design
   ========================================================================== */

/* Base table styling */
table.striped,
table.responsive-table {
    background: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

table.striped thead tr,
table.responsive-table thead tr {
    background: #F8F9FA;
}

table.striped thead th,
table.responsive-table thead th {
    color: #424242;
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 2px solid #E0E0E0;
    font-size: 13px;
}

table.striped tbody td,
table.responsive-table tbody td {
    padding: 12px 16px;
    color: #424242;
    border-bottom: 1px solid #EEEEEE;
}

table.striped tbody tr:nth-of-type(odd) {
    background: #FAFAFA;
}

table.striped tbody tr:hover,
table.responsive-table tbody tr:hover {
    background: #F5F5F5;
}

/* ==========================================================================
   Button Styling - Consistent across pages
   ========================================================================== */

.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Dashboard button overrides - using attribute selector for higher specificity */
.btn.bg-primary,
.btn-primary,
button.btn-primary[type],
a.btn-primary[href] {
    background-color: #0F5A7E;
    color: #FFFFFF;
}

.btn.bg-primary:hover,
.btn-primary:hover,
button.btn-primary[type]:hover,
a.btn-primary[href]:hover {
    background-color: #1A7BA8;
}

/* ==========================================================================
   Mobile Fixes - Prevent Content Overlap
   ========================================================================== */

@media (max-width: 768px) {
    /* Container fixes */
    .container {
        padding-left: 10px;
        padding-right: 10px;
        overflow-x: hidden;
    }

    /* Dashboard well - mobile spacing */
    .dashboard-well,
    .well.dashboard-well {
        margin: 0 var(--spacing-sm) var(--spacing-md) var(--spacing-sm);
        padding: var(--spacing-sm);
    }

    /* Page heading - mobile size */
    .container h1 {
        font-size: 20px;
        line-height: 1.3;
        padding: 0 var(--spacing-sm);
        margin-bottom: var(--spacing-sm);
    }

    /* Table mobile fixes - prevent overlap */
    .responsive-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table.striped,
    table.responsive-table {
        min-width: 100%;
    }

    table.striped td,
    table.responsive-table td,
    table.striped th,
    table.responsive-table th {
        white-space: nowrap;
        padding: 10px 12px;
        font-size: 13px;
    }

    /* Collapsible mobile fixes */
    .collapsible-header {
        padding: 12px;
        font-size: 14px;
    }

    .collapsible-body {
        padding: var(--spacing-sm);
    }

    .collapsible-body table {
        font-size: 12px;
    }

    /* Button mobile sizing */
    .btn {
        padding: 8px 12px !important;
        font-size: 12px !important;
        white-space: nowrap;
    }

    /* Fix text overlap in table cells */
    table td span {
        display: block;
        line-height: 1.4;
    }

    /* Exam history specific fix */
    .row.contact {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    /* Extra small screen fixes */
    .container h1 {
        font-size: 18px;
    }

    .dashboard-well {
        margin: 0 var(--spacing-xs) var(--spacing-sm) var(--spacing-xs);
    }

    table.striped td,
    table.responsive-table td {
        padding: 8px 10px;
        font-size: 12px;
    }

    .btn {
        padding: 6px 10px !important;
        font-size: 11px !important;
    }

    /* Collapsible extra small */
    .collapsible-header {
        padding: 10px;
        font-size: 13px;
    }
}

/* ==========================================================================
   Exam History Page - Specific Fixes
   ========================================================================== */

/* Exam history table - prevent content overlap on scroll */
.row.contact table {
    table-layout: auto;
}

.row.contact table td {
    word-wrap: break-word;
    max-width: 200px;
}

@media (max-width: 768px) {
    .row.contact {
        margin: 0;
        padding: 0 var(--spacing-sm);
    }

    .row.contact table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .row.contact table td {
        max-width: none;
    }
}

/* ==========================================================================
   Results & Challenges Pages - Mobile Fixes
   ========================================================================== */

/* Results page styling */
#result {
    background: #FFFFFF;
    padding: var(--spacing-md);
    border-radius: 8px;
}

/* Challenge/View answers button styling */
.wnm-user {
    margin: 4px !important;
}

@media (max-width: 768px) {
    /* Results page mobile */
    #result {
        padding: var(--spacing-sm);
        overflow-x: auto;
    }

    /* Fix attempt text overlap */
    table td span[style*="font-style: italic"] {
        display: block;
        margin-top: 4px;
        font-size: 11px !important;
    }

    .wnm-user {
        display: block;
        margin: 8px 0 !important;
        width: 100%;
        text-align: center;
    }
}

/* ==========================================================================
   Profile Page Styling
   ========================================================================== */

/* Profile card styling */
.profile-card {
    background: #FFFFFF;
    border: 1px solid #EEEEEE;
    border-radius: 8px;
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.profile-card .profile-header {
    border-bottom: 1px solid #EEEEEE;
    padding-bottom: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.profile-card .profile-field {
    display: flex;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid #F5F5F5;
}

.profile-card .profile-field:last-child {
    border-bottom: none;
}

.profile-card .profile-label {
    flex: 0 0 140px;
    color: #757575;
    font-size: 13px;
}

.profile-card .profile-value {
    flex: 1;
    color: #424242;
    font-weight: 500;
}

@media (max-width: 768px) {
    .profile-card {
        padding: var(--spacing-md);
    }

    .profile-card .profile-field {
        flex-direction: column;
    }

    .profile-card .profile-label {
        flex: none;
        margin-bottom: 4px;
    }
}

/* ==========================================================================
   Access/Book Slot Page Styling
   ========================================================================== */

/* Slot booking cards */
.slot-card {
    background: #FFFFFF;
    border: 1px solid #EEEEEE;
    border-radius: 8px;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    transition: all 0.2s ease;
}

.slot-card:hover {
    border-color: #cfbaf0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.slot-card .slot-header {
    font-weight: 600;
    color: #424242;
    margin-bottom: var(--spacing-sm);
}

.slot-card .slot-time {
    color: #757575;
    font-size: 13px;
}

.slot-card .slot-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.slot-card .slot-status.available {
    background: #E8F5E9;
    color: #2E7D32;
}

.slot-card .slot-status.booked {
    background: #FFF3E0;
    color: #E65100;
}

/* ==========================================================================
   Additional Practice & Free Trial Pages
   ========================================================================== */

/* Subject collapsible styling */
.collapsible li {
    margin-bottom: 2px;
}

/* Attempts left text styling */
span[style*="color:red"] {
    color: #E53935 !important;
    font-size: 11px !important;
    display: block;
    margin-top: 4px;
}

@media (max-width: 768px) {
    /* Additional practice mobile layout */
    .collapsible-body table td:nth-child(5) {
        min-width: 120px;
    }

    /* Stack action buttons */
    .collapsible-body table .btn {
        display: block;
        width: 100%;
        margin-bottom: 4px;
    }
}

/* ==========================================================================
   Buy Books / Olympiad Books Page Styling
   ========================================================================== */

/* Books page container */
.olympiad-books-page .well {
    background: #FFFFFF;
    border: 1px solid #EEEEEE;
    border-radius: 8px;
    padding: var(--spacing-lg);
}

/* Book card styling */
.book-card {
    background: #FFFFFF;
    border: 1px solid #EEEEEE;
    border-radius: 8px;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    transition: all 0.2s ease;
}

.book-card:hover {
    border-color: #cfbaf0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.book-card img {
    max-width: 100%;
    border-radius: 4px;
    margin-bottom: var(--spacing-sm);
}

.book-card .book-title {
    font-weight: 600;
    color: #424242;
    margin-bottom: var(--spacing-xs);
}

.book-card .book-price {
    color: #0F5A7E;
    font-weight: 700;
    font-size: 18px;
}

/* Form fieldset styling */
fieldset {
    border: 1px solid #EEEEEE;
    border-radius: 8px;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    background: #FAFAFA;
    min-width: 0; /* Override browser default min-width: min-content to prevent overflow */
    max-width: 100%;
    box-sizing: border-box;
}

fieldset:disabled {
    opacity: 0.6;
}

/* ==========================================================================
   Registration Form Styling
   ========================================================================== */

/* Form well */
.row.contact .well {
    background: #FFFFFF;
    border: 1px solid #EEEEEE;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Input field icons */
.input-field .prefix {
    color: #757575;
}

.input-field .prefix.active {
    color: #0F5A7E;
}

/* Form labels */
.input-field > label {
    color: #757575;
}

.input-field > label.active {
    color: #0F5A7E;
}

/* Select dropdowns */
select {
    background: #FFFFFF;
    border: 1px solid #E0E0E0;
    border-radius: 4px;
    padding: 8px 12px;
}

select:focus {
    border-color: #0F5A7E;
    outline: none;
}

/* Radio and checkbox styling */
[type="radio"]:checked + span:after,
[type="radio"].with-gap:checked + span:after {
    background-color: #0F5A7E;
}

[type="radio"]:checked + span:after,
[type="radio"].with-gap:checked + span:before,
[type="radio"].with-gap:checked + span:after {
    border-color: #0F5A7E;
}

[type="checkbox"]:checked + span:not(.lever):before {
    border-right-color: #0F5A7E;
    border-bottom-color: #0F5A7E;
}

/* ==========================================================================
   Invoice Page Styling
   ========================================================================== */

.invoice-container {
    background: #FFFFFF;
    border: 1px solid #EEEEEE;
    border-radius: 8px;
    padding: var(--spacing-lg);
    margin: var(--spacing-md);
}

.invoice-header {
    border-bottom: 2px solid #E0E0E0;
    padding-bottom: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

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

.invoice-table th,
.invoice-table td {
    padding: 12px;
    border-bottom: 1px solid #EEEEEE;
    text-align: left;
}

.invoice-table th {
    background: #F8F9FA;
    font-weight: 600;
    color: #424242;
}

.invoice-total {
    font-weight: 700;
    font-size: 18px;
    color: #424242;
}

/* ==========================================================================
   Update Password / Upload Documents Styling
   ========================================================================== */

.settings-form {
    max-width: 500px;
    margin: 0 auto;
    background: #FFFFFF;
    border: 1px solid #EEEEEE;
    border-radius: 8px;
    padding: var(--spacing-lg);
}

.settings-form h2 {
    color: #424242;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid #EEEEEE;
}

.settings-form .btn {
    width: 100%;
    margin-top: var(--spacing-md);
}

/* ==========================================================================
   Reward Points Styling
   ========================================================================== */

.reward-card {
    background: linear-gradient(135deg, #fde4cf 0%, #ffcfd2 100%);
    border-radius: 12px;
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.reward-card .points-value {
    font-size: 48px;
    font-weight: 700;
    color: #424242;
}

.reward-card .points-label {
    color: #616161;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.reward-history {
    background: #FFFFFF;
    border: 1px solid #EEEEEE;
    border-radius: 8px;
}

.reward-history-item {
    padding: var(--spacing-md);
    border-bottom: 1px solid #EEEEEE;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reward-history-item:last-child {
    border-bottom: none;
}

.reward-history-item .points-earned {
    color: #2E7D32;
    font-weight: 600;
}

.reward-history-item .points-spent {
    color: #E53935;
    font-weight: 600;
}

/* ==========================================================================
   Exam History Page - Footer Overlap Fix
   ========================================================================== */

/* Container fix for pages loaded with leftmenu */
.dashboard-page .container {
    min-height: calc(100vh - 200px);
    padding-bottom: var(--spacing-xl);
}

/* Ensure row.contact has proper spacing from footer */
.dashboard-page .row.contact {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
}

/* Mobile-specific fixes for footer overlap */
@media (max-width: 768px) {
    /* Main container mobile fix */
    .dashboard-page .container {
        min-height: auto;
        padding-bottom: 100px; /* Space for mobile bottom nav + footer clearance */
    }

    /* Row contact mobile fix */
    .dashboard-page .row.contact {
        margin-bottom: 24px;
        padding-bottom: 16px;
    }

    /* Exam history table wrapper - prevent overlap */
    .dashboard-page .row.contact table {
        margin-bottom: 24px;
    }

    /* Ensure text center row (h1) doesn't overlap */
    .dashboard-page .row.text-center {
        position: relative;
        z-index: 1;
        background: #FAFAFA;
        margin: 0;
        padding: 16px 10px;
    }

    /* Clear floats and fix layout */
    .dashboard-page .container::after {
        content: "";
        display: table;
        clear: both;
    }
}

@media (max-width: 480px) {
    /* Extra small screens - more padding */
    .dashboard-page .container {
        padding-bottom: 120px;
    }

    .dashboard-page .row.contact {
        margin-left: -5px;
        margin-right: -5px;
        padding: 0 5px 24px 5px;
    }
}

/* ==========================================================================
   Footer Clearance - Global Fix
   ========================================================================== */

/* Ensure page content doesn't overlap with fixed scroll progress bar */
footer.page-footer {
    position: relative;
    z-index: 10;
    margin-top: var(--spacing-xl);
}

/* Add clearance before footer on all dashboard pages */
.dashboard-page footer.page-footer {
    margin-top: 32px;
}

@media (max-width: 768px) {
    footer.page-footer {
        margin-top: 24px;
        padding-bottom: 8px; /* Clear fixed progress bar */
    }
}

/* ==========================================================================
   Free Trial & Additional Practice Pages - Mobile Fixes
   ========================================================================== */

/* Common table fixes for ftuser and additionalpractice pages */
.dashboard-page table.table-striped,
.dashboard-page table.table-hover,
.dashboard-page .collapsible-body table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    /* Table cell text wrapping */
    .dashboard-page table td,
    .dashboard-page table th {
        white-space: nowrap;
        padding: 10px 8px;
        font-size: 13px;
        vertical-align: middle;
    }

    /* Button in table cells - prevent text overlap */
    .dashboard-page table td .btn,
    .dashboard-page table td a.btn {
        display: inline-block;
        padding: 6px 10px !important;
        font-size: 11px !important;
        white-space: nowrap;
        margin: 2px 0;
    }

    /* Attempt text styling */
    .dashboard-page table td span[style*="italic"] {
        display: block;
        margin-top: 4px;
        font-size: 10px !important;
    }

    /* Collapsible body on mobile */
    .dashboard-page .collapsible-body {
        padding: 8px;
        overflow-x: auto;
    }

    /* Well container mobile spacing */
    .dashboard-page .well.dashboard-well {
        padding: 12px;
        margin: 0 8px 16px 8px;
    }
}

/* ==========================================================================
   Additional Practice Index Page - Purchase Table Fix
   ========================================================================== */

/* Purchase table - desktop styling only */
.purchase-table {
    background: #FFFFFF;
    margin-top: 16px;
    border-radius: 8px;
}

.purchase-table .total-amount {
    font-weight: 700;
    font-size: 18px;
    color: #424242;
}

/* Pay button - using table context for specificity */
table.purchase-table .pay-now-btn,
.purchase-table button.pay-now-btn,
.purchase-table input.pay-now-btn[type="submit"] {
    background-color: #0F5A7E;
    color: #FFFFFF;
    padding: 12px 24px;
    font-size: 14px;
    border-radius: 6px;
}

table.purchase-table .pay-now-btn:disabled,
.purchase-table button.pay-now-btn:disabled {
    background-color: #BDBDBD;
    cursor: not-allowed;
}

/* Mobile styles are in the page itself to avoid conflicts */

/* ==========================================================================
   Additional Practice Invoice - Card Format on Mobile
   ========================================================================== */

@media (max-width: 768px) {
    /* Invoice table - convert to cards on mobile */
    .dashboard-page table.striped.highlight:not(.purchase-table) thead {
        display: none;
    }

    .dashboard-page table.striped.highlight:not(.purchase-table) tbody tr {
        display: block;
        background: #FFFFFF;
        border: 1px solid #EEEEEE;
        border-radius: 8px;
        padding: 12px;
        margin-bottom: 12px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    }

    .dashboard-page table.striped.highlight:not(.purchase-table) tbody td {
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
        border-bottom: 1px solid #F5F5F5;
        white-space: normal;
    }

    .dashboard-page table.striped.highlight:not(.purchase-table) tbody td:last-child {
        border-bottom: none;
    }

    .dashboard-page table.striped.highlight:not(.purchase-table) tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #757575;
        font-size: 12px;
        flex: 0 0 40%;
    }
}

/* ==========================================================================
   Results Page - Mobile Text Overlap Fix
   ========================================================================== */

/* Results table styling */
#result {
    background: #FFFFFF;
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.result-table {
    width: 100%;
    background: #FFFFFF;
}

.result-table th,
.result-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #EEEEEE;
}

@media (max-width: 768px) {
    #result {
        padding: var(--spacing-sm);
        margin: 0 -8px;
        border-radius: 0;
    }

    .result-table {
        font-size: 14px;
    }

    .result-table td {
        padding: 8px;
        word-break: break-word;
    }

    /* Student photo on results */
    #student_photograph {
        max-width: 60px;
        height: auto;
    }

    /* Share buttons mobile */
    .link_to_share {
        flex-direction: column;
        gap: 8px;
    }

    .link_to_share .col {
        width: 100% !important;
        text-align: center !important;
        margin-bottom: 8px;
    }

    .link_to_share .btn {
        width: 100%;
        margin-bottom: 8px;
    }
}

/* ==========================================================================
   Collapsible Tables - Mobile Improvements
   ========================================================================== */

@media (max-width: 768px) {
    /* Collapsible header mobile */
    .collapsible-header {
        padding: 12px 16px;
        font-size: 14px;
        font-weight: 500;
    }

    .collapsible-header i {
        font-size: 18px;
        margin-right: 8px;
    }

    /* Collapsible body table on mobile */
    .collapsible-body table {
        font-size: 12px;
    }

    .collapsible-body table th,
    .collapsible-body table td {
        padding: 8px 6px;
        white-space: nowrap;
    }

    /* Action column - stack buttons vertically */
    .collapsible-body table td:last-child {
        white-space: normal;
        min-width: 100px;
    }

    .collapsible-body table td:last-child .btn {
        display: block;
        width: 100%;
        margin: 4px 0;
        padding: 8px 12px !important;
        font-size: 11px !important;
    }
}

/* ==========================================================================
   Student Dashboard Tables - Centered Layout
   ========================================================================== */

/* Common styling for all student dashboard tables */
.dashboard-page table#example,
.dashboard-page .student-table {
    width: 90% !important;
    max-width: 1000px;
    margin: 0 auto;
    background: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.dashboard-page table#example th,
.dashboard-page table#example td,
.dashboard-page .student-table th,
.dashboard-page .student-table td {
    text-align: center;
    padding: 14px 16px;
    vertical-align: middle;
}

.dashboard-page table#example thead tr,
.dashboard-page .student-table thead tr {
    background: #F8F9FA;
}

.dashboard-page table#example thead th,
.dashboard-page .student-table thead th {
    font-weight: 600;
    color: #424242;
    border-bottom: 2px solid #E0E0E0;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.dashboard-page table#example tbody tr:hover,
.dashboard-page .student-table tbody tr:hover {
    background: #FAFAFA;
}

.dashboard-page table#example tbody td,
.dashboard-page .student-table tbody td {
    color: #424242;
    border-bottom: 1px solid #EEEEEE;
}

/* Title column (2nd column) - left aligned */
.dashboard-page table#example th:nth-child(2),
.dashboard-page table#example td:nth-child(2),
.dashboard-page .student-table th:nth-child(2),
.dashboard-page .student-table td:nth-child(2) {
    text-align: left;
}

/* Tablet - slightly narrower */
@media (min-width: 769px) and (max-width: 1024px) {
    .dashboard-page table#example,
    .dashboard-page .student-table {
        width: 95% !important;
    }
}

/* Mobile - full width with horizontal scroll */
@media (max-width: 768px) {
    .dashboard-page table#example,
    .dashboard-page .student-table {
        width: 100% !important;
        max-width: 100%;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .dashboard-page table#example th,
    .dashboard-page table#example td,
    .dashboard-page .student-table th,
    .dashboard-page .student-table td {
        padding: 12px 10px;
        font-size: 13px;
        white-space: nowrap;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .dashboard-page table#example th,
    .dashboard-page table#example td,
    .dashboard-page .student-table th,
    .dashboard-page .student-table td {
        padding: 10px 8px;
        font-size: 12px;
    }
}

/* ==========================================================================
   Button Overrides - Navy Brand Color (replaces Materialize teal #0F5A7E)
   ========================================================================== */

/* Primary buttons - Navy */
.btn:not(.btn-flat):not(.btn-large):not(.btn-floating),
.btn-large:not(.btn-flat) {
    background-color: #0F5A7E !important;
}

.btn:not(.btn-flat):hover {
    background-color: #1A7BA8 !important;
}

/* Checkbox/Radio in navy */
[type="checkbox"].filled-in:checked + span:not(.lever)::after {
    border-color: #0F5A7E;
    background-color: #0F5A7E;
}

[type="radio"]:checked + span::after {
    border-color: #0F5A7E;
    background-color: #0F5A7E;
}

/* Switch */
.switch label input[type=checkbox]:checked + .lever::after {
    background-color: #0F5A7E;
}

.switch label input[type=checkbox]:checked + .lever {
    background-color: #1A7BA8;
}

/* Progress bar */
.progress .determinate,
.progress .indeterminate {
    background-color: #0F5A7E;
}

/* Collection active */
.collection .collection-item.active {
    background-color: #0F5A7E;
}

/* Pagination active */
.pagination li.active {
    background-color: #0F5A7E;
}

/* Tabs indicator */
.tabs .indicator {
    background-color: #0F5A7E !important;
}

.tabs .tab a {
    color: #0F5A7E !important;
}

.tabs .tab a.active {
    color: #0A4560 !important;
}

/* Input focus - navy underline */
input:not([type]):focus:not([readonly]),
input[type=text]:focus:not([readonly]),
input[type=password]:focus:not([readonly]),
input[type=email]:focus:not([readonly]),
input[type=tel]:focus:not([readonly]),
textarea.materialize-textarea:focus:not([readonly]) {
    border-bottom: 2px solid #0F5A7E !important;
    box-shadow: 0 1px 0 0 #0F5A7E !important;
}

input:not([type]):focus:not([readonly]) + label,
input[type=text]:focus:not([readonly]) + label,
input[type=email]:focus:not([readonly]) + label {
    color: #0F5A7E !important;
}

/* ==========================================================================
   PJAX Navigation - Loading Bar & Transition
   ========================================================================== */

#pjax-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #90dbf4, #0F5A7E);
    z-index: 99999;
    width: 0;
    opacity: 0;
    transition: width 0.4s ease, opacity 0.3s;
    pointer-events: none;
}

#pjax-progress.active {
    opacity: 1;
}

#pjax-container {
    transition: opacity 0.15s ease;
}
