/* F5 ADSP Support Desk - Dark Helpdesk Theme */
:root {
    /* F5 XC Docs Color Scheme - Light Theme */
    --bg-primary: #f7f8fa;
    --bg-secondary: #fff;
    --bg-tertiary: #e5eaff;
    --bg-card: #fff;
    --text-primary: #0f1e57;
    --text-secondary: #6c778c;
    --text-muted: #a0a7c2;
    --accent-primary: #4f73ff;
    /* F5 XC Blue */
    --accent-blue: #4f73ff;
    --accent-green: #00a86b;
    --accent-yellow: #f5a623;
    --accent-red: #e4002b;
    --accent-purple: #7c3aed;
    --border-color: #e6e9f3;
    --shadow: 0 2px 8px rgba(15, 30, 87, 0.08);
    --radius: 4px;
    --radius-sm: 4px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Feather icons */
.feather {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    vertical-align: middle;
}

.btn .feather,
.btn-secondary .feather {
    margin-right: 6px;
    margin-top: -2px;
}

.top-nav-btn .feather {
    margin-right: 6px;
}

.btn-logout .feather {
    margin: 0;
}

.notes-toggle .feather {
    margin-right: 4px;
}

.reveal-label .feather {
    margin-right: 4px;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Sidebar - Ticket Queue */
.sidebar {
    width: 320px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: var(--shadow);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

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

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
}

.logo-icon-img {
    height: 32px;
    width: auto;
}

.logo h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.team-info {
    background: var(--bg-tertiary);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-top: 16px;
}

.team-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.team-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-primary);
    margin-top: 2px;
}

.team-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-logout {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-logout:hover {
    background: #fee2e2;
    border-color: #fecaca;
    color: #dc2626;
}

.lab-overview-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 12px;
    padding: 12px 16px;
    background: var(--bg-primary);
    color: var(--accent-primary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.lab-overview-link:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.ticket-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.ticket-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.ticket-item:hover {
    border-color: var(--accent-primary);
}

.ticket-item.active {
    border-color: var(--accent-primary);
    background: var(--bg-tertiary);
}

.ticket-item.resolved {
    opacity: 0.7;
}

.ticket-item.resolved .ticket-code {
    text-decoration: line-through;
}

.ticket-priority {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    flex-shrink: 0;
    background: #e0e7ff;
    color: var(--accent-primary);
    border: 1px solid #c7d2fe;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ticket-priority.p1 {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.ticket-priority.p2 {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fde68a;
}

.ticket-priority.p3 {
    background: #d1fae5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

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

.ticket-code {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.ticket-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket-status {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.ticket-status.open {
    background: #e0e7ff;
    color: var(--accent-primary);
}

.ticket-status.resolved {
    background: #d1fae5;
    color: #059669;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.ticket-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    box-shadow: 0 1px 3px rgba(15, 30, 87, 0.05);
}

.ticket-header-top {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.ticket-header h2 {
    font-size: 22px;
    font-weight: 700;
}

.ticket-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    font-style: italic;
}

.lab-guide-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 10px 16px;
    background: #e5eaff;
    color: var(--accent-primary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid #c7d2fe;
}

.lab-guide-link:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.ticket-meta {
    display: flex;
    gap: 24px;
    margin-top: 16px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.meta-item strong {
    color: var(--text-primary);
}

/* Ticket Body */
.ticket-body {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    min-height: 0;
}

.section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.description-text {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.context-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.context-item {
    background: var(--bg-primary);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.context-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.context-value {
    font-size: 13px;
    color: var(--text-primary);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

/* Deliverable Section */
.deliverable-box {
    background: #e5eaff;
    border: 1px solid #c7d2fe;
    border-radius: var(--radius);
    padding: 20px;
}

.deliverable-question {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.deliverable-hint {
    font-size: 13px;
    color: var(--accent-blue);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.deliverable-hint::before {
    content: '💡';
}

/* Trends Checklist */
.trends-list {
    list-style: none;
}

.trends-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

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

.trends-list li::before {
    content: '☐';
    color: var(--text-muted);
}

/* Response Form */
.response-section {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 24px 32px;
    box-shadow: 0 -2px 8px rgba(15, 30, 87, 0.05);
}

.response-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.response-avatar {
    width: 36px;
    height: 36px;
    background: var(--accent-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.response-label {
    font-size: 14px;
    font-weight: 600;
}

.response-label span {
    color: var(--text-secondary);
    font-weight: 400;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group textarea {
    width: 100%;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px;
    font-size: 14px;
    color: var(--text-primary);
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(79, 115, 255, 0.1);
}

.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn {
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    background: #3d5afe;
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    border-color: var(--text-muted);
}

.btn-danger {
    background: #fff;
    color: var(--accent-red);
    border: 1px solid var(--accent-red);
}

.btn-danger:hover {
    background: #fee2e2;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Existing Answer Display */
.existing-answer {
    background: #f0fdf4;
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #22c55e;
    transition: all 0.3s ease;
}

.existing-answer.starred {
    border-left-color: var(--accent-yellow);
    background: #fffbeb;
    border-color: #fde68a;
}

.existing-answer.starred .existing-answer-label {
    color: #d97706;
}

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

.existing-answer-label {
    font-size: 12px;
    font-weight: 600;
    color: #22c55e;
    text-transform: uppercase;
}

.existing-answer-time {
    font-size: 12px;
    color: var(--text-muted);
}

.existing-answer-text {
    font-size: 15px;
    color: var(--text-primary);
    white-space: pre-wrap;
    margin-bottom: 16px;
}

.existing-answer-notes {
    font-size: 13px;
    color: var(--text-secondary);
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    white-space: pre-wrap;
}

/* Login Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 30, 87, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 32px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 40px rgba(15, 30, 87, 0.2);
    border: 1px solid var(--border-color);
}

.modal h2 {
    font-size: 24px;
    margin-bottom: 8px;
    text-align: center;
}

.modal-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.modal .form-group input {
    width: 100%;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px;
    font-size: 16px;
    color: var(--text-primary);
}

.modal .form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(79, 115, 255, 0.1);
}

.modal .btn {
    width: 100%;
    margin-top: 8px;
}

.modal-tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.modal-tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
}

/* ==================== */
/* INSTRUCTOR DASHBOARD */
/* ==================== */

.instructor-container {
    min-height: 100vh;
    background: var(--bg-primary);
}

.instructor-header {
    background: var(--bg-secondary);
    padding: 16px 40px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(15, 30, 87, 0.05);
}

.instructor-header h1 {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.f5-logo {
    height: 32px;
    margin-right: 8px;
}

.instructor-stats {
    display: flex;
    gap: 32px;
}

.stat-box {
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.instructor-controls {
    display: flex;
    gap: 12px;
}

/* Ticket Navigator */
.ticket-navigator {
    background: var(--bg-secondary);
    padding: 16px 40px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.nav-btn {
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.nav-btn.active {
    border-color: var(--accent-primary);
    background: #e5eaff;
    color: var(--accent-primary);
}

.nav-btn .count {
    background: #d1fae5;
    color: #059669;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

.nav-btn .count.zero {
    background: var(--bg-primary);
    color: var(--text-muted);
}

/* Answers Grid */
.answers-container {
    padding: 32px 40px;
}

.current-ticket-header {
    margin-bottom: 24px;
}

.current-ticket-header h2 {
    font-size: 20px;
    margin-bottom: 8px;
}

.current-ticket-header p {
    color: var(--text-secondary);
}

.answers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.answer-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

.answer-card:hover {
    border-color: var(--accent-primary);
}

.answer-card-header {
    background: var(--bg-primary);
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.answer-team-name {
    font-weight: 700;
    color: var(--accent-primary);
}

.answer-time {
    font-size: 12px;
    color: var(--text-muted);
}

.answer-card-body {
    padding: 18px;
}

/* Hidden answer state */
.answer-hidden {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    background: repeating-linear-gradient(45deg,
            var(--bg-primary),
            var(--bg-primary) 10px,
            var(--border-color) 10px,
            var(--border-color) 11px);
    border-radius: var(--radius-sm);
}

.btn-reveal {
    padding: 12px 24px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reveal:hover {
    background: #3d5afe;
    transform: scale(1.02);
}

/* Reveal controls */
.reveal-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    align-items: center;
}

.reveal-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-right: auto;
}

.reveal-label i {
    font-size: 16px;
}

.hidden-answer .answer-card-header {
    background: var(--bg-primary);
}

.answer-resolution {
    font-size: 15px;
    line-height: 1.6;
    white-space: pre-wrap;
    color: var(--text-primary);
}

.answer-notes {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

.no-answers {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
}

.no-answers-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Instructor Notes */
.instructor-notes-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.instructor-notes-section {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-secondary);
}

.notes-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.notes-toggle:hover {
    color: var(--text-primary);
    background: var(--bg-primary);
}

.notes-toggle i {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.notes-content {
    padding: 0 16px 16px 16px;
}

.instructor-notes-section textarea {
    width: 100%;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px;
    font-size: 14px;
    color: var(--text-primary);
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.instructor-notes-section textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(79, 115, 255, 0.1);
}

/* Login Gate */
.login-gate {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
}

.login-gate .modal {
    background: var(--bg-secondary);
}

/* Keyboard hint */
.keyboard-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
}

.keyboard-hint kbd {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: inherit;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.answer-card {
    animation: fadeIn 0.3s ease;
}

/* Star Button */
.star-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.star-btn:hover {
    background: #fef3c7;
    color: #f59e0b;
}

.star-btn.active {
    color: #f59e0b;
}

.answer-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.answer-card.starred {
    border-color: #f5a623;
    box-shadow: 0 4px 12px rgba(245, 166, 35, 0.15);
}

.answer-card.starred .answer-card-header {
    background: #fffbeb;
    border-bottom-color: #fde68a;
}

/* New answer animation */
.answer-card.new-answer {
    border-color: #22c55e;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.25);
    animation: pulse-green 2s ease-in-out infinite;
}

.answer-card.new-answer .answer-card-header {
    background: #f0fdf4;
    border-bottom-color: #bbf7d0;
}

@keyframes pulse-green {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(34, 197, 94, 0.25);
    }

    50% {
        box-shadow: 0 4px 30px rgba(34, 197, 94, 0.4);
    }
}

.new-badge {
    background: #22c55e;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: badge-pulse 1s ease-in-out infinite;
}

@keyframes badge-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Nav new indicator */
.nav-btn.has-new {
    border-color: #22c55e;
    background: #f0fdf4;
}

.nav-new-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
    animation: dot-pulse 1s ease-in-out infinite;
}

@keyframes dot-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* Top Navigation */
.top-nav {
    display: flex;
    gap: 0;
    padding: 0 40px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.top-nav-btn {
    padding: 16px 24px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -1px;
}

.top-nav-btn:hover {
    color: var(--accent-primary);
}

.top-nav-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

/* Leaderboard Page View */
.leaderboard-view {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 40px;
    overflow-y: auto;
    background: var(--bg-primary);
}

.leaderboard-page {
    width: 100%;
    max-width: 800px;
}

.leaderboard-page-header {
    text-align: center;
    margin-bottom: 32px;
}

.leaderboard-page-header h2 {
    font-size: 32px;
    margin-bottom: 8px;
}

.leaderboard-page-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.leaderboard-page-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.leaderboard-card {
    display: grid;
    grid-template-columns: 80px 1fr 80px 150px;
    gap: 20px;
    align-items: center;
    padding: 20px 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

.leaderboard-card:hover {
    border-color: var(--accent-primary);
}

.leaderboard-card.top-three {
    background: var(--bg-secondary);
}

.leaderboard-card.rank-1 {
    border-color: #fbbf24;
    background: linear-gradient(135deg, #fffbeb, #fff);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
}

.leaderboard-card.rank-2 {
    border-color: #9ca3af;
    background: linear-gradient(135deg, #f9fafb, #fff);
}

.leaderboard-card.rank-3 {
    border-color: #d97706;
    background: linear-gradient(135deg, #fffbeb, #fff);
}

.leaderboard-card-rank {
    text-align: center;
}

.leaderboard-card-rank .medal {
    font-size: 40px;
}

.leaderboard-card-rank .rank-num {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-muted);
}

.leaderboard-card-info {
    min-width: 0;
}

.leaderboard-card-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.leaderboard-card-stars {
    font-size: 14px;
    color: var(--text-secondary);
}

.leaderboard-card-stats {
    text-align: center;
}

.leaderboard-card-star-count {
    font-size: 28px;
    font-weight: 700;
    color: #f59e0b;
}

.leaderboard-card-star-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.leaderboard-card-progress {
    text-align: right;
}

.progress-bar {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), #818cf8);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-label {
    font-size: 12px;
    color: var(--text-muted);
}

.leaderboard-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 60px 20px;
    font-size: 16px;
}

/* Admin Modal */
.admin-modal {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.admin-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.admin-modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.admin-section {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-primary);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.admin-section h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--text-primary);
}

.admin-section p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
}

.admin-section.danger-zone {
    background: #fef2f2;
    border-color: #fecaca;
}

.admin-section.danger-zone h3 {
    color: #dc2626;
}

.admin-form-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-form-row select {
    flex: 1;
    min-width: 150px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
}

.admin-form-row select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(79, 115, 255, 0.1);
}

.admin-form-row .btn {
    white-space: nowrap;
}

/* Team Star Display */
.team-stars-banner {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-stars-banner .stars-icon {
    font-size: 24px;
}

.team-stars-banner .stars-info {
    flex: 1;
}

.team-stars-banner .stars-count {
    font-size: 18px;
    font-weight: 700;
    color: #f59e0b;
}

.team-stars-banner .stars-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.ticket-item.has-star::after {
    content: '⭐';
    font-size: 12px;
    margin-left: auto;
}

/* Laptop screens - optimize for smaller heights */
@media (max-height: 800px) {
    .sidebar-header {
        padding: 12px 16px;
    }

    .logo h1 {
        font-size: 14px;
    }

    .logo-subtitle {
        font-size: 11px;
    }

    .team-info {
        padding: 10px 16px;
    }

    .ticket-item {
        padding: 10px 12px;
        margin-bottom: 6px;
    }

    .ticket-list {
        padding: 8px;
    }

    .ticket-header {
        padding: 16px 24px;
    }

    .ticket-header h2 {
        font-size: 18px;
    }

    .ticket-body {
        padding: 16px 24px;
    }

    .section {
        margin-bottom: 16px;
    }

    .section-title {
        font-size: 11px;
        margin-bottom: 8px;
    }

    .description-text {
        font-size: 13px;
    }

    .context-grid {
        gap: 8px;
    }

    .context-item {
        padding: 10px 12px;
    }

    .deliverable-box {
        padding: 14px;
    }

    .deliverable-question {
        font-size: 14px;
    }

    .trends-list li {
        padding: 6px 0;
        font-size: 13px;
    }

    .response-section {
        padding: 16px 24px;
    }

    .form-group textarea {
        min-height: 70px;
    }

    .lab-guide-link {
        padding: 8px 12px;
        margin-top: 12px;
    }

    .lab-overview-link {
        padding: 10px 12px;
        margin: 8px;
    }
}

/* Even smaller laptop screens */
@media (max-height: 700px) {
    .sidebar {
        width: 280px;
    }

    .ticket-item {
        padding: 8px 10px;
        gap: 8px;
    }

    .ticket-priority {
        font-size: 9px;
        padding: 3px 6px;
    }

    .ticket-title {
        font-size: 12px;
    }

    .ticket-header {
        padding: 12px 20px;
    }

    .ticket-body {
        padding: 12px 20px;
    }

    .section {
        margin-bottom: 12px;
    }

    .response-section {
        padding: 12px 20px;
    }

    .team-stars-banner {
        padding: 8px 12px;
        margin-top: 8px;
    }

    .stars-count {
        font-size: 16px;
    }
}

/* Responsive width */
@media (max-width: 900px) {
    .sidebar {
        width: 280px;
    }

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

@media (max-width: 700px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        max-height: 40vh;
    }
}