:root {
    --primary: #0284c7;
    --primary-light: #38bdf8;
    --secondary: #0d9488;
    --bg-color: #f0fdf4;
    --surface: rgba(255, 255, 255, 0.85);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: rgba(226, 232, 240, 0.8);
    
    --risk-color: #ef4444;
    --risk-bg: #fef2f2;
    --safe-color: #10b981;
    --safe-bg: #ecfdf5;
    
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
    font-family: 'Prompt', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-color);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    padding-bottom: 75px;
}

/* Background Blobs for modern feel */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.6;
    border-radius: 50%;
    animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: #bae6fd;
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: #ccfbf1;
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 60%;
    width: 40vw;
    height: 40vw;
    background: #e0e7ff;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 10%) scale(1.1); }
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ══════════ TOPBAR ══════════ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 200;
    width: 100%;
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226,232,240,0.7);
    box-shadow: 0 1px 12px rgba(2,132,199,0.06);
}

.topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Brand */
.topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    flex-shrink: 0;
}
.topbar-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
}
.topbar-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.topbar-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}
.topbar-title strong { color: var(--primary); }
.topbar-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Nav links */
.topbar-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    justify-content: center;
}
.topbar-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.18s;
}
.topbar-link:hover { background: rgba(2,132,199,0.07); color: var(--primary); }
.topbar-link.active {
    background: rgba(2,132,199,0.1);
    color: var(--primary);
    font-weight: 600;
}

/* Right side */
.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.topbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.topbar-user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.topbar-user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}
.topbar-user-school {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.topbar-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 0.25rem;
}
.topbar-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    border: 1px solid rgba(226,232,240,0.8);
    background: rgba(255,255,255,0.7);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    transition: all 0.18s;
}
.topbar-btn:hover { background: rgba(2,132,199,0.08); color: var(--primary); border-color: #bae6fd; }
.topbar-btn.topbar-btn-danger:hover { background: rgba(239,68,68,0.08); color: #ef4444; border-color: #fecaca; }
.topbar-btn.hidden { display: none; }

@media (max-width: 640px) {
    .topbar-sub, .topbar-user-school { display: none; }
    .topbar-nav { display: none; }
    .topbar-inner { gap: 0.75rem; }
}

/* Glassmorphism utility */
.glass-panel {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

/* Header */
.app-header {
    padding: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.logo-img {
    height: 80px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.12));
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.title-area h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.title-area p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.instructions {
    background: rgba(255, 255, 255, 0.6);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: left;
    border-left: 4px solid var(--secondary);
}

.instructions h3 {
    color: var(--secondary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.instructions ol {
    padding-left: 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.instructions li {
    margin-bottom: 0.25rem;
}

/* Sections */
.form-section {
    padding: 2.5rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.form-section:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.form-section h2 {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 1rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.progress-indicator {
    background: var(--primary-light);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Inputs */
.input-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
}

.input-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.8);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
    background: white;
}

/* Read-only observer name display */
.observer-display {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1rem;
    background: rgba(2, 132, 199, 0.06);
    border: 1.5px solid #bae6fd;
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--primary);
}
.observer-display i { font-size: 1.1rem; }

.row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

/* Questions */
.question-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.question-item {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s;
}

.question-item:hover {
    background: white;
    border-color: var(--primary-light);
}

.question-item.answered {
    background: white;
    border-left: 4px solid var(--primary);
}

.question-text {
    font-size: 1.05rem;
    font-weight: 500;
}

.q-num {
    color: var(--primary);
    font-weight: 600;
    margin-right: 0.5rem;
}

.options {
    display: flex;
    gap: 1.5rem;
}

/* Custom Radio */
.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: #f1f5f9;
    transition: all 0.2s;
    user-select: none;
}

.radio-label:hover {
    background: #e2e8f0;
}

.radio-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-custom {
    height: 18px;
    width: 18px;
    background-color: white;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    margin-right: 8px;
    position: relative;
    transition: all 0.2s;
}

.radio-label input:checked ~ .radio-custom {
    border-color: var(--primary);
}

.radio-custom:after {
    content: "";
    position: absolute;
    display: none;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
}

.radio-label input:checked ~ .radio-custom:after {
    display: block;
}

.radio-label.radio-yes input:checked ~ .radio-custom {
    border-color: var(--risk-color);
}
.radio-label.radio-yes input:checked ~ .radio-custom:after {
    background: var(--risk-color);
}
.radio-label.radio-yes:has(input:checked) {
    background: var(--risk-bg);
    color: var(--risk-color);
}

.radio-label.radio-no input:checked ~ .radio-custom {
    border-color: var(--safe-color);
}
.radio-label.radio-no input:checked ~ .radio-custom:after {
    background: var(--safe-color);
}
.radio-label.radio-no:has(input:checked) {
    background: var(--safe-bg);
    color: var(--safe-color);
}

/* Section Complete State */
.section-complete .progress-indicator {
    background: var(--safe-color);
}

/* Submit Area */
.submit-area {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    margin-bottom: 5rem;
}

.completion-status {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-muted);
}

.btn-submit {
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-family: inherit;
    font-weight: 600;
    color: white;
    background: #94a3b8;
    border: none;
    border-radius: 30px;
    cursor: not-allowed;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-submit.ready {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.4);
}

.btn-submit.ready:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
}

.btn-submit.ready:active {
    transform: translateY(0);
}

/* Result Cards (In-form) */
.result-card {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeIn 0.5s;
}

.result-card.hidden {
    display: none;
}

.result-card.bg-risk {
    background: var(--risk-bg);
    border: 1px solid #fca5a5;
}

.result-card.bg-safe {
    background: var(--safe-bg);
    border: 1px solid #6ee7b7;
}

.result-score {
    font-size: 1.2rem;
    font-weight: 600;
}

.score-value {
    font-size: 1.5rem;
}

.result-interpretation {
    text-align: right;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.status-badge.risk {
    background: var(--risk-color);
    color: white;
}

.status-badge.safe {
    background: var(--safe-color);
    color: white;
}

.status-text {
    font-size: 0.9rem;
    color: var(--text-main);
    max-width: 300px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s;
    padding: 1rem;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: white; /* solid background for modal */
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 0;
    transform: translateY(0);
    transition: transform 0.3s;
}

.modal-overlay.hidden .modal-content {
    transform: translateY(20px);
}

.btn-close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.btn-close-modal:hover {
    color: var(--risk-color);
}

.modal-header {
    padding: 2rem 2.5rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header-top {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.modal-header h2 {
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-body {
    padding: 2rem 2.5rem;
}

.student-summary {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.student-summary p {
    margin: 0;
    color: var(--text-muted);
}

.student-summary strong {
    color: var(--text-main);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.result-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s;
}

.result-item:hover {
    transform: translateY(-2px);
}

.result-item h3 {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.result-item .score {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.item-risk {
    border-color: #fca5a5;
    background: #fef2f2;
}

.item-risk .score {
    color: var(--risk-color);
}

.item-safe {
    border-color: #6ee7b7;
    background: #ecfdf5;
}

.item-safe .score {
    color: var(--safe-color);
}

.result-item .badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 1rem;
}

.badge-risk {
    background: var(--risk-color);
    color: white;
}

.badge-safe {
    background: var(--safe-color);
    color: white;
}

.recommendation {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
    padding-top: 1rem;
    border-top: 1px dashed var(--border);
}

.modal-footer {
    padding: 1.5rem 2.5rem;
    background: #f8fafc;
    border-top: 1px solid var(--border);
    text-align: right;
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}

.btn-print {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 600;
    color: white;
    background: var(--text-main);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-print:hover {
    background: black;
}

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

/* ══════════ RESPONSIVE / MOBILE ══════════ */
@media (max-width: 768px) {

    /* ── Container ── */
    .container { padding: 1rem 0.75rem 6rem; } /* bottom pad for mobile nav */

    /* ── Topbar: slim, show only logo + avatar, hide redundant items ── */
    .topbar-inner  { height: 52px; padding: 0 1rem; gap: 0.75rem; }
    .topbar-sub    { display: none; }
    .topbar-title  { font-size: 0.88rem; }
    .topbar-logo   { height: 28px; }
    .topbar-nav    { display: none; }         /* → bottom nav */
    .topbar-user-school { display: none; }
    .topbar-user-name   { display: none; }    /* → avatar is enough */
    .topbar-divider     { display: none; }
    #btnAdminSettings   { display: none !important; }  /* admin only, not needed on mobile nav */
    .topbar-avatar { width: 30px; height: 30px; font-size: 0.8rem; }

    /* ── App Header ── */
    .app-header { padding: 1.25rem 1rem; }
    .title-area h1  { font-size: 1.3rem; }
    .title-area p   { font-size: 0.9rem; }
    .logo-img       { height: 56px; }
    .instructions   { padding: 1rem; font-size: 0.88rem; }
    .instructions ol { padding-left: 1.2rem; }

    /* ── Form Sections ── */
    .form-section { padding: 1.25rem 1rem; border-radius: 16px; }
    .form-section:hover { transform: none; } /* disable hover lift on mobile */
    .form-section h2 { font-size: 1.1rem; }
    .row-2 { grid-template-columns: 1fr; }

    /* ── Inputs: larger touch targets ── */
    .input-group input,
    .input-group select {
        padding: 0.85rem 1rem;
        font-size: 1rem;      /* prevents iOS zoom on focus */
        border-radius: 10px;
    }
    .input-group label { font-size: 0.88rem; }
    .observer-display { padding: 0.85rem 1rem; font-size: 0.92rem; }

    /* ── Questions: compact rows ── */
    .question-item {
        flex-direction: column;
        padding: 1rem;
        border-radius: 12px;
        gap: 0.75rem;
    }
    .question-text { font-size: 0.95rem; line-height: 1.5; }
    .options {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    .radio-label {
        justify-content: center;
        padding: 0.6rem 0.5rem;
        font-size: 0.88rem;
        border-radius: 10px;
    }

    /* ── Section header ── */
    .section-header { margin-bottom: 1rem; }
    .progress-indicator { font-size: 0.82rem; padding: 0.2rem 0.6rem; }

    /* ── Submit area ── */
    .submit-area { padding: 1.25rem 1rem; margin-top: 1.5rem; margin-bottom: 1rem; }
    .btn-submit { padding: 0.9rem 2rem; font-size: 1.05rem; width: 100%; justify-content: center; border-radius: 14px; }

    /* ── Result cards ── */
    .result-card { flex-direction: column; gap: 0.75rem; text-align: center; padding: 1rem; }
    .result-interpretation { text-align: center; }
    .status-text { max-width: 100%; font-size: 0.85rem; }

    /* ── Modal ── */
    .modal-content { border-radius: 16px; }
    .modal-header  { padding: 1.25rem 1.25rem 1rem; }
    .modal-body    { padding: 1.25rem; }
    .modal-footer  { padding: 1rem 1.25rem; }
    .results-grid  { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .result-item   { padding: 1rem; }
    .result-item h3 { font-size: 0.88rem; }
    .result-item .score { font-size: 1.8rem; }
    .recommendation { font-size: 0.82rem; }
    .student-summary { grid-template-columns: 1fr 1fr; gap: 0.75rem; padding: 1rem; font-size: 0.88rem; }
}

@media (max-width: 480px) {
    .results-grid  { grid-template-columns: 1fr; }
    .student-summary { grid-template-columns: 1fr; }
}

/* ══════════ MOBILE BOTTOM NAV ══════════ */
/* Always shown on all screen sizes (desktop and mobile) */
.mobile-bottom-nav {
    display: block;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 300;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(226,232,240,0.6);
    box-shadow: 0 -2px 20px rgba(0,0,0,0.07);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.mobile-bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    max-width: 480px;
    margin: 0 auto;
    padding: 0.35rem 0.5rem;
    gap: 0.25rem;
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.22rem;
    padding: 0.5rem 0.25rem 0.4rem;
    border-radius: 14px;
    text-decoration: none;
    color: #94a3b8;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    background: transparent;
    border: none;
    font-family: inherit;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item i {
    font-size: 1.3rem;
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
    line-height: 1;
}

/* Active state */
.mobile-nav-item.active {
    color: var(--primary);
    background: rgba(2, 132, 199, 0.1);
}
.mobile-nav-item.active i {
    transform: scale(1.1);
    filter: drop-shadow(0 2px 6px rgba(2,132,199,0.35));
}
.mobile-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0; left: 20%; right: 20%;
    height: 2.5px;
    border-radius: 0 0 3px 3px;
    background: var(--primary);
}

/* Danger (logout) */
.mobile-nav-item.danger { color: #ef4444; }
.mobile-nav-item.danger:active,
.mobile-nav-item.danger:hover {
    background: rgba(239,68,68,0.08);
    color: #dc2626;
}

/* Tap feedback */
.mobile-nav-item:active { transform: scale(0.9); }
.mobile-nav-item.active:active { transform: scale(0.95); }

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    
    #summaryModal, #summaryModal * {
        visibility: visible;
    }
    
    #summaryModal {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: white;
    }
    
    .modal-content {
        box-shadow: none;
        border: none;
        max-width: 100%;
    }
    
    .btn-close-modal, .modal-footer {
        display: none !important;
    }
    
    .item-risk {
        border: 2px solid #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .badge-risk {
        background: #ef4444 !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .badge-safe {
        background: #10b981 !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ══════════ GLOBAL PREMIUM TOAST ══════════ */
.g-toast-wrap {
    position: fixed;
    bottom: 5.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.g-toast-wrap.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.g-toast {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1.4rem 0.9rem 1rem;
    border-radius: 18px;
    min-width: 240px;
    max-width: 88vw;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.25);
    position: relative;
    overflow: hidden;
}
.g-toast-success { background: rgba(16,185,129,0.92); color: white; }
.g-toast-error   { background: rgba(239,68,68,0.92);  color: white; }
.g-toast-info    { background: rgba(2,132,199,0.92);  color: white; }

.g-toast-icon {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.22);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.g-toast-body { flex: 1; }
.g-toast-title { font-weight: 700; font-size: 0.97rem; line-height: 1.2; }
.g-toast-sub   { font-size: 0.78rem; opacity: 0.85; margin-top: 0.1rem; }

/* Progress bar at bottom */
.g-toast-progress {
    position: absolute;
    bottom: 0; left: 0;
    height: 3px;
    background: rgba(255,255,255,0.5);
    border-radius: 0 0 18px 18px;
    animation: toastProgress var(--toast-dur, 3s) linear forwards;
}
@keyframes toastProgress {
    from { width: 100%; }
    to   { width: 0%; }
}

@media (max-width: 768px) {
    .g-toast-wrap { bottom: 5rem; }
}
