:root {
    --primary-color: #0284c7; /* Oceanic Tech Blue */
    /* Sky/Logo Blue */
    --primary-dark: #0369a1;
    --secondary-color: var(--text-muted);
    --background-bg: #f0f7ff;
    --sidebar-bg: #0b192c; /* Midnight Deep Blue */
    /* Dark Navy */
    /* Slate 900 */
    --text-main: #0f172a;
    --border-color: #dbeafe;
    --table-header-bg: #e0f2fe;
    --text-light: #94a3b8;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: 1px solid rgba(255, 255, 255, 0.2);
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;

    /* Status Colors */
    --status-pending: #f59e0b;
    /* Amber */
    --status-progress: #3b82f6;
    /* Blue */
    --status-rep-pend: #8b5cf6;
    /* Violet */
    --status-qc: #ec4899;
    /* Pink */
    --status-sub: #10b981;
    /* Emerald */
    --status-closed: #64748b;
    /* Slate */
    --status-withdrawn: #ef4444;
    /* Red */

    --font-family: 'Outfit', sans-serif;
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --radius: 8px;

    /* Report Specific */
    --report-border: #000;
    --report-bg: #fff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overscroll-behavior-y: none;
}

html,
body {
    overflow-x: hidden;
    overscroll-behavior-y: none;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-bg);
    color: var(--text-main);
    height: 100vh;
}

/* ================= UTILITIES ================= */
.hidden {
    display: none !important;
}

.full-width {
    width: 100%;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

/* ================= AUTH / SPLIT LANDING PAGE ================= */
.auth-container {
    height: 100vh;
    width: 100vw;
    display: flex;
    overflow: hidden;
    background: #f8fafc;
}

/* Scrollable left profile section (3 portions / ~75%) */
.company-profile-wrapper {
    flex: 3;
    height: 100vh;
    overflow-y: auto;
    scroll-behavior: smooth;
    position: relative;
    background: var(--white);
}

/* Fixed right login section (1 portion / ~25%) */
.login-wrapper {
    flex: 1;
    min-width: 350px;
    max-width: 450px;
    height: 100vh;
    background: linear-gradient(135deg, #0b192c 0%, #0284c7 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    box-shadow: -10px 0 25px rgba(0,0,0,0.15);
    z-index: 100;
}

.login-box {
    background: var(--glass-bg);
    padding: 2.5rem;
    border-radius: 16px;
    width: 100%;
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.logo-area h1 {
    font-weight: 700;
    color: var(--sidebar-bg);
    margin-bottom: 0.2rem;
}

.logo-area p {
    color: var(--secondary-color);
    margin-bottom: 2rem;
    font-weight: 300;
}

.input-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.input-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
}

.input-group input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.8rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    outline: none;
    transition: all 0.3s;
    font-family: inherit;
}

.input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    width: 100%;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
    border: none;
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-danger:hover {
    background-color: #991b1b;
}

.error-msg {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 1rem;
    min-height: 1.25rem;
}

/* ================= APP LAYOUT ================= */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* TOP HEADER */
.top-header {
    background: var(--white);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    min-height: 70px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    flex-shrink: 0;
}

.top-header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-header {
    width: 25px;
    height: auto;
}

.top-header-brand h2 {
    font-size: 1.25rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-main);
}

.badg-role {
    font-size: 0.75rem;
    background: #e2e8f0;
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.mobile-menu-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
}

.top-header-nav { flex: 1; display: flex; justify-content: flex-start; margin-left: 2rem; }

.top-header-nav ul { list-style: none; display: flex; align-items: center; justify-content: flex-start;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    gap: 0.2rem;
}

.small-form {
    padding: 2.5rem !important;
    margin: 2rem auto;
    max-width: 600px;
}

#case-fio {
    background-color: transparent;
    color: var(--text-main);
}

#case-fio option[value=""] {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem;
}

.nav-item {
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 3px solid transparent;
    font-weight: 500;
}

.nav-item:hover {
    color: var(--primary-color);
}

.nav-item.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    font-weight: 600;
}

.top-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.user-info {
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

#logout-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

#logout-btn:hover {
    background-color: #fee2e2;
    color: var(--danger);
}

/* FOOTER */
.app-footer {
    background: var(--white);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 1rem 2rem;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 1.5rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 3.5rem;
    background: var(--background-bg);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #0f172a;
}


/* VIEW SWITCHING LOGIC */
.view-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.view-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* DASHBOARD CARDS */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.status-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03), 0 0 0 1px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #ccc;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.status-card h3 {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.status-card .count {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
}

/* Card Accent Colors */
.c-pending {
    border-left-color: var(--status-pending);
}

.c-progress {
    border-left-color: var(--status-progress);
}

.c-rep-pending {
    border-left-color: var(--status-rep-pend);
}

.c-qc {
    border-left-color: var(--status-qc);
}

.c-submitted {
    border-left-color: var(--status-sub);
}

.c-closed {
    border-left-color: var(--status-closed);
}

.c-withdrawn {
    border-left-color: var(--status-withdrawn);
}

/* TABLES & PANELS */
.glass-panel {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03), 0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.table-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    outline: none;
}

select {
    padding: 0.6rem 2rem 0.6rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    outline: none;
    background-color: var(--white);
    cursor: pointer;
}

.btn-icon {
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

th {
    background-color: #f8fafc;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
}

/* Table Condensed View */
.table-condensed th,
.table-condensed td {
    padding: 0.4rem 0.6rem !important;
    font-size: 0.85rem !important;
}

.table-condensed tr:hover {
    background-color: #f8fafc;
}

/* FORMS */
.form-wrapper {
    max-width: 800px;
}

.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-group label,
.col label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

.form-group input,
.form-group select,
.col input,
.col select,
.col textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    outline: none;
    transition: 0.2s;
    width: 100%;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-color);
}

.ref-preview {
    background: #f1f5f9;
    padding: 0.75rem;
    border-radius: 6px;
    font-family: monospace;
    font-weight: 600;
    color: var(--primary-dark);
    letter-spacing: 1px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-muted);
}

/* MODALS */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.col {
    flex: 1;
}

/* RESPONSIVE */
@media (max-width: 768px) {

    .app-container {
        width: 100%;
        overflow-x: hidden;
    }

    .main-content {
        padding: 1rem;
    }

    .glass-panel {
        padding: 1rem;
    }

    .top-header {
        flex-direction: column;
        height: auto;
        padding: 1rem;
        align-items: stretch;
    }

    .top-header-brand {
        justify-content: space-between;
    }

    /* Show Toggle Button */
    #mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

    .top-header-nav {
        display: none;
        margin-top: 1rem;
        animation: fadeIn 0.3s ease;
    }

    .top-header-nav ul {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .top-header-nav.open {
        display: block;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 1rem;
        max-height: 55vh;
        overflow-y: auto;
    }

    .top-header-actions {
        display: flex;
        justify-content: space-between;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Mobile Menu interaction */
    .form-row,
    .row {
        flex-direction: column;
        gap: 1rem;
    }

    /* Stack Details */
    .detail-grid {
        grid-template-columns: 1fr !important;
    }

    /* Adjust 3-col grid */
    .case-detail-grid-3 {
        grid-template-columns: 1fr !important;
    }
}


/* Reduced Font Size for Cases Table */
#cases-table th,
#cases-table td,
#tat-cases-table th,
#tat-cases-table td {
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
    white-space: nowrap;
}

#cases-table .btn-icon {
    padding: 0.4rem;
    font-size: 0.8rem;
}

/* Detail View Grids */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.detail-grid p {
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.detail-grid strong {
    color: var(--text-muted);
    font-weight: 500;
}

.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    outline: none;
    transition: 0.2s;
    width: 100%;
}

.form-group textarea:focus {
    border-color: var(--primary-color);
}

.btn-sm {
    padding: 0.5rem 1rem !important;
    font-size: 0.85rem !important;
    width: auto !important;
}

.logo-login {
    width: 100px;
    margin-bottom: 1rem;
}

.logo-sidebar {
    width: 32px;
    height: auto;
}

.mt-large {
    margin-top: 2rem;
}

#refresh-dashboard:hover i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.small-form h3 {
    margin-bottom: 2.5rem;
}

.form-group {
    margin-bottom: 2rem !important;
}

tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.1) !important;
}

::selection {
    background-color: rgba(59, 130, 246, 0.2);
    color: inherit;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
}

.status-badge.active {
    background-color: #dcfce7;
    color: #166534;
    /* Green */
}

.status-badge.resigned {
    background-color: #fee2e2;
    color: #991b1b;
    /* Red */
}

.status-badge.notice-period {
    background-color: #ffedd5;
    color: #9a3412;
    /* Orange for Notice Period */
}

.status-badge.temporary {
    background-color: #e0f2fe;
    color: #075985;
    /* Blue for Temporary */
}

/* CASE DETAILS 3-COLUMN GRID */
.case-detail-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 1rem;
}

@media (max-width: 1024px) {
    .case-detail-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ================= NEW FEATURES (DEMO) ================= */

/* WhatsApp Button */
.btn-whatsapp {
    background-color: #25D366;
    color: white;
    border: none;
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
}

/* Timeline */
/* Timeline (Horizontal) */
.timeline-box {
    position: relative;
    display: flex;
    justify-content: space-between;
    padding-top: 20px;
    margin-top: 1rem;
    border-left: none;
    padding-left: 0;
    margin-left: 0;
}

.timeline-item {
    position: relative;
    flex: 1;
    text-align: center;
    margin-bottom: 0;
}

/* Connecting Line */
.timeline-item:not(:first-child)::before {
    content: '';
    position: absolute;
    top: 6px;
    /* Center of dot */
    right: 50%;
    width: 100%;
    height: 2px;
    background-color: #e2e8f0;
    z-index: 0;
}

.timeline-dot {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--primary-color);
    z-index: 1;
}

.timeline-dot.completed {
    background: var(--primary-color);
}

.timeline-content {
    margin-top: 20px;
}

/* REPORT FORM PAPER LAYOUT */
.report-paper {
    background: var(--white);
    width: 210mm;
    min-height: 297mm;
    margin: 20px auto;
    padding: 20mm;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    color: black;
    font-family: 'Times New Roman', Times, serif;
    /* Classic Report Font */
}

.report-paper h2,
.report-paper h3,
.report-paper h4 {
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 15px;
    color: black;
}

.report-paper table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    font-size: 14px;
}

.report-paper th,
.report-paper td {
    border: 1px solid black;
    padding: 6px;
    vertical-align: top;
}

.report-paper th {
    background-color: #f0f0f0;
    font-weight: bold;
    text-align: left;
}

.report-paper input,
.report-paper textarea,
.report-paper select {
    width: 100%;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    outline: none;
    padding: 2px 5px;
}

.report-paper input:focus,
.report-paper textarea:focus {
    background: #eefbff;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.report-paper td {
    vertical-align: middle;
}

.report-paper textarea {
    min-height: 24px;
    line-height: 1.5;
}

/* Specific alignments for labels */
.report-paper td:first-child {
    vertical-align: top;
    padding-top: 8px;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Compact Table for DL Details */
.compact-table td {
    padding: 3px !important;
    font-size: 13px;
}

.compact-table input {
    font-size: 13px;
}

.compact-table td:nth-child(odd) {
    /* Labels */
    background: #f9f9f9;
    font-weight: 500;
    white-space: nowrap;
    width: 1%;
    /* Shrink to fit text */
}

.compact-table td:nth-child(even) {
    /* Inputs */
    width: auto;
    /* Take remaining space */
}

.report-paper input:focus,
.report-paper textarea:focus {
    background: #eef;
}

.report-section-title {
    background: #ddd;
    font-weight: bold;
    padding: 5px;
    border: 1px solid black;
    margin-top: 20px;
    margin-bottom: 5px;
}

@media print {
    body * {
        visibility: hidden;
    }

    #report-form-view,
    #report-form-view * {
        visibility: visible;
    }

    #report-form-view {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .no-print {
        display: none !important;
    }
}

.timeline-content h4 {
    font-size: 0.8rem;
    color: var(--text-main);
    margin-bottom: 0.1rem;
    font-weight: 600;
}

.timeline-content span {
    font-size: 0.75rem;
    color: var(--text-light);
    display: block;
}

/* ================= COMPANY PROFILE (COE) STYLES ================= */
.company-profile-wrapper header {
    background: var(--primary-color);
    color: white;
    padding: 60px 20px;
    text-align: center;
}

.company-profile-wrapper header h1 {
    font-size: 48px;
    letter-spacing: 2px;
}

.company-profile-wrapper header p {
    margin-top: 10px;
    font-size: 20px;
}

.company-profile-wrapper nav {
    background: var(--background-bg);
    padding: 15px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 50;
}

.company-profile-wrapper nav a {
    color: var(--primary-color);
    margin: 0 15px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
}

.company-profile-wrapper nav a:hover {
    color: var(--primary-dark);
}

.company-profile-wrapper section {
    padding: 60px 10%;
    text-align: left;
}

.company-profile-wrapper h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 36px;
}

.company-profile-wrapper .about {
    line-height: 1.8;
    font-size: 18px;
}

.company-profile-wrapper .services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.company-profile-wrapper .service-box {
    background: var(--white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
}

.company-profile-wrapper .service-box h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.company-profile-wrapper .why {
    background: var(--primary-color);
    color: white;
}

.company-profile-wrapper .why h2 {
    color: white;
}

.company-profile-wrapper .why ul {
    margin-top: 20px;
    line-height: 2;
    font-size: 18px;
    list-style-position: inside;
}

.company-profile-wrapper .clients {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    text-align: center;
}

.company-profile-wrapper .client {
    background: var(--white);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f1f5f9;
}

.company-profile-wrapper .client:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.company-profile-wrapper .client img {
    max-width: 100%;
    max-height: 70px;
    object-fit: contain;
    filter: grayscale(10%) contrast(1.1);
    transition: filter 0.3s ease;
}

.company-profile-wrapper .client:hover img {
    filter: grayscale(0%) contrast(1);
}

.company-profile-wrapper .contact {
    background: var(--background-bg);
    color: var(--primary-color);
}

.company-profile-wrapper .contact h2 {
    color: var(--primary-color);
}

.company-profile-wrapper .contact p {
    margin: 10px 0;
    font-size: 18px;
}

.company-profile-wrapper footer {
    background: #0e3d63;
    color: white;
    text-align: center;
    padding: 20px;
}

/* ================= REPORT DATA ENTRY & PREVIEW ================= */
.report-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.report-tab-btn {
    padding: 0.75rem 1.25rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-weight: 500;
    color: var(--secondary-color);
    white-space: nowrap;
    transition: all 0.2s;
}

.report-tab-btn:hover {
    background: #eff6ff;
    color: var(--primary-color);
}

.report-tab-btn.active {
    background: var(--white);
    color: var(--primary-color);
    border-top: 3px solid var(--primary-color);
    margin-top: -3px;
    height: calc(100% + 4px);
}

.report-tab-content {
    display: none;
    animation: fadeIn 0.2s ease;
}

.report-tab-content.active {
    display: block;
}

.report-table-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

.report-paper {
    width: 210mm;
    min-height: 297mm;
    padding: 15mm;
    margin: 20px auto;
    background: var(--white);
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    color: #000;
    font-family: 'Times New Roman', Times, serif;
}

.report-paper h3 {
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-weight: bold;
}

.report-paper table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    table-layout: fixed;
}

.report-paper th, .report-paper td {
    border: 1px solid #000;
    padding: 8px;
    font-size: 11pt;
    white-space: normal;
    word-wrap: break-word;
    vertical-align: top;
}

.report-paper td.no-border {
    border: none;
}

.report-paper input, .report-paper textarea {
    width: 100%;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: inherit;
    padding: 0;
    margin: 0;
    resize: none;
    color: #000;
}

.report-section-title {
    font-weight: bold;
    text-decoration: underline;
    margin: 15px 0 10px 0;
    font-size: 12pt;
}

@media print {
    body * { visibility: hidden; }
    .report-paper, .report-paper * { visibility: visible; }
    .report-paper {
        position: absolute;
        left: 0;
        top: 0;
        margin: 0;
        padding: 5mm;
        box-shadow: none;
        width: 100%;
    }
    .no-print { display: none !important; }
}

/* Page Breaks for PDF */
.report-page {
    page-break-after: always;
    min-height: 280mm;
}
/* HOME PAGE STYLES */
.home-summary-container { display: flex; flex-direction: column; gap: 2rem; padding: 1rem; }


/* MONTHLY METRICS REDESIGN */
.month-summary-block { background: var(--white); border-radius: 8px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); border: 1px solid var(--border-color); margin-bottom: 2rem; overflow: hidden; }
.month-summary-title { background: var(--white); padding: 1rem 1.5rem; font-size: 1.1rem; font-weight: 700; color: var(--text-main); border-bottom: 1px solid var(--border-color); }
.month-metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; padding: 1.5rem; }
.metric-column { background: #f0f4f8; border-radius: 6px; overflow: hidden; }
.metric-header { display: flex; justify-content: space-between; align-items: baseline; padding: 1rem; border-bottom: 1px solid var(--border-color); background: #e0e8f1; }
.metric-header .title { font-weight: 600; color: var(--text-main); font-size: 0.95rem; }
.metric-header .value { font-weight: 700; font-size: 1.2rem; color: #0284c7; }
.metric-header .value.green { color: #16a34a; }
.metric-header .value.teal { color: #0d9488; }
.metric-header .sub-value { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; text-align: right; }
.metric-body { padding: 0.5rem; }
.metric-row { display: flex; justify-content: space-between; padding: 0.5rem; border-bottom: 1px solid var(--border-color); font-size: 0.85rem; color: var(--text-muted); }
.metric-row:last-child { border-bottom: none; }
.metric-row .client-name { font-weight: 500; }
.metric-row .client-val { font-weight: 600; display: flex; gap: 4px; align-items: center; }
.metric-row .client-count { font-size: 0.75rem; color: var(--text-muted); font-weight: 400; }


/* ACCORDION STYLES */
.accordion-header { display: flex; justify-content: space-between; align-items: center; cursor: pointer; padding: 0.5rem; border-radius: 4px; transition: background 0.2s; }
.accordion-header:hover { background: rgba(0,0,0,0.05); }
.accordion-header h3 { margin: 0; }
.accordion-icon { transition: transform 0.3s; }
.accordion-header.active .accordion-icon { transform: rotate(180deg); }
.accordion-body { margin-top: 1rem; }


/* NAVIGATION DROPDOWNS */
.nav-dropdown { position: relative; padding: 0.5rem 0.25rem; }
.dropdown-toggle {
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 3px solid transparent;
    font-weight: 500;
}
.dropdown-toggle:hover {
    color: var(--primary-color);
}
.dropdown-toggle i { margin-right: 8px; }
.dropdown-toggle .ml-1 { margin-left: 6px; margin-right: 0; }
.dropdown-menu { position: absolute; top: 100%; left: 0; background: var(--white); min-width: 220px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); border-radius: 8px; padding: 0.5rem 0; list-style: none; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); z-index: 1000; display: flex; flex-direction: column; gap: 0; margin-top: 5px; }
.nav-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu .nav-item { padding: 0.8rem 1.2rem; color: var(--text-main); margin: 0; border-radius: 0; display: flex; align-items: center; justify-content: flex-start; text-align: left; transition: background 0.2s; border-bottom: none !important; }
.dropdown-menu .nav-item i { margin-right: 10px; width: 16px; text-align: center; color: var(--primary-color); }
.dropdown-menu .nav-item:hover { background: var(--background-bg); color: var(--primary-dark); }
.dropdown-menu .nav-item.active { background: rgba(48, 131, 220, 0.1); color: var(--primary-color); font-weight: 600; }


/* Theme Toggle Button (kept for compatibility, now used inside dropdown) */
.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    font-family: 'Outfit', sans-serif;
}
.theme-toggle:hover {
    background: var(--background-bg);
    color: var(--primary-color);
}

/* =============================================
   SETTINGS DROPDOWN
   ============================================= */
.settings-dropdown-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.settings-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: 'Outfit', sans-serif;
}
.settings-btn:hover,
.settings-btn.open {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: rotate(30deg);
}
.settings-btn.open {
    transform: rotate(60deg);
}

.settings-dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    z-index: 1200;
    overflow: hidden;
    animation: dropdownFadeIn 0.18s ease;
}
.settings-dropdown-content.open {
    display: block;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.settings-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1.1rem;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
    font-family: 'Outfit', sans-serif;
}
.settings-dropdown-item i {
    width: 18px;
    text-align: center;
    color: var(--primary-color);
    flex-shrink: 0;
}
.settings-dropdown-item:hover {
    background: var(--background-bg);
}

.settings-dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

.settings-logout-item {
    color: var(--danger, #dc2626);
}
.settings-logout-item i {
    color: var(--danger, #dc2626);
}
.settings-logout-item:hover {
    background: #fef2f2;
    color: var(--danger, #dc2626);
}

/* Dark mode overrides for settings dropdown */
body.dark-mode .settings-dropdown-content {
    background: #022a30;
    border-color: #0d424b;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
body.dark-mode .settings-dropdown-item:hover {
    background: #001f24;
}
body.dark-mode .settings-logout-item:hover {
    background: rgba(220, 38, 38, 0.1);
}

/* Dark Mode Variables */
body.dark-mode {
    --background-bg: #001f24;
    --white: #022a30;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #0d424b;
    --table-header-bg: #043138;
    --table-border: #0d424b;
    --glass-bg: rgba(2, 42, 48, 0.95);
    --sidebar-bg: #001f24;
}

/* =============================================
   CASE STATUS NOTES CARD
   ============================================= */
.case-notes-card {
    border-left: 4px solid var(--primary-color);
    transition: box-shadow 0.2s;
}
.case-notes-card:focus-within {
    box-shadow: 0 4px 24px rgba(37, 99, 235, 0.12);
}

.case-notes-header {
    margin-bottom: 1rem;
}
.case-notes-title-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.case-notes-icon {
    color: var(--primary-color);
    font-size: 1.1rem;
}
.case-notes-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
}
.case-notes-saved-badge {
    color: #22c55e;
    font-size: 1rem;
    margin-left: auto;
    animation: notesBadgePop 0.3s ease;
}
@keyframes notesBadgePop {
    from { transform: scale(0.6); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

/* Saved note display panel */
.case-note-display {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
    animation: noteFadeIn 0.25s ease;
}
@keyframes noteFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.case-note-display-inner {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.case-note-display-text {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--text-main);
    margin: 0;
    max-height: 220px;
    overflow-y: auto;
}
.case-note-display-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.case-note-display-time {
    font-size: 0.75rem;
    color: #64748b;
    font-style: italic;
}
.case-note-edit-btn {
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.15s;
}
.case-note-edit-btn:hover {
    background: var(--primary-dark, #1d4ed8);
}

/* Note editor */
.case-note-editor {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.case-note-textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    resize: vertical;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--text-main);
    background: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 110px;
    box-sizing: border-box;
}
.case-note-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.case-note-textarea::placeholder {
    color: #94a3b8;
}

.case-note-editor-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.case-note-char-count {
    font-size: 0.75rem;
    color: #94a3b8;
    font-style: italic;
}
.case-note-editor-actions {
    display: flex;
    gap: 0.5rem;
}
.case-note-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
}

/* Inline save status message */
.case-note-save-status {
    font-size: 0.82rem;
    font-weight: 600;
    min-height: 1.1rem;
    padding: 0;
    transition: opacity 0.3s;
}
.case-note-save-status.success { color: #16a34a; }
.case-note-save-status.error   { color: #dc2626; }

/* Dark mode overrides */
body.dark-mode .case-note-display {
    background: linear-gradient(135deg, #0c2a3a 0%, #0a2236 100%);
    border-color: #0d424b;
}
body.dark-mode .case-note-display-time { color: #94a3b8; }
body.dark-mode .case-note-textarea {
    background: #022a30;
    color: #f8fafc;
    border-color: #0d424b;
}
body.dark-mode .case-note-textarea::placeholder { color: #4b7280; }
body.dark-mode .case-note-display-text { color: #e2e8f0; }
/* =============================================
   COMMUNICATIONS CHAT PANEL
   ============================================= */

/* Unread badge on gear button */
.settings-btn { position: relative; }
.chat-gear-badge {
    position: absolute;
    top: -4px; right: -4px;
    width: 10px; height: 10px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid var(--white, #fff);
    display: block;
}
.chat-gear-badge.hidden { display: none; }

/* Badge inside menu item */
.chat-menu-badge {
    margin-left: auto;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 99px;
    line-height: 1.5;
}
.chat-menu-badge.hidden { display: none; }

/* Overlay */
.chat-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 1500;
    backdrop-filter: blur(2px);
    transition: opacity 0.25s;
}
.chat-overlay.hidden { display: none; }

/* Slide-in panel */
.chat-panel {
    position: fixed;
    top: 0; right: 0;
    width: min(420px, 100vw);
    height: 100dvh;
    background: var(--white, #fff);
    z-index: 1501;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 40px rgba(0,0,0,0.18);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    border-left: 1px solid var(--border-color, #e2e8f0);
}
.chat-panel.open {
    transform: translateX(0);
}

/* Header */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.1rem;
    background: var(--primary-color, #3083DC);
    color: #fff;
    flex-shrink: 0;
}
.chat-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.chat-header-icon {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.chat-header-title {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
}
.chat-header-sub {
    font-size: 0.75rem;
    opacity: 0.85;
}
.chat-close-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 34px; height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
}
.chat-close-btn:hover { background: rgba(255,255,255,0.3); }

/* Message list */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: #f1f5f9;
    scroll-behavior: smooth;
}
.chat-loading {
    text-align: center;
    color: #94a3b8;
    font-size: 0.875rem;
    padding: 2rem 0;
}

/* Date separator */
.chat-date-sep {
    text-align: center;
    font-size: 0.72rem;
    color: #64748b;
    background: #e2e8f0;
    border-radius: 99px;
    padding: 2px 12px;
    align-self: center;
    margin: 0.4rem 0;
}

/* Message row */
.chat-msg-row {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    max-width: 85%;
    animation: msgSlideIn 0.18s ease;
}
@keyframes msgSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.chat-msg-row.own {
    align-self: flex-end;
    flex-direction: row-reverse;
}
.chat-msg-row.other {
    align-self: flex-start;
}

/* Avatar */
.chat-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    text-transform: uppercase;
}

/* Bubble */
.chat-bubble {
    padding: 0.55rem 0.8rem;
    border-radius: 14px;
    font-size: 0.88rem;
    line-height: 1.5;
    word-break: break-word;
    position: relative;
    max-width: 100%;
}
.chat-msg-row.own .chat-bubble {
    background: var(--primary-color, #3083DC);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.chat-msg-row.other .chat-bubble {
    background: #fff;
    color: var(--text-main, #1e293b);
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.chat-sender-name {
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 2px;
    opacity: 0.75;
}
.chat-msg-time {
    font-size: 0.68rem;
    opacity: 0.65;
    text-align: right;
    margin-top: 3px;
}

/* Image bubble */
.chat-img-preview {
    max-width: 220px;
    border-radius: 10px;
    cursor: pointer;
    display: block;
    margin-top: 4px;
}

/* Audio bubble */
.chat-audio-player {
    width: 180px;
    height: 36px;
    margin-top: 4px;
    border-radius: 20px;
    outline: none;
}

/* Recording bar */
.chat-recording-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    background: #fef2f2;
    border-top: 1px solid #fecaca;
    flex-shrink: 0;
}
.chat-recording-bar.hidden { display: none; }
.chat-rec-pulse {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #ef4444;
    animation: recPulse 1s infinite;
    flex-shrink: 0;
}
@keyframes recPulse {
    0%,100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(1.3); }
}
#chat-rec-timer {
    font-size: 0.85rem;
    font-weight: 700;
    color: #dc2626;
    min-width: 32px;
    font-family: monospace;
}
.chat-rec-cancel {
    background: none;
    border: 1px solid #fca5a5;
    color: #dc2626;
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.chat-rec-cancel:hover { background: #fee2e2; }
.chat-rec-stop {
    padding: 0.35rem 0.8rem;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 20px;
    width: auto;
}

/* Composer */
.chat-composer {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    background: var(--white, #fff);
    border-top: 1px solid var(--border-color, #e2e8f0);
    flex-shrink: 0;
}
.chat-attach-btn,
.chat-voice-btn {
    background: none;
    border: none;
    color: #64748b;
    width: 36px; height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.chat-attach-btn:hover { background: #f1f5f9; color: var(--primary-color, #3083DC); }
.chat-voice-btn:hover,
.chat-voice-btn.recording { background: #fee2e2; color: #dc2626; }

.chat-text-input {
    flex: 1;
    padding: 0.5rem 0.8rem;
    border: 1.5px solid var(--border-color, #e2e8f0);
    border-radius: 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    line-height: 1.4;
    resize: none;
    overflow: hidden;
    min-height: 36px;
    max-height: 120px;
    background: var(--background-bg, #f8fafc);
    color: var(--text-main, #1e293b);
    transition: border-color 0.2s;
}
.chat-text-input:focus {
    outline: none;
    border-color: var(--primary-color, #3083DC);
}
.chat-send-btn {
    background: var(--primary-color, #3083DC);
    border: none;
    color: #fff;
    width: 38px; height: 38px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.1s;
    flex-shrink: 0;
}
.chat-send-btn:hover { background: #1d6abf; transform: scale(1.08); }
.chat-send-btn:active { transform: scale(0.95); }

/* Upload progress bubble */
.chat-upload-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #64748b;
    padding: 0.4rem 0;
}

/* Dark mode */
body.dark-mode .chat-panel {
    background: #022a30;
    border-color: #0d424b;
}
body.dark-mode .chat-messages { background: #001f24; }
body.dark-mode .chat-date-sep { background: #043138; color: #94a3b8; }
body.dark-mode .chat-msg-row.other .chat-bubble {
    background: #043138;
    color: #f8fafc;
    box-shadow: none;
}
body.dark-mode .chat-composer {
    background: #022a30;
    border-color: #0d424b;
}
body.dark-mode .chat-text-input {
    background: #001f24;
    border-color: #0d424b;
    color: #f8fafc;
}
body.dark-mode .chat-attach-btn,
body.dark-mode .chat-voice-btn { color: #94a3b8; }
body.dark-mode .chat-attach-btn:hover { background: #043138; }
body.dark-mode .chat-recording-bar { background: #1a0a0a; border-color: #7f1d1d; }
