/* ============================================
   HOME PAGES - Login, Search, Reset
   ============================================ */

/* --- Login Page --- */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    background: radial-gradient(circle at top left, rgba(37, 83, 135, 0.05), transparent),
                radial-gradient(circle at bottom right, rgba(223, 233, 243, 0.3), transparent);
    padding: 2rem;
}

/* --- Login Page Redesign --- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { 0%, 100% { opacity: .18; } 50% { opacity: .32; } }
@keyframes floatOrb { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }

.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    background: radial-gradient(circle at top left, rgba(37, 83, 135, 0.05), transparent),
                radial-gradient(circle at bottom right, rgba(223, 233, 243, 0.3), transparent);
}

.ns-root {
    font-family: 'Outfit', sans-serif;
    display: flex;
    width: 100%;
    max-width: 900px;
    height: 600px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.15);
}

.ns-left {
    width: 45%;
    background: #0d1f35;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3.5rem 3rem;
    overflow: hidden;
}

.ns-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 30%, rgba(37, 83, 135, .9) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 80%, rgba(37, 120, 200, .35) 0%, transparent 50%);
    pointer-events: none;
}

.ns-geo { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.ns-geo-circle { position: absolute; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .06); animation: shimmer 6s ease-in-out infinite; }
.ns-geo-circle:nth-child(1) { width: 320px; height: 320px; top: -80px; right: -100px; animation-delay: 0s; }
.ns-geo-circle:nth-child(2) { width: 200px; height: 200px; top: 40px; right: -20px; animation-delay: 1s; }
.ns-geo-circle:nth-child(3) { width: 480px; height: 480px; bottom: -200px; left: -160px; animation-delay: 2s; }
.ns-geo-dot { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .07); animation: floatOrb 8s ease-in-out infinite; }
.ns-geo-dot:nth-child(4) { width: 6px; height: 6px; top: 30%; left: 62%; animation-delay: 0s; }
.ns-geo-dot:nth-child(5) { width: 4px; height: 4px; top: 60%; left: 75%; animation-delay: 2s; }
.ns-geo-dot:nth-child(6) { width: 8px; height: 8px; top: 75%; left: 55%; animation-delay: 4s; }

.ns-brand { position: relative; z-index: 2; animation: fadeUp .6s ease both; }
.ns-brand-logo { width: 64px; height: 64px; background: white; border-radius: 16px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
.ns-brand-logo img { width: 38px; height: 38px; object-fit: contain; }
.ns-title { font-size: 2.6rem; font-weight: 800; color: white; letter-spacing: -1.5px; line-height: 1.05; margin-bottom: .75rem; }
.ns-title span { color: #7ab4f5; }
.ns-tagline { font-size: 1rem; color: rgba(255, 255, 255, .5); font-weight: 400; line-height: 1.5; max-width: 280px; }

.ns-features { position: relative; z-index: 2; animation: fadeUp .6s .15s ease both; }
.ns-feat { display: flex; align-items: center; gap: 1rem; padding: 0.85rem 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.ns-feat:first-child { border-top: none; }
.ns-feat-icon { width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, .08); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ns-feat-icon i { font-size: 1.2rem; color: rgba(255, 255, 255, .7); }
.ns-feat-text { font-size: 0.85rem; color: rgba(255, 255, 255, .55); line-height: 1.4; }
.ns-feat-text strong { color: rgba(255, 255, 255, .85); font-weight: 600; display: block; font-size: 0.9rem; margin-bottom: 1px; }

.ns-left-footer { position: relative; z-index: 2; animation: fadeUp .6s .25s ease both; }
.ns-left-footer p { font-size: .75rem; color: rgba(255, 255, 255, .25); font-weight: 500; }

.ns-right {
    flex: 1;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3.5rem;
    position: relative;
}

.ns-form-header { margin-bottom: 2.5rem; animation: fadeUp .5s .1s ease both; }
.ns-form-header h2 { font-size: 1.8rem; font-weight: 800; color: var(--text-main); margin-bottom: .4rem; letter-spacing: -0.5px; }
.ns-form-header p { font-size: .95rem; color: var(--text-muted); }

.ns-field { margin-bottom: 1.5rem; animation: fadeUp .5s ease both; position: relative; }
.ns-field:nth-child(1) { animation-delay: .15s; }
.ns-field:nth-child(2) { animation-delay: .22s; }
.ns-field label { display: block; font-size: .75rem; font-weight: 800; color: var(--text-muted); margin-bottom: .6rem; text-transform: uppercase; letter-spacing: 1px; }
.ns-input-wrap { position: relative; }
.ns-input-wrap i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 1.25rem; color: var(--text-muted); opacity: 0.5; pointer-events: none; transition: color 0.2s; }
.ns-input {
    width: 100%; padding: 1.1rem 1.25rem 1.1rem 3.5rem;
    border: 1px solid var(--border);
    border-radius: 14px; font-family: 'Outfit', sans-serif; font-size: 1rem;
    color: var(--text-main); background: #f8fafc;
    outline: none; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.ns-input::placeholder { color: rgba(90, 102, 115, 0.3); }
.ns-input:focus { border-color: var(--primary); background: white; box-shadow: 0 10px 20px rgba(37, 83, 135, 0.08); }
.ns-input:focus + i { color: var(--primary); opacity: 1; }

.ns-btn {
    width: 100%; padding: 1.2rem; background: var(--primary); color: white; border: none;
    border-radius: 14px; font-family: 'Outfit', sans-serif; font-size: 1.1rem; font-weight: 700;
    cursor: pointer; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px rgba(37, 83, 135, 0.25); letter-spacing: .5px;
    animation: fadeUp .5s .33s ease both; display: flex; align-items: center; justify-content: center; gap: .75rem;
    margin-top: 1rem;
}
.ns-btn:hover { transform: translateY(-3px); box-shadow: 0 15px 35px rgba(37, 83, 135, 0.35); filter: brightness(1.1); }
.ns-btn:active { transform: translateY(0); box-shadow: 0 4px 12px rgba(37, 83, 135, .25); }
.ns-btn i { font-size: 1.4rem; }

.ns-form-footer { text-align: center; margin-top: 2rem; font-size: .8rem; color: var(--text-muted); animation: fadeUp .5s .38s ease both; opacity: 0.7; }

.ns-status-bar { position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background: rgba(0, 0, 0, 0.03); overflow: hidden; }
.ns-status-bar::after { content: ''; position: absolute; left: 0; top: 0; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), #7ab4f5); transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.ns-root:has(.ns-input:focus) .ns-status-bar::after { width: 100%; }

@media (max-width: 850px) {
    .ns-left { display: none; }
    .ns-root { max-width: 480px; height: auto; }
}

/* Modal Forgot Password */
.ns-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(13, 31, 53, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
}

.ns-modal {
    background: white;
    padding: 3rem;
    border-radius: 24px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.ns-modal-icon {
    width: 60px;
    height: 60px;
    background: rgba(37, 83, 135, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

.ns-modal h3 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 1rem;
    font-weight: 800;
}

.ns-modal p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.ns-modal-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.ns-modal-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.error-msg {
    background: #ffe4e6;
    color: #e11d48;
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid #fda4af;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* --- Search Page --- */
.search-wrapper {
    flex-direction: row !important;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 4rem 1.5rem 6rem;
}

.search-page {
    width: 100%;
    max-width: 820px;
}

.search-header {
    margin-bottom: 3.5rem;
}

.brand-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
}

.main-brand-logo {
    height: 140px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(37, 83, 135, 0.1));
}

.brand-text {
    text-align: left;
}

.brand-title {
    font-size: 4.5rem;
    margin-bottom: 0rem;
    line-height: 1;
    letter-spacing: -2px;
}

.brand-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 500;
    opacity: 0.8;
}

.search-bar-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: 3rem;
    padding: 0.4rem 0.4rem 0.4rem 1.25rem;
    transition: 0.2s;
    box-shadow: 0 8px 40px -12px rgba(37, 83, 135, 0.18);
    margin-bottom: 2rem;
}

.search-bar-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 6px 30px -8px rgba(37, 83, 135, 0.25);
}

.search-bar-icon {
    font-size: 1.2rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    padding: 0.85rem 1rem;
    font-size: 1.05rem;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted);
    opacity: 0.65;
}

.search-btn {
    background: var(--primary);
    border: none;
    border-radius: 2.5rem;
    min-width: 48px;
    height: 48px;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: 0.15s;
    flex-shrink: 0;
}

.search-btn:hover {
    background: #1a3f6a;
    transform: scale(1.03);
}

/* Count bar */
.results-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.results-count {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.results-count strong {
    color: var(--primary);
    font-weight: 700;
}

.results-clear {
    font-size: 0.82rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.results-clear:hover {
    color: var(--accent);
}

/* Result card */
.result-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: box-shadow 0.15s, transform 0.15s;
}

.result-card:hover {
    box-shadow: 0 6px 24px -8px rgba(37, 83, 135, 0.12);
    transform: translateY(-1px);
}

.result-card-active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 83, 135, 0.15);
}

.rc-header {
    padding: 0.65rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #f8fafd;
    border-bottom: 1px solid var(--border);
}

.rc-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
}

.rc-badge.cat {
    background: rgba(37, 83, 135, 0.1);
    color: var(--primary);
}

.rc-badge.sec {
    background: rgba(139, 162, 135, 0.12);
    color: #4e7349;
}

.rc-badge.row {
    background: rgba(219, 182, 90, 0.12);
    color: #8a6c12;
}

.rc-section-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-main);
}

.rc-section-name mark {
    background: rgba(37, 83, 135, 0.12);
    color: var(--primary);
    border-radius: 3px;
    padding: 0 2px;
    font-style: normal;
    font-weight: 700;
}

.rc-body {
    padding: 0.9rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.data-pair {
    display: inline-flex;
    align-items: baseline;
    gap: 0.3rem;
    background: #f4f6fa;
    border: 1px solid #e4eaf2;
    border-radius: 999px;
    padding: 0.3rem 0.85rem;
}

.data-key {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.data-sep {
    color: #c0cad8;
    font-size: 0.75rem;
}

.data-val {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
}

.data-pair.highlighted {
    background: rgba(37, 83, 135, 0.07);
    border-color: rgba(37, 83, 135, 0.22);
}

.data-pair.highlighted .data-val {
    color: var(--primary);
}

.data-val mark {
    background: rgba(37, 83, 135, 0.15);
    color: var(--primary);
    border-radius: 3px;
    padding: 0 2px;
    font-style: normal;
}

.data-key mark {
    background: rgba(37, 83, 135, 0.12);
    color: var(--text-muted);
    border-radius: 3px;
    padding: 0 2px;
    font-style: normal;
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.no-results i {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    color: var(--border);
}

/* Header Actions (logout/admin buttons) */
.header-actions-group {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--border);
    border-radius: 2.5rem;
    padding: 0.35rem;
    gap: 0.35rem;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.action-icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    transition: 0.2s;
    border: none;
    background: transparent;
}

.action-icon-btn i {
    font-size: 1.3rem;
}

.action-icon-btn.admin {
    color: var(--primary);
    background: rgba(37, 83, 135, 0.06);
}

.action-icon-btn.admin:hover {
    background: rgba(37, 83, 135, 0.12);
    transform: scale(1.05);
}

.action-icon-btn.profile {
    color: var(--primary);
    background: rgba(37, 83, 135, 0.06);
}

.action-icon-btn.profile:hover {
    background: rgba(37, 83, 135, 0.12);
    transform: scale(1.05);
}

.action-icon-btn.logout {
    color: var(--text-muted);
}

.action-icon-btn.logout:hover {
    color: #d63031;
    background: rgba(214, 48, 49, 0.06);
    transform: scale(1.05);
}

/* Footer */
.search-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 2.5rem;
}

/* --- Reset Pages --- */
.reset-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.reset-pw-meter { margin-bottom: 1.5rem; text-align: left; }
.reset-pw-meter-bar {
    height: 5px; border-radius: 3px; background: #e5e7eb; overflow: hidden;
}
.reset-pw-meter-bar > span {
    display: block; height: 100%; width: 0;
    transition: width 0.2s, background 0.2s;
}
.reset-pw-meter-label {
    font-size: 0.75rem; margin-top: 0.3rem; color: var(--text-muted);
}

.reset-container {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    border: 1px solid var(--border);
}

.reset-logo {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    font-size: 2rem;
}

.reset-logo.success {
    background: var(--primary);
    color: white;
}

.reset-logo.error {
    background: rgba(162, 80, 59, 0.1);
    color: var(--accent);
    font-size: 2.5rem;
}

.reset-container h2 {
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.reset-container p.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.reset-container .input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.reset-container .input-group i {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
}

.reset-container .input-group input {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 2.8rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: var(--transition-fast);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.01);
}

.reset-container .input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 83, 135, 0.1);
}

.reset-container .error-msg {
    background: rgba(162, 80, 59, 0.1);
    color: var(--accent);
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-return,
.reset-container .btn-submit {
    width: 100%;
    padding: 0.9rem;
    border: none;
    border-radius: 6px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    text-decoration: none;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--primary-glow);
    transition: var(--transition-fast);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-return:hover,
.reset-container .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--primary-glow);
}

/* Admin access link on login page */
.admin-access-bot {
    position: absolute;
    bottom: 2rem;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
    opacity: 0.9;
    font-weight: 500;
}

.admin-access-bot:hover {
    opacity: 1;
    color: var(--accent);
}

/* Responsive */
@media (max-width: 600px) {
    .brand-title {
        font-size: 3rem;
    }

    .brand-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .brand-text {
        text-align: center;
    }

    .main-brand-logo {
        height: 100px;
    }

    .search-wrapper {
        padding: 3rem 1rem 4rem;
    }

    .rc-body {
        gap: 0.4rem;
    }
}