/* Dashboard Styles - iOS Modern */

:root {
    --ios-bg: #F2F2F7;
    --ios-card-bg: #FFFFFF;
    --ios-text-primary: #000000;
    --ios-text-secondary: #8E8E93;
    --ios-blue: #007AFF;
    --ios-red: #FF3B30;
    --ios-green: #34C759;
    --ios-divider: #C6C6C8;
    --ios-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    --ios-radius: 20px;
}

body {
    background-color: var(--ios-bg) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    color: var(--ios-text-primary);
    -webkit-font-smoothing: antialiased;
}

.dashboard-container {
    background: var(--ios-bg);
    min-height: 100vh;
    padding: 20px 16px;
    padding-bottom: 100px;
    /* Space for nav */
}

/* --- Header Stats --- */
.dashboard-header {
    background: var(--ios-card-bg);
    border-radius: var(--ios-radius);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--ios-shadow);
}

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

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-value {
    font-size: 17px;
    font-weight: 600;
    color: var(--ios-text-primary);
}

.stat-label {
    font-size: 13px;
    color: var(--ios-text-secondary);
}

.belt-info {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-top: 16px;
    border-top: 0.5px solid var(--ios-divider);
}

.belt-badge {
    font-size: 32px;
}

.belt-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--ios-text-primary);
    margin-bottom: 2px;
}

.belt-subtitle {
    font-size: 13px;
    color: var(--ios-text-secondary);
}

/* --- Dashboard Stats Grid (New) --- */
.dashboard-stats-card {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.stat-item-new {
    background: var(--ios-card-bg);
    border-radius: 16px;
    padding: 16px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--ios-shadow);
    border: none;
}

.stat-item-new.highlight-stat {
    background: var(--ios-card-bg);
    /* Keep uniform */
    border: none;
}

.stat-icon-new {
    font-size: 24px;
    margin-bottom: 4px;
}

.stat-value-new {
    font-size: 20px;
    font-weight: 700;
    color: var(--ios-text-primary);
    text-shadow: none;
}

.stat-label-new {
    font-size: 11px;
    font-weight: 500;
    color: var(--ios-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Section Headers --- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 0 4px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--ios-text-primary);
    letter-spacing: -0.5px;
}

/* --- Cards General --- */
.academy-card,
.progress-card,
.section-card,
.bjj-card {
    background: var(--ios-card-bg);
    border-radius: var(--ios-radius);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--ios-shadow);
    border: none;
}

/* Academy Card Specifics */
.academy-card {
    border-left: none;
    /* Remove colored border */
}

.academy-card h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
}

.academy-card a {
    color: var(--ios-blue);
    font-weight: 500;
}

/* Progress Card Specifics */
.progress-card {
    background: var(--ios-card-bg);
    color: var(--ios-text-primary);
}

.progress-bar-container {
    background: #E5E5EA;
    /* System Gray 5 */
    height: 8px;
}

.progress-bar-fill {
    background: var(--ios-blue);
    /* iOS Blue */
}

.progress-text {
    color: var(--ios-text-secondary);
    font-size: 13px;
    margin-top: 8px;
    display: block;
}

/* --- Challenges --- */
.challenge-card {
    background: var(--ios-card-bg);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--ios-shadow);
    border-left: none;
    /* Remove colored border */
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.challenge-header {
    display: flex;
    gap: 12px;
    align-items: center;
}

.challenge-icon {
    font-size: 28px;
    background: #F2F2F7;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.challenge-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.challenge-description {
    font-size: 13px;
    color: var(--ios-text-secondary);
    line-height: 1.4;
}

.challenge-xp {
    background: #F2F2F7;
    color: var(--ios-text-primary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: none;
}

.challenge-status.completed {
    color: var(--ios-green);
    background: rgba(52, 199, 89, 0.1);
}

/* --- News Scroll --- */
.news-scroll-container {
    padding-bottom: 10px;
}

.news-card {
    border-radius: 16px;
    box-shadow: var(--ios-shadow);
    border: none;
}

.news-card-image {
    background: #E5E5EA;
    color: #8E8E93;
}

.news-card-title {
    font-size: 15px;
    font-weight: 600;
}

/* --- Professor Controls --- */
#professor-controls {
    background: var(--ios-card-bg);
    border-radius: var(--ios-radius);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--ios-shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

#btn-open-class,
#btn-close-class {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    margin-top: 10px;
}

#btn-open-class {
    background-color: var(--ios-blue);
    color: white;
}

#btn-close-class {
    background-color: var(--ios-red);
    color: white;
}

/* --- Student Check-in Card --- */
#student-checkin-card {
    background: var(--ios-card-bg);
    border-radius: var(--ios-radius);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.2);
    /* Subtle green glow */
    border: 1px solid var(--ios-green);
}

#btn-do-checkin {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    background-color: var(--ios-green);
    color: white;
    margin-top: 10px;
}

/* --- FAB --- */
.bjj-fab {
    background: var(--ios-text-primary);
    /* Black */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    bottom: 90px;
}

.bjj-fab:hover {
    transform: scale(1.05);
}