/* Presence / Notch Styles */
.presence-notch {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    /* Always in the "released" expanded state — no shrinking */
    padding: 10px 24px;
    background: var(--bg-surface-solid);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--primary);
    border-top: none;
    /* Attachment to screen top */
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    z-index: var(--z-ui-controls);
    /* Layer 4: Below Nav, Above Dashboard */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    /* Ensure clickable */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-main);
}

.presence-notch:hover {
    /* Same size as base — no expansion/shrink on hover */
    border-color: var(--primary);
}

.presence-notch .status-info {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.notch-divider {
    color: var(--border-glass);
    font-weight: 300;
    margin: 0 4px;
}

#digital-clock {
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 700;
    text-shadow: 0 0 12px rgba(var(--p-rgb), 0.5);
    cursor: pointer;
    transition: color 0.3s ease;
}

#digital-date {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.presence-notch .pulse-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulse-green 2s infinite;
}

.presence-nav-arrows {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid var(--border-strong);
    align-items: center;
    justify-content: center;
}

.presence-nav-arrows button {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 4px;
    font-size: 0.7rem;
    transition: all 0.2s;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 14px;
}

.presence-nav-arrows button:hover {
    color: var(--primary);
    transform: scale(1.2);
}

@keyframes pulse-green {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        transform: scale(1.2);
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Student Dashboard Overlay */
.student-dashboard {
    position: fixed;
    top: -100%;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100vh;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(15px);
    z-index: var(--z-modal);
    /* Layer 5: Below Nav (20M) & Above Notch (10M) */
    transition: top 0.6s cubic-bezier(0.85, 0, 0.15, 1);
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
}

.student-dashboard.show {
    top: 0 !important;
    display: flex !important;
    /* Force flex in case overwritten */
}

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

.dashboard-header h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: 2rem;
    color: white;
}



.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    width: 100%;
}

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

.dash-select {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 10px 18px;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    transition: 0.2s;
}

.dash-select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.dash-select option {
    background: #1e293b;
    color: white;
}

.student-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    overflow-y: auto;
    padding-bottom: 40px;
    align-content: flex-start;
}

.student-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    /* Little rounded corners */
    padding: 10px 14px;
    display: flex;
    flex-direction: row;
    /* Horizontal layout */
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 60px;
}

.student-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    border-color: var(--primary);
}

.student-card.active-view {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.student-card.offline {
    opacity: 0.6;
}

/* Compact Inner Layout */
.student-avatar-small {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
    font-weight: 600;
}

.student-info-col {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 2px;
}

.student-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.student-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hand-icon-inline {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

.student-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.student-location-pill {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Card Actions - Second Line / Right aligned */
.card-actions-mini {
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.4;
    /* Subtle by default */
    transition: opacity 0.2s;
}

.student-card:hover .card-actions-mini {
    opacity: 1;
}

.action-mini-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.2s;
}

.action-mini-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
}

.action-mini-btn.warning:hover {
    color: #f59e0b;
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.action-mini-btn.danger:hover {
    color: #ef4444;
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.action-mini-btn.freeze:hover {
    color: #3b82f6;
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.action-mini-btn.alert-student:hover {
    color: #fbbf24;
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

.action-mini-btn.alert-student:active {
    animation: alertBtnPulse 0.3s ease;
}

@keyframes alertBtnPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* Feedback Mode UI */
.feedback-bar {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: #10b981;
    color: white;
    padding: 8px 24px;
    border-radius: 30px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: var(--z-ui-controls);
    display: none;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
    animation: slideDownFade 0.4s ease;
}

.feedback-bar.show {
    display: flex;
}

.btn-exit-feedback {
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
}

.btn-exit-feedback:hover {
    background: rgba(0, 0, 0, 0.4);
}

@keyframes slideDownFade {
    from {
        transform: translate(-50%, -20px);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .student-dashboard {
        padding: 40px 16px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 24px;
    }

    .header-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        width: 100%;
    }

    .header-main h2 {
        font-size: 1.5rem;
    }

    .header-controls {
        width: 100%;
    }

    .dash-select {
        width: 100%;
    }

    .header-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .student-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    .student-card {
        padding: 16px;
    }
}