/**
 * Geo Explorer Auburn LMS - Admin Dashboard Styles
 */

/* ============================================
   APP LAYOUT
   ============================================ */

.app-container {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: linear-gradient(180deg, var(--color-auburn-blue) 0%, #061525 100%);
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition-normal);
}

.sidebar-header {
    padding: var(--space-5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    letter-spacing: 1px;
    color: var(--color-auburn-orange);
}

.logo-subtitle {
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-white);
    cursor: pointer;
    padding: var(--space-2);
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-4) 0;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin: var(--space-1) var(--space-3);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    color: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.nav-link:hover {
    color: var(--color-white);
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: var(--color-white);
    background-color: var(--color-auburn-orange);
}

.nav-link i {
    width: 20px;
    height: 20px;
}

.nav-badge {
    margin-left: auto;
    background-color: var(--color-auburn-orange);
    color: var(--color-white);
    font-size: var(--text-xs);
    font-weight: 500;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.nav-link.active .nav-badge {
    background-color: var(--color-white);
    color: var(--color-auburn-orange);
}

.nav-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: var(--space-4) var(--space-5);
}

.nav-label {
    padding: var(--space-2) var(--space-5);
    font-size: var(--text-xs);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: var(--space-4);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.user-info {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex: 1;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background-color: var(--color-offset-blue);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar i {
    width: 20px;
    height: 20px;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 500;
    font-size: var(--text-sm);
}

.user-role {
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.5);
}

.sidebar-footer .btn-icon {
    color: rgba(255, 255, 255, 0.6);
}

.sidebar-footer .btn-icon:hover {
    color: var(--color-white);
    background-color: rgba(255, 255, 255, 0.1);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Bar */
.top-bar {
    height: var(--header-height);
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-smoke-white);
    padding: 0 var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
    color: var(--color-dark-text);
}

.page-title {
    font-size: var(--text-2xl);
    margin: 0;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.active-visit-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-4);
    background-color: var(--color-success-light);
    border-radius: var(--radius-full);
}

.visit-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.visit-info strong {
    font-size: var(--text-sm);
    color: var(--color-darkest-text);
}

.visit-info span {
    font-size: var(--text-xs);
    color: var(--color-light-text);
    font-family: monospace;
}

/* Page Content */
.page-content {
    flex: 1;
    padding: var(--space-6);
    overflow-y: auto;
}

.page {
    animation: fadeIn var(--transition-normal);
}

/* ============================================
   STATS GRID
   ============================================ */

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

.stat-card {
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-fast);
}

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

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-auburn-blue);
}

.stat-icon i {
    width: 28px;
    height: 28px;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    color: var(--color-auburn-blue);
    line-height: 1;
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--color-light-text);
    margin-top: var(--space-1);
}

/* ============================================
   DASHBOARD GRID
   ============================================ */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
}

.dashboard-grid .card-full-width {
    grid-column: 1 / -1;
}

/* ============================================
   QUICK ACTIONS
   ============================================ */

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4);
    background-color: var(--color-smoke-white);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quick-action-btn:hover {
    background-color: var(--color-sky-blue);
}

.quick-action-icon {
    width: 48px;
    height: 48px;
    background-color: var(--color-white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-auburn-blue);
    transition: all var(--transition-fast);
}

.quick-action-btn:hover .quick-action-icon {
    background-color: var(--color-auburn-blue);
    color: var(--color-white);
}

.quick-action-btn span {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-dark-text);
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-8);
    color: var(--color-light-text);
    text-align: center;
}

.empty-state i {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-3);
    opacity: 0.5;
}

.empty-state p {
    margin-bottom: var(--space-4);
}

/* ============================================
   VISIT CARDS
   ============================================ */

.visit-card {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    border-bottom: 1px solid var(--color-smoke-white);
    transition: background-color var(--transition-fast);
}

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

.visit-card:hover {
    background-color: var(--color-smoke-white);
}

.visit-time {
    min-width: 80px;
    text-align: center;
}

.visit-time .time {
    font-weight: 500;
    color: var(--color-darkest-text);
}

.visit-time .period {
    font-size: var(--text-xs);
    color: var(--color-light-text);
}

.visit-details {
    flex: 1;
}

.visit-school {
    font-weight: 500;
    color: var(--color-darkest-text);
    margin-bottom: var(--space-1);
}

.visit-meta {
    font-size: var(--text-sm);
    color: var(--color-light-text);
}

.visit-code {
    font-family: monospace;
    background-color: var(--color-smoke-white);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
}

/* ============================================
   MODAL
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-4);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp var(--transition-normal);
}

.modal-header {
    padding: var(--space-5);
    border-bottom: 1px solid var(--color-smoke-white);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    margin: 0;
}

.modal-body {
    padding: var(--space-5);
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--color-smoke-white);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
}

/* Large Modal */
.modal.modal-lg {
    max-width: 900px;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-container {
    position: fixed;
    bottom: var(--space-5);
    right: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    z-index: 2000;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    background-color: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: slideUp var(--transition-normal);
    min-width: 300px;
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 500;
    color: var(--color-darkest-text);
}

.toast-message {
    font-size: var(--text-sm);
    color: var(--color-light-text);
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-light-text);
    padding: var(--space-1);
}

.toast.success .toast-icon { color: var(--color-success); }
.toast.error .toast-icon { color: var(--color-error); }
.toast.warning .toast-icon { color: var(--color-warning); }
.toast.info .toast-icon { color: var(--color-info-dark); }

/* ============================================
   LOADING OVERLAY
   ============================================ */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--color-smoke-white);
    border-top-color: var(--color-auburn-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner span {
    color: var(--color-dark-text);
    font-size: var(--text-sm);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .top-bar {
        padding: 0 var(--space-4);
    }
    
    .page-content {
        padding: var(--space-4);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .active-visit-indicator .visit-info {
        display: none;
    }
    
    .top-bar-right .btn span {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   STATION COLORS (for dynamic use)
   ============================================ */

.station-color-1 { background-color: var(--station-1-color); }
.station-color-2 { background-color: var(--station-2-color); }
.station-color-3 { background-color: var(--station-3-color); }
.station-color-4 { background-color: var(--station-4-color); }
.station-color-5 { background-color: var(--station-5-color); }
.station-color-6 { background-color: var(--station-6-color); }

/* ============================================
   STATION CARDS (for Live Dashboard)
   ============================================ */

.stations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-4);
}

.station-card {
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.station-card-header {
    padding: var(--space-4);
    color: var(--color-white);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.station-card-header h4 {
    margin: 0;
    color: var(--color-white);
    font-size: var(--text-lg);
}

.station-card-body {
    padding: var(--space-4);
}

.tablet-status {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.tablet-status-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 500;
}

.tablet-progress {
    margin: var(--space-3) 0;
}

.tablet-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: var(--text-sm);
    margin-bottom: var(--space-2);
}

.tablet-info {
    font-size: var(--text-sm);
    color: var(--color-light-text);
}

/* ===== REPORTS PAGE STYLES ===== */
.reports-page { }

.report-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--color-auburn-blue);
}

.tab-btn.active {
    color: var(--color-auburn-blue);
    border-bottom-color: var(--color-auburn-orange);
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.recommendation-card {
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.recommendation-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.recommendation-header i {
    width: 20px;
    height: 20px;
}

.recommendation-message {
    margin: 0 0 8px 0;
    color: #555;
}

.recommendation-action {
    margin: 0;
    color: #888;
    font-size: 13px;
}

.recommendation-details {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.stations-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.station-bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.station-bar-label {
    width: 100px;
    font-weight: 500;
    font-size: 14px;
    text-align: right;
}

.station-bar-container {
    flex: 1;
    height: 32px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.station-bar {
    height: 100%;
    display: flex;
    align-items: center;
    padding-left: 12px;
    min-width: fit-content;
    transition: width 0.3s;
}

.station-bar-value {
    color: white;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.station-bar-score {
    width: 50px;
    text-align: center;
    font-weight: 600;
}

.station-bar-score.no-data {
    color: #999;
}

.station-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.progress-mini {
    display: inline-block;
    width: 60px;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin-right: 8px;
    vertical-align: middle;
}

.progress-mini-bar {
    height: 100%;
    border-radius: 3px;
}

.score-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    color: white !important;
    font-size: 13px;
    font-weight: 500;
}

.standard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin: 4px 0;
    border-radius: 6px;
    background: #f8f8f8;
}

.standard-item.needs-review {
    background: #fff5f5;
    border-left: 3px solid var(--color-danger);
}

.standard-item.mastered {
    background: #f0fff4;
    border-left: 3px solid var(--color-success);
}

.standard-code {
    font-weight: 600;
}

.standard-score {
    font-weight: 500;
}

.hard-question-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: #f8f8f8;
    border-radius: 8px;
    margin-bottom: 8px;
}

.hard-question-rank {
    width: 32px;
    height: 32px;
    background: var(--color-danger);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.hard-question-content {
    flex: 1;
}

.responses-list {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.response-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid #e0e0e0;
}

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

.response-item.correct {
    background: #f0fff4;
}

.response-item.incorrect {
    background: #fff5f5;
}

.response-item.ungraded {
    background: #fafafa;
}

.response-source {
    width: 100px;
    font-weight: 500;
    color: #666;
    flex-shrink: 0;
}

.response-answer {
    flex: 1;
    word-break: break-word;
}

.response-result {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.loading-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: #666;
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.share-modal input {
    background: #f5f5f5;
}

/* ===== SEARCH SELECT DROPDOWN ===== */
.search-select-container {
    position: relative;
}

.search-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    margin-top: 4px;
}

.search-select-option {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.search-select-option:last-child {
    border-bottom: none;
}

.search-select-option:hover {
    background: var(--color-smoke-white);
}

.search-select-option .text-muted {
    font-size: 0.9em;
}

/* Small form labels */
.form-label-small {
    display: block;
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Logo image in sidebar */
.logo-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 8px;
}

.sidebar .logo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar .logo-subtitle {
    font-size: 11px;
    opacity: 0.7;
    text-align: center;
    letter-spacing: 0.5px;
}

/* ============================================
   LESSON EDITOR - CREATOR INFO
   ============================================ */

.editor-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    margin-top: 4px;
}

.editor-meta .text-muted {
    color: var(--color-text-muted);
}

.step-creator {
    font-size: 10px;
    color: var(--color-text-muted);
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.changelog-entry:last-child {
    border-bottom: none !important;
}

/* ============================================
   STANDARDS PAGE - HIERARCHICAL BROWSER
   ============================================ */

.standards-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
    align-items: start;
}

.standards-sidebar .card {
    position: sticky;
    top: 20px;
}

.standards-tree {
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

/* Tree item styles */
.tree-item {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.tree-item:hover {
    background: #f8f9fa;
}

.tree-item.selected {
    background: #e3f2fd;
    border-left: 3px solid var(--color-primary);
}

.tree-toggle-wrap {
    flex-shrink: 0;
    width: 24px;
}

.tree-toggle {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #666;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.15s;
}

.tree-toggle:hover {
    background: #e0e0e0;
    color: var(--color-primary);
}

.tree-toggle-placeholder {
    width: 24px;
    flex-shrink: 0;
}

.tree-icon {
    flex-shrink: 0;
    font-size: 14px;
}

.tree-label {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    cursor: pointer;
}

.tree-code {
    font-size: 11px;
    color: #888;
    font-weight: 500;
}

.tree-title {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tree-parent {
    font-size: 10px;
    color: #999;
    font-style: italic;
}

/* Type-specific styling */
.tree-item-grade {
    background: #f0f4f8;
}

.tree-item-grade .tree-title {
    font-weight: 600;
    color: #1a365d;
}

.tree-item-disciplinary_core_idea {
    background: #f8f4f0;
}

.tree-item-disciplinary_core_idea .tree-title {
    font-weight: 500;
    color: #744210;
}

.tree-item-topic {
    background: #fafafa;
}

.tree-children {
    border-left: 2px solid #e0e0e0;
    margin-left: 22px;
}

/* Standard detail panel */
.standard-full-text,
.standard-notes {
    font-size: 14px;
    line-height: 1.7;
    color: #333;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.children-list {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.child-item {
    padding: 10px 12px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: background 0.15s;
}

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

.child-item:hover {
    background: #f8f9fa;
}

.child-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.child-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.child-content strong {
    font-size: 13px;
    color: #333;
}

.child-content .text-muted {
    font-size: 12px;
    line-height: 1.4;
}

/* Suggest Standards Modal */
.suggest-instructions {
    background: #f0f7ff;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid var(--color-primary);
}

.suggest-result {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.suggest-result:hover {
    border-color: var(--color-primary);
    background: #f8f9fa;
}

.suggest-result-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.suggest-result-icon {
    font-size: 16px;
}

.suggest-result-header strong {
    font-size: 13px;
}

.suggest-score {
    margin-left: auto;
    background: var(--color-primary);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}

.suggest-result-title {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 8px;
}

.suggest-result-keywords {
    font-size: 12px;
    color: #666;
}

.keyword-tag {
    display: inline-block;
    background: #e8f4e8;
    color: #2d6a2d;
    padding: 2px 8px;
    border-radius: 4px;
    margin: 2px 4px 2px 0;
    font-size: 11px;
}

.usage-list {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.usage-item {
    padding: 8px 12px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

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

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    flex-wrap: wrap;
}

.breadcrumb-item {
    color: var(--color-primary);
    cursor: pointer;
}

.breadcrumb-item:hover {
    text-decoration: underline;
}

/* Search results */
.search-result {
    border-left: 3px solid var(--color-auburn-orange);
}

/* Import */
.import-instructions {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
}

.import-instructions ul {
    list-style: disc;
}

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

.progress-fill {
    height: 100%;
    background: var(--color-primary);
    width: 100%;
    animation: progress-indeterminate 1.5s infinite linear;
}

@keyframes progress-indeterminate {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Input with icon */
.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    width: 16px;
    height: 16px;
}

.input-with-icon .form-input {
    padding-left: 36px;
}

/* Responsive */
@media (max-width: 1024px) {
    .standards-layout {
        grid-template-columns: 1fr;
    }
    
    .standards-sidebar .card {
        position: static;
    }
    
    .standards-tree {
        max-height: 400px;
    }
}

/* ===== RICH TEXT EDITOR ===== */
.rich-text-toolbar {
    display: flex;
    gap: 4px;
    padding: 8px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

.toolbar-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.toolbar-btn:hover {
    background: #e9ecef;
}

.rich-text-editor {
    min-height: 80px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    background: white;
    line-height: 1.6;
}

.rich-text-editor:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(11, 35, 65, 0.1);
}

.rich-text-editor:empty:before {
    content: attr(data-placeholder);
    color: #aaa;
}

/* ===== OPTION IMAGES ===== */
.option-row-with-image {
    margin-bottom: 12px;
}

.option-main-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-image-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    margin-left: 48px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.option-image-row.hidden {
    display: none;
}

.option-image-preview {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.option-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.option-image-preview .placeholder {
    color: #aaa;
}

.option-image-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.option-image-actions .form-input-sm {
    font-size: 12px;
    padding: 6px 10px;
}

/* ===== AUDIO UPLOAD ===== */
.audio-upload-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.audio-upload-row .form-input {
    flex: 1;
}

/* ===== DEVICE MANAGEMENT ===== */
.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
}

.device-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    border-left: 4px solid #ccc;
    transition: all 0.2s;
}

.device-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.device-card.online {
    border-left-color: var(--color-success);
}

.device-card.idle {
    border-left-color: var(--color-warning);
}

.device-card.offline {
    border-left-color: var(--color-danger);
    opacity: 0.7;
}

.device-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.device-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-auburn-blue);
    color: white;
    border-radius: 10px;
}

.device-icon svg {
    width: 24px;
    height: 24px;
}

.device-info {
    flex: 1;
}

.device-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--color-auburn-blue);
}

.device-id {
    font-size: 12px;
    color: #888;
    font-family: monospace;
}

.device-status {
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: capitalize;
}

.device-details {
    padding: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 13px;
    color: #666;
}

.detail-value {
    font-size: 13px;
    font-weight: 500;
}

.detail-value code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.device-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.device-actions .btn {
    flex: 1;
}

.device-history {
    padding: 12px 16px;
    background: #fafafa;
    border-top: 1px solid #eee;
}

.history-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 8px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.history-cmd {
    font-family: monospace;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
}

.history-status {
    width: 16px;
    text-align: center;
}

.history-status.executed { color: var(--color-success); }
.history-status.acknowledged { color: var(--color-warning); }
.history-status.pending { color: #ccc; }

.history-time {
    color: #888;
    margin-left: auto;
}

/* Stats row mini cards */
.stats-row {
    display: flex;
    gap: 16px;
}

.stat-card.mini {
    flex: 1;
    max-width: 150px;
    padding: 16px;
    text-align: center;
}

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

.stat-card.mini .stat-label {
    font-size: 12px;
}

/* Bulk Actions Bar */
.bulk-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-auburn-blue, #1a3a5c);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.bulk-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}

.bulk-info input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.bulk-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.bulk-actions-bar .btn {
    border-color: rgba(255,255,255,0.3);
    color: white;
}

.bulk-actions-bar .btn:hover {
    background: rgba(255,255,255,0.15);
}

.bulk-actions-bar .btn-danger {
    border-color: rgba(255,100,100,0.5);
}

/* Device checkbox in cards */
.device-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--color-auburn-blue, #1a3a5c);
}
