/* College Planner - Styles */

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; max-width: 100vw; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #fff; color: #37352f; font-size: 14px; line-height: 1.4; }
.container { max-width: 1400px; margin: 0 auto; padding: 12px 24px; overflow-x: hidden; box-sizing: border-box; }

/* Header */
header { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #e9e9e7; }
.header-left { display: flex; align-items: center; gap: 16px; }
header h1 { font-size: 24px; font-weight: 700; }
.header-actions { display: flex; gap: 6px; align-items: center; }
.btn { padding: 4px 10px; border: 1px solid #e9e9e7; border-radius: 4px; cursor: pointer; font-size: 12px; background: #fff; color: #37352f; }
.btn:hover { background: #f7f6f3; }
.btn-primary { background: #2383e2; color: white; border-color: #2383e2; }
.btn-primary:hover { background: #1a73d1; }

/* Account Selector */
.account-selector { display: flex; align-items: center; gap: 8px; padding: 4px 8px; background: #f7f6f3; border-radius: 6px; }
.account-selector label { font-size: 11px; color: #6b6b6b; text-transform: uppercase; }
.account-selector select { padding: 4px 8px; border: 1px solid #e9e9e7; border-radius: 4px; font-size: 13px; background: #fff; cursor: pointer; }
.account-badge { padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.account-badge.student { background: #e3f2fd; color: #1565c0; }
.account-badge.parent { background: #e8f5e9; color: #2e7d32; }
.account-badge.counselor { background: #f3e5f5; color: #7b1fa2; }
.account-badge.admin { background: #ffebee; color: #c62828; }

/* Role Select Dropdown (Admin Panel) */
.role-select { padding: 4px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; cursor: pointer; border: 1px solid transparent; }
.role-select.student { background: #e3f2fd; color: #1565c0; border-color: #bbdefb; }
.role-select.parent { background: #e8f5e9; color: #2e7d32; border-color: #c8e6c9; }
.role-select.counselor { background: #f3e5f5; color: #7b1fa2; border-color: #e1bee7; }
.role-select.admin { background: #ffebee; color: #c62828; border-color: #ffcdd2; }
.role-select:disabled { opacity: 0.6; cursor: not-allowed; }

/* Hub Views */
.hub-view { display: none; }
.hub-view.active { display: block; }

/* Dashboard Cards */
.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.dashboard-header h2 { font-size: 20px; font-weight: 600; }
.dashboard-stats { display: flex; gap: 16px; }
.stat-card { background: #f7f6f3; padding: 12px 20px; border-radius: 8px; text-align: center; }
.stat-card .number { font-size: 24px; font-weight: 700; color: #2383e2; }
.stat-card .label { font-size: 11px; color: #6b6b6b; text-transform: uppercase; }

/* Student Cards Grid */
.students-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 20px; }
.student-card { background: #fff; border: 1px solid #e9e9e7; border-radius: 8px; padding: 16px; cursor: pointer; transition: all 0.15s; }
.student-card:hover { border-color: #2383e2; box-shadow: 0 2px 8px rgba(35,131,226,0.1); }
.student-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.student-avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, #2383e2, #1a73d1); display: flex; align-items: center; justify-content: center; color: white; font-size: 18px; font-weight: 600; }
.student-info h3 { font-size: 16px; font-weight: 600; }
.student-info p { font-size: 12px; color: #6b6b6b; }
.student-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 12px; border-top: 1px solid #e9e9e7; }
.student-stat { text-align: center; }
.student-stat .value { font-size: 14px; font-weight: 600; }
.student-stat .label { font-size: 10px; color: #9b9b9b; text-transform: uppercase; }

/* Back Button */
.back-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: #f7f6f3; border: none; border-radius: 4px; cursor: pointer; font-size: 13px; margin-bottom: 16px; }
.back-btn:hover { background: #e9e9e7; }

/* Viewing Banner */
.viewing-banner { background: linear-gradient(135deg, #2383e2, #1a73d1); color: white; padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }
.viewing-banner h3 { font-size: 14px; font-weight: 500; }
.viewing-banner .student-name { font-size: 18px; font-weight: 700; }

/* Main Navigation Tabs */
.main-nav { display: flex; gap: 0; border-bottom: 1px solid #e9e9e7; margin: 12px 0; }
.main-nav-tab { padding: 10px 20px; border: none; background: transparent; cursor: pointer; font-size: 14px; font-weight: 500; color: #6b6b6b; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.main-nav-tab:hover { color: #37352f; background: #f7f6f3; }
.main-nav-tab.active { color: #2383e2; border-bottom-color: #2383e2; }
.page { display: none; }
.page.active { display: block; overflow-x: hidden; }

/* Shared pages container */
#shared-pages {
    overflow-x: hidden;
    max-width: 100%;
}

/* Dashboard page specific */
#page-dashboard {
    overflow: hidden;
    max-width: 100%;
    width: 100%;
}

/* Sections */
.section { margin-bottom: 20px; }
.section-header { display: flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer; user-select: none; }
.section-header:hover { background: #f7f6f3; margin: 0 -8px; padding: 6px 8px; border-radius: 4px; }
.toggle-icon { font-size: 10px; color: #9b9b9b; transition: transform 0.15s; width: 16px; }
.section.collapsed .toggle-icon { transform: rotate(-90deg); }
.section.collapsed .section-content { display: none; }
.section-header h2 { font-size: 14px; font-weight: 600; }
.section-content { padding: 8px 0; }

/* Form */
.form-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin-bottom: 12px; }
.form-row.wide { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 2px; }
.field label { font-size: 11px; color: #9b9b9b; text-transform: uppercase; letter-spacing: 0.5px; }
.field input, .field textarea, .field select { padding: 6px 8px; border: 1px solid #e9e9e7; border-radius: 4px; font-size: 14px; background: #fff; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: #2383e2; box-shadow: 0 0 0 2px rgba(35,131,226,0.1); }
.field textarea { resize: vertical; min-height: 60px; }
.field.full { grid-column: 1 / -1; }

/* Search Dropdown (High School, etc.) */
.search-input-wrapper { position: relative; }
.search-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #e9e9e7; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); max-height: 200px; overflow-y: auto; z-index: 100; display: none; }
.search-dropdown.show { display: block; }
.search-dropdown-item { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid #f5f5f5; }
.search-dropdown-item:last-child { border-bottom: none; }
.search-dropdown-item:hover { background: #f7f6f3; }
.search-dropdown-item .school-name { font-weight: 500; font-size: 13px; }
.search-dropdown-item .school-location { font-size: 11px; color: #6b6b6b; }
.search-dropdown-hint { padding: 8px 12px; color: #9b9b9b; font-size: 12px; font-style: italic; }
.search-dropdown-manual { padding: 8px 12px; color: #2383e2; font-size: 12px; cursor: pointer; border-top: 1px solid #e9e9e7; }
.search-dropdown-manual:hover { background: #f7f6f3; }

/* Tables */
.data-table-wrapper { margin: 8px 0; border: 1px solid #e9e9e7; border-radius: 4px; overflow: hidden; }
.table-header { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; background: #f7f6f3; border-bottom: 1px solid #e9e9e7; }
.table-header h3 { font-size: 12px; font-weight: 600; }
.btn-add { padding: 2px 8px; font-size: 11px; background: transparent; border: 1px solid #d3d3d0; border-radius: 3px; cursor: pointer; color: #6b6b6b; }
.btn-add:hover { background: #e9e9e7; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { text-align: left; padding: 6px 10px; font-size: 11px; font-weight: 500; color: #9b9b9b; text-transform: uppercase; letter-spacing: 0.5px; background: #fafaf9; border-bottom: 1px solid #e9e9e7; }
.data-table td { padding: 4px 6px; border-bottom: 1px solid #f0f0ef; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover { background: #fafaf9; }
.data-table input, .data-table select { width: 100%; padding: 4px 6px; border: 1px solid transparent; border-radius: 3px; font-size: 13px; background: transparent; }
.data-table input:hover, .data-table select:hover { background: #f7f6f3; }
.data-table input:focus, .data-table select:focus { outline: none; border-color: #2383e2; background: #fff; }
.btn-remove { width: 20px; height: 20px; padding: 0; border: none; background: transparent; color: #c4c4c4; cursor: pointer; font-size: 14px; border-radius: 3px; display: flex; align-items: center; justify-content: center; }
.btn-remove:hover { background: #ffebe9; color: #d73a49; }
.action-col { width: 30px; text-align: center; }
.empty-row td { padding: 16px 10px; text-align: center; color: #9b9b9b; font-size: 12px; }

/* Sub Tabs */
.tabs { display: flex; gap: 0; border-bottom: 1px solid #e9e9e7; margin-bottom: 8px; }
.tab { padding: 6px 12px; border: none; background: transparent; cursor: pointer; font-size: 13px; color: #6b6b6b; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: #37352f; }
.tab.active { color: #37352f; border-bottom-color: #37352f; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* College Categories */
.category-section { margin-bottom: 16px; }
.category-header { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 4px; margin-bottom: 8px; }
.category-header.high-reach { background: #fce4ec; color: #c2185b; }
.category-header.reach { background: #fff3e0; color: #e65100; }
.category-header.target { background: #e8f5e9; color: #2e7d32; }
.category-header.safety { background: #e3f2fd; color: #1565c0; }
.category-header h3 { font-size: 13px; font-weight: 600; flex: 1; }
.category-count { font-size: 11px; opacity: 0.7; }

/* Timeline */
.timeline-container { overflow-x: auto; padding-bottom: 16px; }
.timeline-grid { display: grid; grid-template-columns: repeat(10, minmax(140px, 1fr)); gap: 1px; background: #e9e9e7; border: 1px solid #e9e9e7; border-radius: 4px; min-width: 1400px; }
.timeline-phase { text-align: center; padding: 8px; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.timeline-phase.eleventh { background: #e8f5e9; color: #2e7d32; }
.timeline-phase.summer { background: #fff3e0; color: #e65100; }
.timeline-phase.twelfth { background: #e3f2fd; color: #1565c0; }
.timeline-phase.post { background: #f3e5f5; color: #7b1fa2; }
.timeline-col { background: #fff; }
.timeline-col-header { padding: 8px; font-size: 12px; font-weight: 600; background: #fafaf9; border-bottom: 1px solid #e9e9e7; text-align: center; }
.timeline-tasks { padding: 8px; min-height: 200px; }
.timeline-task { display: flex; align-items: flex-start; gap: 6px; padding: 6px 8px; margin-bottom: 4px; background: #f7f6f3; border-radius: 4px; font-size: 12px; cursor: pointer; }
.timeline-task:hover { background: #e9e9e7; }
.timeline-task.completed { opacity: 0.5; text-decoration: line-through; }
.timeline-task input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; }
.timeline-task.custom { background: #e3f2fd; }
.add-task-btn { width: 100%; padding: 6px; border: 1px dashed #d3d3d0; border-radius: 4px; background: transparent; color: #9b9b9b; font-size: 11px; cursor: pointer; margin-top: 8px; }
.add-task-btn:hover { background: #f7f6f3; border-color: #9b9b9b; }

/* Save Indicator */
.save-indicator { position: fixed; bottom: 16px; right: 16px; padding: 6px 12px; background: #37352f; color: white; border-radius: 4px; font-size: 12px; opacity: 0; transform: translateY(10px); transition: all 0.2s; z-index: 100; }
.save-indicator.show { opacity: 1; transform: translateY(0); }

/* Search */
.search-box { padding: 8px 12px; border: 1px solid #e9e9e7; border-radius: 6px; font-size: 14px; width: 250px; }
.search-box:focus { outline: none; border-color: #2383e2; }

/* Auth Pages */
.auth-container { max-width: 400px; margin: 80px auto; padding: 32px; }
.auth-container h1 { font-size: 28px; margin-bottom: 8px; text-align: center; }
.auth-container p { color: #6b6b6b; text-align: center; margin-bottom: 24px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form .field { margin-bottom: 0; }
.auth-form .field label { margin-bottom: 4px; }
.auth-form .field input, .auth-form .field select { padding: 10px 12px; font-size: 15px; }
.auth-form .btn-primary { padding: 12px; font-size: 15px; margin-top: 8px; }
.auth-link { text-align: center; margin-top: 16px; font-size: 13px; }
.auth-link a { color: #2383e2; text-decoration: none; }
.auth-link a:hover { text-decoration: underline; }
.auth-error { background: #ffebe9; color: #d73a49; padding: 10px 12px; border-radius: 4px; font-size: 13px; display: none; }
.auth-error.show { display: block; }

/* College Search Modal */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal-overlay.show { display: flex; }
.modal { background: white; border-radius: 8px; width: 90%; max-width: 600px; max-height: 80vh; overflow: hidden; display: flex; flex-direction: column; }
.modal-header { padding: 16px 20px; border-bottom: 1px solid #e9e9e7; display: flex; justify-content: space-between; align-items: center; }
.modal-header h2 { font-size: 18px; }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: #6b6b6b; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.college-search-input { width: 100%; padding: 12px; border: 1px solid #e9e9e7; border-radius: 6px; font-size: 15px; margin-bottom: 16px; }
.college-results { display: flex; flex-direction: column; gap: 8px; }
.college-result { padding: 12px; border: 1px solid #e9e9e7; border-radius: 6px; cursor: pointer; }
.college-result:hover { border-color: #2383e2; background: #f7f6f3; }
.college-result h4 { font-size: 14px; margin-bottom: 4px; }
.college-result p { font-size: 12px; color: #6b6b6b; }
.college-result-stats { display: flex; gap: 16px; margin-top: 8px; font-size: 11px; color: #9b9b9b; }

/* Enhanced College Modal */
.college-modal { max-width: 700px; }
.college-results-hint { padding: 20px; text-align: center; color: #9b9b9b; font-size: 13px; }
.college-result-name { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.college-result-location { font-size: 12px; color: #6b6b6b; margin-bottom: 6px; }
.manual-entry-link { text-align: center; padding: 16px 0 0; border-top: 1px solid #e9e9e7; margin-top: 16px; }
.manual-entry-link a { color: #6b6b6b; font-size: 13px; text-decoration: none; }
.manual-entry-link a:hover { color: #2383e2; text-decoration: underline; }
.btn-back { background: none; border: none; color: #6b6b6b; cursor: pointer; font-size: 13px; padding: 0; margin-bottom: 16px; }
.btn-back:hover { color: #2383e2; }
.college-info-header { padding: 16px; background: #f7f6f3; border-radius: 8px; margin-bottom: 20px; }
.college-info-header h3 { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.college-info-header .college-location-text { color: #6b6b6b; font-size: 13px; margin-bottom: 6px; }
.college-info-header .college-website-link { color: #2383e2; font-size: 12px; text-decoration: none; }
.college-info-header .college-website-link:hover { text-decoration: underline; }
.college-name-input { width: 100%; padding: 10px; border: 1px solid #e9e9e7; border-radius: 6px; font-size: 15px; }
.college-form .form-section { margin-bottom: 20px; }
.college-form .form-section h4 { font-size: 12px; font-weight: 600; text-transform: uppercase; color: #6b6b6b; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #e9e9e7; }
.form-hint { font-size: 11px; color: #9b9b9b; margin: -8px 0 12px 0; font-style: italic; }
.field-hint { font-size: 10px; color: #9b9b9b; display: block; margin-top: 2px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding-top: 20px; border-top: 1px solid #e9e9e7; margin-top: 20px; }

/* College Table Enhancements */
.college-name-cell { position: relative; }
.college-location { font-size: 11px; color: #9b9b9b; margin-top: 2px; }
.tuition-cell { font-size: 12px; color: #6b6b6b; cursor: help; text-align: center; }

/* Loading */
.loading { display: flex; align-items: center; justify-content: center; padding: 40px; color: #6b6b6b; }
.loading-deadline input { background: linear-gradient(90deg, #f7f6f3 25%, #e9e9e7 50%, #f7f6f3 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.spinner { width: 20px; height: 20px; border: 2px solid #e9e9e7; border-top-color: #2383e2; border-radius: 50%; animation: spin 0.8s linear infinite; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* User Menu */
.user-menu { position: relative; }
.user-button { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #f7f6f3; border: 1px solid #e9e9e7; border-radius: 6px; cursor: pointer; font-size: 13px; }
.user-button:hover { background: #e9e9e7; }
.user-dropdown { position: absolute; top: 100%; right: 0; margin-top: 4px; background: white; border: 1px solid #e9e9e7; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); min-width: 180px; display: none; z-index: 100; }
.user-dropdown.show { display: block; }
.user-dropdown-item { padding: 10px 14px; cursor: pointer; font-size: 13px; }
.user-dropdown-item:hover { background: #f7f6f3; }
.user-dropdown-item.danger { color: #d73a49; }

/* Print & Responsive */
@media print { .header-actions, .btn-add, .btn-remove, .save-indicator, .main-nav, .add-task-btn, .account-selector, .back-btn { display: none !important; } .page, .hub-view { display: block !important; } }
@media (max-width: 768px) { .container { padding: 8px 12px; } .form-row { grid-template-columns: 1fr; } .students-grid { grid-template-columns: 1fr; } }

/* Role Preview Cards */
#page-admin-preview .role-preview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
    gap: 24px;
    margin-top: 24px;
    justify-content: start;
}
#page-admin-preview .role-preview-card {
    background: #fff;
    border: 1px solid #e9e9e7;
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}
#page-admin-preview .role-preview-card:hover {
    border-color: #2383e2;
    box-shadow: 0 4px 16px rgba(35,131,226,0.15);
    transform: translateY(-2px);
}
#page-admin-preview .role-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    flex-shrink: 0;
}
#page-admin-preview .role-preview-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}
#page-admin-preview .role-preview-card p {
    font-size: 14px;
    color: #6b6b6b;
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
}
#page-admin-preview .role-preview-card .btn {
    width: 100%;
    padding: 10px 16px;
}
@media (max-width: 900px) {
    #page-admin-preview .role-preview-cards { grid-template-columns: 1fr; }
}

/* Preview Banner */
.preview-banner { background: linear-gradient(135deg, #667eea, #764ba2); color: white; padding: 12px 20px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.preview-banner .btn { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.3); color: white; }
.preview-banner .btn:hover { background: rgba(255,255,255,0.3); }

/* Preview Content */
#preview-content { border: 2px dashed #e9e9e7; border-radius: 8px; padding: 20px; min-height: 400px; }
#preview-content .hub-view { display: block; }

/* Admin Preview Banner */
#admin-preview-banner {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    display: none;
    justify-content: space-between;
    align-items: center;
    margin: 12px 0;
    font-size: 14px;
}
#admin-preview-banner .btn {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
    color: white;
}
#admin-preview-banner .btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Timeline Add Button in Header */
.timeline-col-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.timeline-col-header .add-task-btn {
    width: 20px;
    height: 20px;
    padding: 0;
    border: 1px solid #d3d3d0;
    border-radius: 4px;
    background: #fff;
    color: #6b6b6b;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.timeline-col-header .add-task-btn:hover {
    background: #2383e2;
    border-color: #2383e2;
    color: #fff;
}

/* Timeline Add - Clean Text Style */
.timeline-add {
    padding: 8px 4px;
    margin-top: 4px;
    font-size: 12px;
    color: #bbb;
    cursor: pointer;
    text-align: center;
    border-radius: 4px;
    transition: all 0.15s;
}
.timeline-add:hover {
    background: #f7f6f3;
    color: #2383e2;
}
.timeline-col:hover .timeline-add {
    color: #999;
}
.timeline-input {
    width: 100%;
    padding: 8px 4px;
    margin-top: 4px;
    font-size: 12px;
    border: 1px solid #2383e2;
    border-radius: 4px;
    outline: none;
    box-sizing: border-box;
}

/* Programs Grid */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

/* Program Cards */
.program-card {
    background: #fff;
    border: 1px solid #e9e9e7;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.15s;
}
.program-card:hover {
    border-color: #2383e2;
    box-shadow: 0 2px 8px rgba(35,131,226,0.1);
}
.program-card.saved {
    background: #fafafa;
}
.program-header {
    margin-bottom: 12px;
}
.program-header h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #37352f;
}
.program-org {
    font-size: 13px;
    color: #6b6b6b;
}
.program-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.program-detail {
    font-size: 12px;
    color: #37352f;
}
.program-detail strong {
    color: #6b6b6b;
}
.program-description {
    font-size: 13px;
    color: #37352f;
    margin-bottom: 8px;
    line-height: 1.5;
}
.program-fit {
    font-size: 12px;
    color: #2383e2;
    margin-bottom: 12px;
    padding: 8px;
    background: #e3f2fd;
    border-radius: 4px;
}
.program-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #e9e9e7;
}
.program-actions .btn {
    flex: 1;
    text-align: center;
    text-decoration: none;
    padding: 8px 12px;
}
.program-status {
    margin-bottom: 12px;
}
.program-status label {
    font-size: 12px;
    color: #6b6b6b;
}
.program-status select {
    margin-left: 8px;
    padding: 4px 8px;
    border: 1px solid #e9e9e7;
    border-radius: 4px;
    font-size: 13px;
}
.program-notes textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #e9e9e7;
    border-radius: 4px;
    font-size: 13px;
    resize: vertical;
    min-height: 60px;
    margin-bottom: 12px;
}
.program-notes textarea:focus {
    outline: none;
    border-color: #2383e2;
}

/* Saved Programs Container */
.saved-programs-container {
    margin-top: 12px;
}

/* Saved Programs Table */
.saved-programs-table-wrapper {
    overflow-x: auto;
    margin-bottom: 12px;
    width: 100%;
}
.saved-programs-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
    font-size: 13px;
}
.saved-programs-table thead th {
    text-align: left;
    padding: 10px 12px;
    background: #f7f6f3;
    border-bottom: 2px solid #e9e9e7;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b6b6b;
}
.saved-programs-table tbody tr.program-row {
    border-bottom: 1px solid #f0f0f0;
}
.saved-programs-table tbody tr.program-row:hover {
    background: #fafafa;
}
.saved-programs-table td {
    padding: 10px 12px;
    vertical-align: middle;
}
.program-name-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.program-name-cell strong {
    font-size: 13px;
    color: #37352f;
}
.program-org-sub {
    font-size: 11px;
    color: #9b9b9b;
}
.eligibility-cell {
    font-size: 12px;
    color: #6b6b6b;
}

/* Deadline urgency colors */
.deadline-urgent {
    color: #dc2626;
    font-weight: 600;
}
.deadline-soon {
    color: #f59e0b;
    font-weight: 500;
}
.deadline-passed {
    color: #9ca3af;
    text-decoration: line-through;
}

/* Status select in table */
.status-select {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #e9e9e7;
    cursor: pointer;
    min-width: 90px;
}
.status-select.status-interested { background: #f3f4f6; color: #6b7280; }
.status-select.status-applied { background: #fef3c7; color: #b45309; }
.status-select.status-accepted { background: #d1fae5; color: #059669; }
.status-select.status-rejected { background: #fee2e2; color: #dc2626; }
.status-select.status-attending { background: #dbeafe; color: #2563eb; }

/* Actions cell */
.actions-cell {
    display: flex;
    gap: 8px;
    align-items: center;
}
.btn-link {
    color: #2383e2;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
}
.btn-link:hover {
    text-decoration: underline;
}
.btn-icon {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    color: #9b9b9b;
    border-radius: 4px;
}
.btn-icon:hover {
    background: #f0f0f0;
    color: #37352f;
}
.btn-icon.btn-danger:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Expandable details row */
.program-details-row td {
    padding: 0 !important;
    background: #fafafa;
}
.program-expanded {
    padding: 16px 20px;
    border-top: 1px solid #e9e9e7;
}
.program-expanded-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.expanded-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.expanded-field.full-width {
    grid-column: span 2;
}
.expanded-field label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #9b9b9b;
}
.expanded-field span {
    font-size: 13px;
    color: #37352f;
}
.expanded-field .fit-text {
    color: #2383e2;
    font-style: italic;
}
.expanded-field textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #e9e9e7;
    border-radius: 4px;
    font-size: 13px;
    resize: vertical;
    min-height: 60px;
}
.expanded-field textarea:focus {
    outline: none;
    border-color: #2383e2;
}

/* Programs summary */
.programs-summary {
    display: flex;
    gap: 16px;
    padding: 12px 16px;
    background: #f7f6f3;
    border-radius: 6px;
    font-size: 13px;
}
.summary-stat {
    color: #6b6b6b;
}
.summary-stat strong {
    color: #37352f;
}
.summary-stat.applied strong {
    color: #f59e0b;
}
.summary-stat.accepted strong {
    color: #10b981;
}

/* EC Cards */
.ec-card {
    background: #fff;
    border: 1px solid #e9e9e7;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.15s;
}
.ec-card:hover {
    border-color: #2383e2;
    box-shadow: 0 2px 8px rgba(35,131,226,0.1);
}
.ec-card.saved {
    background: #fafafa;
}
.ec-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}
.ec-header h4 {
    font-size: 15px;
    font-weight: 600;
    color: #37352f;
}
.ec-category {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 12px;
    background: #f7f6f3;
    color: #6b6b6b;
    text-transform: uppercase;
}
.ec-why, .ec-how {
    font-size: 13px;
    color: #37352f;
    margin-bottom: 8px;
    line-height: 1.5;
}
.ec-why strong, .ec-how strong {
    color: #6b6b6b;
}
.ec-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #9b9b9b;
    margin-bottom: 12px;
}
.ec-actions {
    padding-top: 12px;
    border-top: 1px solid #e9e9e7;
}
.ec-actions .btn {
    width: 100%;
    text-align: center;
}

/* Button variants */
.btn-secondary {
    background: #f7f6f3;
    border-color: #e9e9e7;
    color: #37352f;
}
.btn-secondary:hover {
    background: #e9e9e7;
}
.btn-danger {
    background: #ffebe9;
    border-color: #d73a49;
    color: #d73a49;
}
.btn-danger:hover {
    background: #fdd;
}

/* Loading & Error States */
.loading-state, .error-state, .empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6b6b6b;
}
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.loading-state .spinner {
    width: 32px;
    height: 32px;
    border-width: 3px;
}
.error-state {
    background: #ffebe9;
    border-radius: 8px;
    color: #d73a49;
}
.empty-state {
    background: #f7f6f3;
    border-radius: 8px;
    font-size: 14px;
}
.empty-state p {
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Empty State Card */
.empty-state-card {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 40px;
    background: #fafaf9;
    border: 2px dashed #e9e9e7;
    border-radius: 12px;
}
.empty-state-card .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}
.empty-state-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #37352f;
}
.empty-state-card p {
    font-size: 14px;
    color: #6b6b6b;
    max-width: 400px;
    margin: 0 auto 20px;
    line-height: 1.6;
}

/* Remove Student Button */
.student-card {
    position: relative;
}
.btn-remove-student {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #c4c4c4;
    cursor: pointer;
    font-size: 16px;
    border-radius: 4px;
    display: none;
    align-items: center;
    justify-content: center;
}
.student-card:hover .btn-remove-student {
    display: flex;
}
.btn-remove-student:hover {
    background: #ffebe9;
    color: #d73a49;
}

/* Invite Modal Success */
.invite-success {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 13px;
    display: none;
    margin-top: 12px;
}

/* ===================== */
/* Calendar Dashboard    */
/* ===================== */

/* Dashboard Layout */
.dashboard-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 10px;
    min-height: calc(100vh - 200px);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* Calendar Section */
.calendar-section {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

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

.calendar-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.calendar-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.calendar-controls span {
    font-size: 14px;
    font-weight: 600;
    min-width: 90px;
    text-align: center;
}

/* Calendar Grid Wrapper */
.calendar-grid-wrapper {
    overflow: hidden;
    flex: 1;
    border: 1px solid #e9e9e7;
    border-radius: 8px;
    min-width: 0;
}

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: 55px repeat(12, minmax(0, 1fr));
    width: 100%;
    table-layout: fixed;
}

/* Header Row (months) */
.calendar-header-row {
    display: contents;
}

.calendar-header-row.current-grade .calendar-cell {
    background: #e3f2fd !important;
    border-left: 3px solid #2383e2;
}
.calendar-header-row.current-grade .calendar-grade-label {
    background: #2383e2 !important;
    color: white;
}
.calendar-header-row.current-grade .grade-name {
    color: white;
}
.calendar-header-row.current-grade .grade-meta {
    color: rgba(255,255,255,0.8);
}

.calendar-header-row .calendar-cell {
    background: #f7f6f3;
    font-weight: 600;
    text-align: center;
    padding: 12px 8px;
    border-bottom: 2px solid #e9e9e7;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* Grade/Class Label */
.calendar-grade-label {
    background: #fafaf9;
    font-weight: 600;
    padding: 4px 6px;
    border-right: 2px solid #e9e9e7;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: sticky;
    left: 0;
    z-index: 2;
}

.calendar-grade-label .grade-name {
    font-size: 10px;
    color: #37352f;
}

.calendar-grade-label .grade-meta {
    font-size: 11px;
    color: #9b9b9b;
    margin-top: 2px;
}

/* Calendar Cells */
.calendar-cell {
    padding: 4px;
    background: #fff;
    border-right: 1px solid #f0f0ef;
    border-bottom: 1px solid #f0f0ef;
    min-height: 60px;
    font-size: 9px;
    vertical-align: top;
    overflow: hidden;
}

.calendar-cell:last-child {
    border-right: none;
}

/* Cell Color Coding */
.calendar-cell.cell-red {
    background: #fef2f2;
    border-left: 3px solid #ef4444;
}

.calendar-cell.cell-orange {
    background: #fff7ed;
    border-left: 3px solid #f97316;
}

.calendar-cell.cell-yellow {
    background: #fefce8;
    border-left: 3px solid #eab308;
}

.calendar-cell.cell-green {
    background: #f0fdf4;
    border-left: 3px solid #22c55e;
}

.calendar-cell.cell-blue {
    background: #eff6ff;
    border-left: 3px solid #3b82f6;
}

.calendar-cell.cell-purple {
    background: #faf5ff;
    border-left: 3px solid #a855f7;
}

/* Summer Programs Row */
.programs-row .calendar-grade-label {
    background: #a855f7 !important;
    color: white;
}
.programs-row .grade-name {
    color: white;
}

/* Event Items in Cells */
.calendar-event {
    padding: 2px 4px;
    margin-bottom: 2px;
    border-radius: 2px;
    font-size: 8px;
    font-weight: 500;
    line-height: 1.2;
    cursor: default;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-event.event-SAT {
    background: #dbeafe;
    color: #1d4ed8;
}

.calendar-event.event-ACT {
    background: #fee2e2;
    color: #dc2626;
}

.calendar-event.event-AP {
    background: #ede9fe;
    color: #7c3aed;
}

.calendar-event.event-PSAT {
    background: #dbeafe;
    color: #1d4ed8;
}

.calendar-event.event-application {
    background: #fef3c7;
    color: #b45309;
}

.calendar-event.event-general {
    background: #f3f4f6;
    color: #4b5563;
}

.calendar-event.event-program {
    background: #f3e8ff;
    color: #7c3aed;
}

.calendar-event.event-more {
    background: transparent;
    color: #9b9b9b;
    font-style: italic;
}

/* Deadline Items */
.calendar-deadline {
    padding: 3px 6px;
    margin-bottom: 4px;
    border-radius: 3px;
    font-size: 10px;
    background: #fff7ed;
    color: #c2410c;
    border-left: 2px solid #f97316;
}

/* Test Dates Row */
.test-dates-row {
    display: contents;
}

.test-dates-row .calendar-cell {
    background: #fafaf9;
    min-height: 50px;
}

/* Deadlines Sidebar */
.deadlines-sidebar {
    background: #fff;
    border: 1px solid #e9e9e7;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 180px);
    min-width: 0;
}

.deadlines-sidebar h3 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.deadline-filters {
    margin-bottom: 8px;
}

.deadline-filters select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #e9e9e7;
    border-radius: 6px;
    font-size: 12px;
    background: #fff;
    cursor: pointer;
}

.deadlines-list {
    overflow-y: auto;
    flex: 1;
}

/* Deadline Cards */
.deadline-card {
    padding: 8px;
    margin-bottom: 4px;
    background: #fafaf9;
    border-radius: 4px;
    border-left: 3px solid #d1d5db;
    transition: all 0.15s;
}

.deadline-card:hover {
    background: #f7f6f3;
}

.deadline-card.urgent {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.deadline-card.soon {
    border-left-color: #f97316;
    background: #fff7ed;
}

.deadline-date {
    font-size: 10px;
    color: #6b7280;
    margin-bottom: 2px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.deadline-title {
    font-size: 11px;
    font-weight: 500;
    color: #37352f;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.deadline-source {
    font-size: 10px;
    color: #9ca3af;
}

.deadline-student {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 2px;
}

.urgent-badge {
    background: #ef4444;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
}

.days-badge {
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 500;
}

.days-badge.critical {
    background: #fee2e2;
    color: #dc2626;
}

.days-badge.warning {
    background: #ffedd5;
    color: #c2410c;
}

.days-badge.normal {
    background: #e5e7eb;
    color: #6b7280;
}

/* No deadlines message */
.no-deadlines {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 900px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .deadlines-sidebar {
        max-height: 250px;
    }
}

@media (max-width: 768px) {
    .calendar-controls {
        flex-wrap: wrap;
        gap: 8px;
    }

    .calendar-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}
