/* =============================================
   ABRAZIA INVESTOR DATA ROOM - SHARED STYLES
   Extracted from monolithic index.html
   ============================================= */

:root {
    /* Abrazia Brand Colors */
    --primary-dark-teal: #0D5257;
    --medium-green: #6FA287;
    --light-sage: #ADCAB8;
    --pale-mint: #D1E0D7;
    --warm-beige: #F3CFB3;
    --accent-orange: #FF6A39;

    /* Neutral Colors */
    --white: #FFFFFF;
    --off-white: #FAFBFA;
    --light-gray: #F5F5F5;
    --medium-gray: #E0E0E0;
    --dark-gray: #666666;
    --text-dark: #1A1A1A;

    /* Semantic Colors */
    --success: #4CAF50;
    --warning: #FFC107;
    --error: #F44336;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);

    /* Transitions */
    --transition: all 0.3s ease;
}

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

/* Back navigation button (reusable) */
.dr-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--white);
    color: var(--primary-dark-teal);
    border: 1.5px solid var(--primary-dark-teal);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    margin-bottom: 20px;
}
.dr-back-btn:hover { background: var(--light-gray); }

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    background: var(--off-white);
    color: var(--text-dark);
    line-height: 1.6;
}

/* =============================================
   LOGIN GATE
   ============================================= */

.login-gate {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-dark-teal) 0%, #0a3d40 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.login-gate.hidden {
    display: none;
}

.login-box {
    background: var(--white);
    padding: 48px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    max-width: 420px;
    width: 90%;
}

.login-logo {
    max-width: 180px;
    margin-bottom: 24px;
}

.login-title {
    font-size: 24px;
    color: var(--primary-dark-teal);
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--dark-gray);
    margin-bottom: 32px;
}

.login-form input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 16px;
    transition: var(--transition);
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-dark-teal);
}

.login-form button {
    width: 100%;
    padding: 14px;
    background: var(--primary-dark-teal);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.login-form button:hover {
    background: #0a3d40;
}

.login-error {
    color: var(--error);
    font-size: 14px;
    margin-top: 12px;
    display: none;
}

.login-error.show {
    display: block;
}

.login-footer {
    margin-top: 24px;
    font-size: 12px;
    color: var(--dark-gray);
}

/* =============================================
   MAIN LAYOUT
   ============================================= */

.app {
    display: block;
}

/* Header */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--medium-gray);
    padding: 16px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    height: 40px;
}

.header-nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    color: var(--dark-gray);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.nav-link:hover {
    background: var(--pale-mint);
    color: var(--primary-dark-teal);
}

.nav-link.active {
    background: var(--primary-dark-teal);
    color: var(--white);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logout-btn {
    padding: 8px 16px;
    background: var(--light-gray);
    border: none;
    border-radius: 6px;
    font-size: 13px;
    color: var(--dark-gray);
    cursor: pointer;
    transition: var(--transition);
}

.logout-btn:hover {
    background: var(--medium-gray);
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* =============================================
   OVERVIEW SECTION
   ============================================= */

.overview-hero {
    background: linear-gradient(135deg, var(--primary-dark-teal) 0%, #0a3d40 100%);
    color: var(--white);
    padding: 48px;
    border-radius: 16px;
    margin-bottom: 32px;
}

.overview-hero h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

.overview-hero p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 24px;
}

.overview-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

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

.stat-value {
    font-size: 36px;
    font-weight: 700;
}

.stat-label {
    font-size: 14px;
    opacity: 0.8;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.card {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--medium-gray);
}

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

.card-icon {
    width: 40px;
    height: 40px;
    background: var(--pale-mint);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-dark-teal);
}

.card-content {
    font-size: 14px;
    color: var(--dark-gray);
}

.card-content table {
    width: 100%;
    border-collapse: collapse;
}

.card-content td {
    padding: 8px 0;
    border-bottom: 1px solid var(--light-gray);
}

.card-content td:last-child {
    text-align: right;
    font-weight: 600;
    color: var(--text-dark);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--medium-green);
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--medium-green);
    border: 3px solid var(--white);
}

.timeline-item.completed::before {
    background: var(--success);
}

.timeline-item.current::before {
    background: var(--accent-orange);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.timeline-date {
    font-size: 12px;
    color: var(--dark-gray);
    font-weight: 600;
}

.timeline-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

/* =============================================
   DOCUMENTS SECTION
   ============================================= */

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

.documents-title {
    font-size: 24px;
    color: var(--primary-dark-teal);
}

.documents-search {
    display: flex;
    gap: 12px;
}

.search-input {
    padding: 10px 16px;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    width: 280px;
    font-size: 14px;
}

.filter-select {
    padding: 10px 16px;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    font-size: 14px;
    background: var(--white);
}

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

.doc-card {
    background: var(--white);
    border: 1px solid var(--medium-gray);
    border-radius: 12px;
    padding: 20px;
    transition: var(--transition);
    cursor: pointer;
}

.doc-card:hover {
    border-color: var(--primary-dark-teal);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.doc-icon {
    width: 48px;
    height: 48px;
    background: var(--pale-mint);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.doc-icon.pdf { background: #FFEBEE; }
.doc-icon.xlsx { background: #E8F5E9; }
.doc-icon.link { background: #E3F2FD; }

.doc-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.doc-category {
    font-size: 12px;
    color: var(--medium-green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.doc-description {
    font-size: 13px;
    color: var(--dark-gray);
    margin-bottom: 16px;
}

.doc-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--dark-gray);
}

.doc-badge {
    padding: 4px 8px;
    background: var(--light-sage);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary-dark-teal);
}

/* =============================================
   FINANCIAL MODEL SECTION
   ============================================= */

.model-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.model-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.model-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

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

.model-btn.primary:hover {
    background: #e55a2f;
    transform: translateY(-2px);
}

.model-btn.secondary {
    background: var(--white);
    color: var(--primary-dark-teal);
    border: 1px solid var(--medium-gray);
}

.model-btn.secondary:hover {
    border-color: var(--primary-dark-teal);
    background: var(--pale-mint);
}

/* Embedded iframe container */
.model-embed-container {
    position: relative;
    width: 100%;
    height: 700px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--medium-gray);
    background: var(--white);
    margin-bottom: 24px;
}

.model-embed-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.iframe-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--off-white);
    z-index: 10;
    transition: opacity 0.3s ease;
}

.iframe-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--medium-gray);
    border-top-color: var(--primary-dark-teal);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

/* =============================================
   FAQ SECTION
   ============================================= */

.faq-header {
    text-align: center;
    margin-bottom: 40px;
}

.faq-header h2 {
    font-size: 28px;
    color: var(--primary-dark-teal);
    margin-bottom: 8px;
}

.faq-header p {
    color: var(--dark-gray);
}

.faq-categories {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.faq-category-btn {
    padding: 10px 20px;
    background: var(--white);
    border: 1px solid var(--medium-gray);
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.faq-category-btn:hover,
.faq-category-btn.active {
    background: var(--primary-dark-teal);
    color: var(--white);
    border-color: var(--primary-dark-teal);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border: 1px solid var(--medium-gray);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-question {
    padding: 20px 24px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--pale-mint);
}

.faq-toggle {
    font-size: 20px;
    color: var(--medium-green);
    transition: var(--transition);
}

.faq-item.open .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.open .faq-answer {
    padding: 0 24px 20px;
    max-height: 500px;
}

.faq-answer p {
    color: var(--dark-gray);
    font-size: 14px;
    line-height: 1.7;
}

/* =============================================
   CONTACT SECTION
   ============================================= */

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.contact-card {
    background: var(--white);
    border: 1px solid var(--medium-gray);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
}

.contact-avatar {
    width: 80px;
    height: 80px;
    background: var(--pale-mint);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 16px;
}

.contact-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.contact-role {
    font-size: 14px;
    color: var(--medium-green);
    margin-bottom: 16px;
}

.contact-info {
    font-size: 14px;
    color: var(--dark-gray);
    margin-bottom: 20px;
}

.contact-info a {
    color: var(--primary-dark-teal);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.contact-btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-dark-teal);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.contact-btn:hover {
    background: #0a3d40;
}

.contact-btn.whatsapp {
    background: #25D366;
}

.contact-btn.whatsapp:hover {
    background: #1da851;
}

/* Quick Contact Banner */
.quick-contact {
    background: linear-gradient(135deg, var(--primary-dark-teal) 0%, #0a3d40 100%);
    color: var(--white);
    padding: 32px;
    border-radius: 12px;
    text-align: center;
    margin-top: 32px;
}

.quick-contact h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.quick-contact p {
    opacity: 0.9;
    margin-bottom: 20px;
}

.quick-contact-btns {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.quick-contact-btns a {
    padding: 12px 24px;
    background: var(--white);
    color: var(--primary-dark-teal);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.quick-contact-btns a:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* =============================================
   FOOTER
   ============================================= */

.footer {
    background: var(--primary-dark-teal);
    color: var(--white);
    padding: 32px 24px;
    text-align: center;
    margin-top: 48px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-logo {
    height: 32px;
    margin-bottom: 16px;
    filter: brightness(0) invert(1);
}

.footer-text {
    font-size: 13px;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
}

.footer-disclaimer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 11px;
    opacity: 0.6;
}

/* =============================================
   NDA PENDING PAGE
   ============================================= */

.nda-pending-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark-teal) 0%, #0a3d40 100%);
}

.nda-pending-box {
    background: var(--white);
    padding: 48px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    max-width: 480px;
    width: 90%;
}

.nda-pending-box h1 {
    font-size: 24px;
    color: var(--primary-dark-teal);
    margin-bottom: 16px;
}

.nda-pending-box p {
    font-size: 14px;
    color: var(--dark-gray);
    margin-bottom: 12px;
    line-height: 1.7;
}

.nda-pending-box .icon-lock {
    font-size: 48px;
    margin-bottom: 16px;
}

.nda-pending-box .contact-link {
    color: var(--primary-dark-teal);
    font-weight: 600;
    text-decoration: none;
}

.nda-pending-box .contact-link:hover {
    text-decoration: underline;
}

/* =============================================
   DECK PAGE - PRINT WATERMARK
   ============================================= */

.deck-iframe-container {
    width: 100%;
    height: calc(100vh - 120px);
    border: none;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--medium-gray);
}

.deck-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Print watermark - hidden on screen, visible on print */
.print-watermark {
    display: none;
}

@media print {
    .print-watermark {
        display: block;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(-45deg);
        font-size: 60px;
        color: rgba(0, 0, 0, 0.08);
        white-space: nowrap;
        z-index: 99999;
        pointer-events: none;
        font-weight: 700;
        letter-spacing: 4px;
    }

    .header, .footer, .dr-sidebar, .dr-topbar, .dr-overlay {
        display: none !important;
    }

    .dr-main {
        margin-left: 0 !important;
    }
}

@media screen {
    .print-watermark {
        display: none !important;
    }
}

/* =============================================
   SIDEBAR + TOPBAR LAYOUT (v2 Redesign)
   ============================================= */

.dr-layout {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
.dr-sidebar {
    width: 260px;
    background: var(--primary-dark-teal);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.dr-sidebar-logo {
    padding: 24px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.dr-sidebar-logo img {
    height: 36px;
    filter: brightness(0) invert(1);
}

.dr-sidebar-nav {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.dr-nav-group {
    margin-bottom: 8px;
}

.dr-nav-group-label {
    padding: 8px 20px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.45);
}

.dr-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.dr-nav-item:hover {
    background: rgba(255,255,255,0.08);
    color: var(--white);
}

.dr-nav-item.active {
    background: rgba(255,255,255,0.12);
    color: var(--white);
    border-left-color: var(--light-sage);
    font-weight: 600;
}

.dr-nav-item .nav-icon {
    width: 20px;
    text-align: center;
    font-size: 16px;
    flex-shrink: 0;
}

.dr-sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
}

.dr-sidebar-email {
    color: rgba(255,255,255,0.6);
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dr-sidebar-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    color: rgba(255,255,255,0.8);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dr-sidebar-logout:hover {
    background: rgba(255,255,255,0.2);
    color: var(--white);
}

/* --- Main content area --- */
.dr-main {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Topbar --- */
.dr-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    background: var(--white);
    border-bottom: 1px solid var(--medium-gray);
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 56px;
}

.dr-hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 4px;
    color: var(--text-dark);
}

.dr-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--dark-gray);
    flex: 1;
}

.dr-breadcrumb a {
    color: var(--dark-gray);
    text-decoration: none;
}

.dr-breadcrumb a:hover {
    color: var(--primary-dark-teal);
}

.dr-breadcrumb .sep {
    color: var(--medium-gray);
    font-size: 12px;
}

.dr-breadcrumb .current {
    color: var(--text-dark);
    font-weight: 600;
}

/* --- Global search --- */
.dr-search-wrapper {
    position: relative;
    width: 260px;
}

.dr-search-input {
    width: 100%;
    padding: 8px 14px 8px 34px;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    font-size: 13px;
    background: var(--off-white);
    transition: all 0.2s ease;
}

.dr-search-input:focus {
    outline: none;
    border-color: var(--primary-dark-teal);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(13,82,87,0.08);
}

.dr-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dark-gray);
    font-size: 14px;
    pointer-events: none;
}

.dr-search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    max-height: 320px;
    overflow-y: auto;
    display: none;
    z-index: 300;
}

.dr-search-results.open {
    display: block;
}

.dr-search-result {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-dark);
    text-decoration: none;
    transition: background 0.15s;
    cursor: pointer;
}

.dr-search-result:hover {
    background: var(--pale-mint);
}

.dr-search-result .result-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.dr-search-result .result-text {
    flex: 1;
    min-width: 0;
}

.dr-search-result .result-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dr-search-result .result-cat {
    font-size: 11px;
    color: var(--dark-gray);
}

.dr-search-empty {
    padding: 16px;
    text-align: center;
    color: var(--dark-gray);
    font-size: 13px;
}

/* --- Page content --- */
.dr-page-content {
    flex: 1;
    padding: 32px 24px;
    max-width: 1200px;
    width: 100%;
}

/* --- Mobile overlay --- */
.dr-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 150;
}

.dr-overlay.open {
    display: block;
}

/* =============================================
   OVERVIEW LANDING PAGE (v2)
   ============================================= */

.ov-hero {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 32px;
    min-height: 340px;
    display: flex;
    align-items: flex-end;
}

.ov-hero-bg {
    position: absolute;
    inset: -20px;
    background-size: cover;
    background-position: center 40%;
}

.ov-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(10, 42, 46, 0.92) 0%,
        rgba(10, 42, 46, 0.60) 45%,
        rgba(10, 42, 46, 0.18) 100%
    );
}

.ov-hero-content {
    position: relative;
    width: 100%;
    padding: 48px 44px 36px;
    color: var(--white);
    z-index: 1;
}

.ov-hero-logo {
    position: absolute;
    top: 20px;
    right: 24px;
    height: 36px;
    z-index: 2;
    filter: brightness(0) invert(1);
    opacity: 0.85;
}

.ov-hero h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.ov-hero p {
    font-size: 17px;
    opacity: 0.8;
    font-weight: 400;
}

/* Key metrics bar */
.ov-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.ov-metric {
    background: var(--white);
    border: 1px solid var(--medium-gray);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.ov-metric-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-dark-teal);
    line-height: 1.2;
}

.ov-metric-label {
    font-size: 12px;
    color: var(--dark-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Category cards */
.ov-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.ov-cat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--white);
    border: 1px solid var(--medium-gray);
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    cursor: pointer;
}

.ov-cat-card:hover {
    border-color: var(--primary-dark-teal);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.ov-cat-icon {
    width: 48px;
    height: 48px;
    background: var(--pale-mint);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.ov-cat-text h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.ov-cat-text p {
    font-size: 13px;
    color: var(--dark-gray);
}

/* =============================================
   DOCUMENT TABLE VIEW (v2)
   ============================================= */

.doc-section {
    margin-bottom: 16px;
    border: 1px solid var(--medium-gray);
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
}

.doc-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--off-white);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.doc-section-header:hover {
    background: var(--pale-mint);
}

.doc-section-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.doc-section-icon {
    font-size: 18px;
}

.doc-section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
}

.doc-section-count {
    font-size: 12px;
    color: var(--dark-gray);
    background: var(--light-gray);
    padding: 2px 8px;
    border-radius: 10px;
}

.doc-section-chevron {
    font-size: 12px;
    color: var(--dark-gray);
    transition: transform 0.2s;
}

.doc-section.open .doc-section-chevron {
    transform: rotate(180deg);
}

.doc-section-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.doc-section.open .doc-section-body {
    max-height: 2000px;
}

/* Document table */
.doc-table {
    width: 100%;
    border-collapse: collapse;
}

.doc-table thead th {
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--dark-gray);
    text-align: left;
    border-bottom: 1px solid var(--medium-gray);
    background: var(--off-white);
}

.doc-table tbody tr {
    transition: background 0.15s;
    cursor: pointer;
}

.doc-table tbody tr:hover {
    background: rgba(13,82,87,0.03);
}

.doc-table td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--light-gray);
    vertical-align: middle;
}

.doc-table .doc-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.doc-table .doc-file-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.doc-type-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.doc-type-badge.pdf {
    background: #FFEBEE;
    color: #C62828;
}

.doc-type-badge.xlsx {
    background: #E8F5E9;
    color: #2E7D32;
}

.doc-type-badge.link {
    background: #E3F2FD;
    color: #1565C0;
}

.doc-table .doc-actions-cell {
    text-align: right;
}

.doc-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--pale-mint);
    color: var(--primary-dark-teal);
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.doc-action-btn:hover {
    background: var(--light-sage);
}

/* =============================================
   PDF VIEWER MODAL (v2)
   ============================================= */

.pdf-viewer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 500;
    align-items: center;
    justify-content: center;
}

.pdf-viewer-overlay.open {
    display: flex;
}

.pdf-viewer {
    width: 90vw;
    max-width: 1000px;
    height: 85vh;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.pdf-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--primary-dark-teal);
    color: var(--white);
}

.pdf-viewer-title {
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.pdf-viewer-actions {
    display: flex;
    gap: 8px;
}

.pdf-viewer-btn {
    padding: 6px 14px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    color: var(--white);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.pdf-viewer-btn:hover {
    background: rgba(255,255,255,0.25);
}

.pdf-viewer-body {
    flex: 1;
    position: relative;
}

.pdf-viewer-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* =============================================
   MOBILE RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
    /* --- Sidebar → drawer --- */
    .dr-sidebar {
        transform: translateX(-100%);
    }

    .dr-sidebar.open {
        transform: translateX(0);
    }

    .dr-main {
        margin-left: 0;
    }

    .dr-hamburger {
        display: block;
    }

    .dr-search-wrapper {
        width: 100%;
        max-width: 200px;
    }

    .dr-page-content {
        padding: 20px 16px;
    }

    /* --- Overview v2 --- */
    .ov-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .ov-metric-value {
        font-size: 22px;
    }

    .ov-categories {
        grid-template-columns: 1fr;
    }

    .ov-hero {
        min-height: 240px;
    }

    .ov-hero-content {
        padding: 24px;
    }

    .ov-hero-logo {
        height: 26px;
        top: 14px;
        right: 16px;
    }

    .ov-hero h1 {
        font-size: 24px;
    }

    /* --- Document table → card stacking --- */
    .doc-table thead {
        display: none;
    }

    .doc-table tbody tr {
        display: flex;
        flex-wrap: wrap;
        padding: 12px 16px;
        gap: 8px;
        border-bottom: 1px solid var(--light-gray);
    }

    .doc-table td {
        border-bottom: none;
        padding: 0;
    }

    .doc-table td:nth-child(1) {
        width: 100%;
    }

    .doc-table td:nth-child(2),
    .doc-table td:nth-child(3),
    .doc-table td:nth-child(4) {
        font-size: 12px;
        color: var(--dark-gray);
    }

    .doc-table .doc-actions-cell {
        width: 100%;
        text-align: left;
        margin-top: 4px;
    }

    /* --- PDF viewer mobile --- */
    .pdf-viewer {
        width: 100vw;
        height: 100vh;
        max-width: none;
        border-radius: 0;
    }

    /* --- Legacy layout compat --- */
    .header-content {
        flex-direction: column;
        gap: 16px;
    }

    .header-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .nav-link {
        white-space: nowrap;
    }

    .overview-hero {
        padding: 24px;
    }

    .overview-hero h1 {
        font-size: 24px;
    }

    .overview-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .stat-value {
        font-size: 28px;
    }

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

    .documents-header {
        flex-direction: column;
        gap: 16px;
    }

    .documents-search {
        width: 100%;
        flex-direction: column;
    }

    .search-input {
        width: 100%;
    }

    .model-header {
        flex-direction: column;
        align-items: stretch;
    }

    .model-actions {
        flex-direction: column;
    }

    .model-embed-container {
        height: 400px;
    }

    .login-box {
        padding: 32px 24px;
    }

    .faq-question {
        padding: 16px;
        font-size: 14px;
    }

    .deck-iframe-container {
        height: calc(100vh - 100px);
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 16px;
    }

    .overview-stats {
        grid-template-columns: 1fr 1fr;
    }

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

    .ov-metrics {
        grid-template-columns: 1fr 1fr;
    }

    .dr-search-wrapper {
        display: none;
    }
}
