/* ForceCRM Custom Styles - Updated Color Palette & Fixed Footer */

/* Custom CSS Variables for Color Palette */
:root {
    --primary-purple: #6B46C1;
    --primary-magenta: #EC4899;
    --secondary-purple: #8B5CF6;
    --secondary-pink: #F472B6;
    --accent-purple: #A855F7;
    --light-purple: #E9D5FF;
    --dark-purple: #4C1D95;
    
    --gradient-primary: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-magenta) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--secondary-purple) 0%, var(--secondary-pink) 100%);
    --gradient-light: linear-gradient(135deg, var(--light-purple) 0%, #FDF2F8 100%);
    
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-accent: #FAF5FF;
}

/* Global Styles with Flex Layout for Sticky Footer */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--gradient-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Navigation with New Gradient */
.navbar-brand img {
    filter: brightness(0) invert(1);
}

.bg-primary {
    background: var(--gradient-primary) !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
}

.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

/* Main Content Area */
main {
    flex: 1;
    padding-bottom: 2rem;
}

/* Cards with New Styling */
.card {
    border: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    background: var(--bg-primary);
    border-radius: 16px;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-header {
    background: var(--gradient-light);
    border-bottom: 1px solid #E5E7EB;
    font-weight: 600;
    color: var(--primary-purple);
    padding: 1.25rem 1.5rem;
}

/* Chat Styles - Enhanced for AI Integration */
#chat-window {
    background: var(--bg-primary);
    border: 2px solid #E5E7EB;
    border-radius: 16px;
    min-height: 400px;
    max-height: 500px;
    overflow-y: auto;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

#chat-window::-webkit-scrollbar {
    width: 8px;
}

#chat-window::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 10px;
}

#chat-window::-webkit-scrollbar-thumb {
    background: var(--gradient-secondary);
    border-radius: 10px;
}

#chat-window::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-primary);
}

/* Chat Messages - WhatsApp Style */
.chat-message {
    margin-bottom: 1rem;
    animation: fadeInUp 0.3s ease;
    display: flex;
    width: 100%;
}

.chat-message.user {
    justify-content: flex-end;
}

.chat-message.ai {
    justify-content: flex-start;
}

.user-bubble {
    background: var(--gradient-primary);
    color: white;
    padding: 10px 16px;
    border-radius: 18px 18px 4px 18px;
    max-width: 70%;
    word-wrap: break-word;
    box-shadow: 0 2px 8px rgba(107, 70, 193, 0.3);
    font-weight: 500;
    margin-left: auto;
}

.agent-bubble {
    background: #F3F4F6;
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: 18px 18px 18px 4px;
    max-width: 75%;
    word-wrap: break-word;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--secondary-purple);
    margin-right: auto;
}

.error-bubble {
    background: #FEE2E2;
    color: #DC2626;
    padding: 10px 16px;
    border-radius: 18px 18px 18px 4px;
    max-width: 70%;
    word-wrap: break-word;
    border-left: 4px solid #EF4444;
    margin-right: auto;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Table Styling for AI Results */
.chat-table {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chat-table th {
    background: var(--gradient-primary);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.chat-table td {
    background: white;
    padding: 12px;
    border-bottom: 1px solid #E5E7EB;
}

.chat-table tr:hover td {
    background: var(--bg-accent);
}

/* Toolbar for chat tables */
.chat-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #E5E7EB;
}

.copy-btn, .export-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--gradient-secondary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover, .export-btn:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Buttons with New Gradient */
.btn {
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 12px;
    padding: 0.625rem 1.25rem;
}

.btn:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: var(--gradient-primary);
    filter: brightness(1.1);
}

.btn-success {
    background: var(--gradient-secondary);
    border: none;
    color: white;
}

.btn-success:hover {
    background: var(--gradient-secondary);
    filter: brightness(1.1);
}

.btn-outline-primary {
    border: 2px solid var(--primary-purple);
    color: var(--primary-purple);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.btn-outline-info {
    border: 2px solid var(--secondary-purple);
    color: var(--secondary-purple);
    background: transparent;
}

.btn-outline-info:hover {
    background: var(--gradient-secondary);
    color: white;
    border-color: transparent;
}

.btn-outline-secondary {
    border: 2px solid var(--accent-purple);
    color: var(--accent-purple);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--accent-purple);
    color: white;
    border-color: transparent;
}

/* Badges with New Colors */
.badge {
    font-weight: 500;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}

.bg-success, .badge.bg-success {
    background: var(--gradient-secondary) !important;
}

.bg-primary, .badge.bg-primary {
    background: var(--gradient-primary) !important;
}

.bg-info {
    background: var(--secondary-purple) !important;
}

/* Credits Badge Special Styling */
.credits-badge {
    background: var(--gradient-primary) !important;
    color: white;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(107, 70, 193, 0.3);
}

/* Forms */
.form-control {
    border-radius: 12px;
    border: 2px solid #E5E7EB;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 0.2rem rgba(107, 70, 193, 0.25);
    background: var(--bg-accent);
}

.input-group-text {
    background: var(--gradient-light);
    border: 2px solid #E5E7EB;
    border-radius: 12px 0 0 12px;
    color: var(--primary-purple);
}

/* Alerts with New Styling */
.alert {
    border: none;
    border-radius: 12px;
    border-left: 4px solid;
}

.alert-success {
    background: var(--gradient-light);
    color: var(--primary-purple);
    border-left-color: var(--secondary-purple);
}

.alert-danger {
    background: linear-gradient(135deg, #FEE2E2 0%, #FEF7FF 100%);
    color: #991B1B;
    border-left-color: #EF4444;
}

.alert-info {
    background: var(--gradient-light);
    color: var(--primary-purple);
    border-left-color: var(--accent-purple);
}

/* Tables */
.table {
    background-color: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
}

.table-hover tbody tr:hover {
    background: var(--bg-accent);
}

.table-light th {
    background: var(--gradient-light);
    color: var(--primary-purple);
    font-weight: 600;
}

/* Toast Notifications */
.toast {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Footer - Fixed to Bottom */
footer {
    margin-top: auto;
    background: var(--gradient-primary) !important;
    color: white;
    border-top: none;
    padding: 2rem 0;
}

.bg-dark {
    background: var(--gradient-primary) !important;
}

footer .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Loading States */
.btn .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-brand span {
        display: none;
    }

    #chat-window {
        height: 300px !important;
        margin-bottom: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .chat-message {
        max-width: 95%;
    }
}

/* Custom Utilities */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.shadow-soft {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

.border-gradient {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                var(--gradient-primary) border-box;
}

/* Language Selector */
#lang-switch {
    min-width: 80px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

#lang-switch:focus {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.2);
}

/* Modal Enhancements */
.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header {
    border-bottom: 1px solid #E5E7EB;
    background: var(--gradient-light);
    border-radius: 16px 16px 0 0;
    color: var(--primary-purple);
}

/* Progress Indicators */
.progress {
    height: 12px;
    border-radius: 10px;
    background: #E5E7EB;
}

.progress-bar {
    background: var(--gradient-primary);
    border-radius: 10px;
}

/* Service Cards */
.service-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 16px;
}

.service-card:hover {
    box-shadow: 0 25px 50px -12px rgba(107, 70, 193, 0.15);
}

/* Account Stats */
.stat-card {
    background: var(--gradient-light);
    border-left: 4px solid var(--primary-purple);
    border-radius: 12px;
}

/* Chat Input Styling */
#chat-input {
    border-radius: 25px;
    border: 2px solid #E5E7EB;
    padding: 12px 20px;
    background: white;
    transition: all 0.3s ease;
}

#chat-input:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 0.2rem rgba(107, 70, 193, 0.15);
    background: var(--bg-accent);
}

#chat-send {
    border-radius: 25px;
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 12px 20px;
    transition: all 0.3s ease;
}

#chat-send:hover {
    background: var(--gradient-primary);
    filter: brightness(1.1);
}

#chat-send:disabled {
    background: #9CA3AF;
    cursor: not-allowed;
}

/* Welcome Message Styling */
.chat-welcome {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-secondary);
}

.chat-welcome i {
    color: var(--primary-purple);
    margin-bottom: 1rem;
}

.chat-welcome h5 {
    color: var(--primary-purple);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Loading indicator */
.chat-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: #F3F4F6;
    border-radius: 20px 20px 20px 4px;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.chat-loading .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #E5E7EB;
    border-top: 2px solid var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Ensure proper spacing */
.container {
    max-width: 1200px;
}

/* Fix any layout issues */
.row {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
}

.col-md-8, .col-md-4 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/* Location Intelligence Map Styling */

.location-map-container {
    margin-top: 10px;
}

.map-responsive {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.map-responsive iframe,
.map-responsive .folium-map {
    width: 100%;
    min-height: 400px;
    border: none;
    border-radius: 8px;
}

/* Hotspots table styling */
.location-hotspots-table {
    margin-top: 15px;
}

.location-hotspots-table .table {
    font-size: 0.9rem;
}

.location-hotspots-table .table th {
    background: var(--gradient-light);
    color: var(--primary-purple);
    font-weight: 600;
    border: none;
}

.location-hotspots-table .table td {
    vertical-align: middle;
}

/* Make sure chat bubbles don't break with maps */
.agent-bubble .location-map-container {
    max-width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .map-responsive iframe,
    .map-responsive .folium-map {
        min-height: 300px;
    }
    
    .location-hotspots-table .table {
        font-size: 0.75rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Company Search - company_search.php
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Search page ──────────────────────────────────────────────────────────── */
.cs-search-wrap {
    max-width: 680px;
    margin: 2.5rem auto 0;
}
.cs-search-wrap .card {
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(107,70,193,.10);
}
.cs-search-label {
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--primary-purple);
    margin-bottom: .35rem;
}
.cs-search-wrap .input-group {
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color .2s;
}
.cs-search-wrap .input-group:focus-within {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(107,70,193,.12);
}
.cs-search-wrap .input-group-text {
    background: #fff;
    border: none;
    border-right: 1px solid #E5E7EB;
    border-radius: 0;
    color: var(--primary-purple);
    padding: .75rem 1rem;
}
.cs-search-wrap .form-control {
    border: none;
    border-radius: 0;
    font-size: 1rem;
    padding: .75rem .9rem;
    box-shadow: none !important;
    background: #fff;
}
.cs-search-wrap .form-control:focus {
    background: #fff;
}
.cs-search-wrap .btn-primary {
    border-radius: 0;
    padding: .75rem 1.6rem;
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .02em;
    border: none;
}

/* ── Result items ─────────────────────────────────────────────────────────── */
.cs-result-item {
    border: 1.5px solid #E9ECF4;
    border-radius: 10px;
    padding: .85rem 1.1rem;
    margin-bottom: .45rem;
    cursor: pointer;
    transition: all .15s;
    background: #fff;
}
.cs-result-item:hover {
    border-color: var(--primary-purple);
    background: #FAF5FF;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107,70,193,.10);
}
.cs-result-item .cs-company-name {
    font-weight: 700;
    font-size: .97rem;
    color: var(--primary-purple);
}
.cs-result-item .cs-company-meta {
    font-size: .79rem;
    color: var(--text-secondary);
    margin-top: .2rem;
}

/* ── Profile header ───────────────────────────────────────────────────────── */
.cs-header-card {
    background: linear-gradient(135deg, #1a237e 0%, #283593 60%, #1565c0 100%);
    color: #fff;
    border-radius: 14px;
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(26,35,126,.22);
}
.cs-header-card h2 {
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: .2rem;
    line-height: 1.3;
}
.cs-header-card .cs-sub {
    opacity: .78;
    font-size: .88rem;
}
.cs-header-card .cs-badge-row {
    margin-top: .9rem;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.cs-hbadge {
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 20px;
    padding: .25rem .8rem;
    font-size: .8rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

/* ── Sidebar nav ──────────────────────────────────────────────────────────── */
.cs-profile-nav {
    position: sticky;
    top: 80px;
}
.cs-profile-nav .nav-link {
    color: var(--text-secondary);
    border-radius: 9px;
    padding: .5rem .9rem;
    font-size: .86rem;
    display: flex;
    align-items: center;
    gap: .55rem;
    transition: all .15s;
    font-weight: 500;
}
.cs-profile-nav .nav-link:hover  { background: #F3F0FF; color: var(--primary-purple); }
.cs-profile-nav .nav-link.active { background: var(--gradient-primary); color: #fff; }
.cs-profile-nav .nav-link .cs-lock-icon {
    margin-left: auto;
    font-size: .7rem;
    opacity: .45;
    flex-shrink: 0;
}

/* ── Section cards ────────────────────────────────────────────────────────── */
.cs-section { display: none; }
.cs-section.active { display: block; }

.cs-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 14px rgba(0,0,0,.06);
    margin-bottom: 1.1rem;
    overflow: hidden;
    background: #fff;
}
.cs-card .card-body {
    padding: 1.25rem 1.4rem;
}
.cs-card .cs-card-header {
    background: var(--gradient-light);
    border-bottom: 1px solid #EDE9FE;
    font-weight: 700;
    font-size: .9rem;
    color: var(--primary-purple);
    padding: .75rem 1.2rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* ── Info grid ────────────────────────────────────────────────────────────── */
.cs-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    padding: .25rem 0;
}
.cs-info-item .cs-info-label {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: .2rem;
}
.cs-info-item .cs-info-value {
    font-size: .92rem;
    color: var(--text-primary);
    font-weight: 600;
    word-break: break-word;
}
.cs-info-item .cs-info-value a {
    color: var(--primary-purple);
    text-decoration: none;
}
.cs-info-item .cs-info-value a:hover { text-decoration: underline; }

/* ── Table font size fix (ΚΑΔ, Διοίκηση) ─────────────────────────────────── */
#kad-tbody td, #persons-tbody td {
    font-size: .84rem;
    font-weight: 400;
}

/* ── Relations — Επωνυμία column: κανονικό βάρος, μικρότερο font ─────────── */
#section-relations table td:first-child {
    font-weight: 400;
    font-size: .84rem;
}

/* ── Lock overlay ─────────────────────────────────────────────────────────── */
.cs-locked {
    position: relative;
    min-height: 130px;
}
.cs-lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(250,245,255,.93);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 0 0 12px 12px;
    z-index: 10;
    gap: .6rem;
}
.cs-lock-overlay .cs-lock-icon-lg {
    font-size: 1.8rem;
    color: #C4B5FD;
}
.cs-lock-overlay .cs-lock-title {
    font-weight: 700;
    font-size: .9rem;
    color: var(--primary-purple);
}
.cs-lock-overlay .cs-lock-desc {
    font-size: .8rem;
    color: var(--text-secondary);
    margin-bottom: .15rem;
}
.cs-btn-unlock {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: .4rem 1.3rem;
    font-size: .84rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s, box-shadow .2s;
    box-shadow: 0 2px 8px rgba(107,70,193,.25);
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.cs-btn-unlock:hover {
    opacity: .88;
    box-shadow: 0 4px 14px rgba(107,70,193,.35);
}

/* ── Financial chart ──────────────────────────────────────────────────────── */
#finChart { max-height: 240px; }
.cs-fin-up   { color: #16a34a; }
.cs-fin-down { color: #dc2626; }
.cs-kad-main { background: #F0FDF4; }
.cs-highlight-item {
    border-left: 4px solid;
    padding: .55rem .85rem;
    border-radius: 0 6px 6px 0;
    margin-bottom: .45rem;
    font-size: .87rem;
}
.cs-highlight-item.positive { border-color: #16a34a; background: #F0FDF4; }
.cs-highlight-item.negative { border-color: #dc2626; background: #FEF2F2; }

/* ═══════════════════════════════════════════════════════════════════════════
   Company Search — Mobile responsive (≤767px)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {

    /* ── Profile layout: stack sidebar above content ── */
    #profile-view .row.g-3 {
        flex-direction: column;
    }
    #profile-view .col-lg-2,
    #profile-view .col-md-3 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }
    #profile-view .col-lg-10,
    #profile-view .col-md-9 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }

    /* ── Sidebar nav: horizontal scrollable tab bar ── */
    .cs-profile-nav {
        position: static;
        top: auto;
    }
    .cs-profile-nav .nav.flex-column {
        flex-direction: row !important;
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        gap: .3rem;
        padding-bottom: .4rem;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .cs-profile-nav .nav.flex-column::-webkit-scrollbar {
        display: none;
    }
    .cs-profile-nav .nav-link {
        flex-shrink: 0;
        padding: .4rem .75rem;
        font-size: .78rem;
        border-radius: 20px;
        white-space: nowrap;
        gap: .35rem;
    }
    .cs-profile-nav .nav-link .cs-lock-icon {
        font-size: .6rem;
        margin-left: .2rem;
    }

    /* ── Header card adjustments ── */
    .cs-header-card {
        padding: 1rem;
    }
    .cs-header-card h2 {
        font-size: 1.1rem;
        line-height: 1.3;
    }
    .cs-badge-row {
        flex-wrap: wrap;
        gap: .3rem;
    }

    /* ── Card body padding reduction ── */
    .cs-card .card-body {
        padding: .9rem 1rem;
    }

    /* ── Info grid: single column on mobile ── */
    .cs-info-grid {
        grid-template-columns: 1fr 1fr;
        gap: .75rem;
    }

    /* ── Tables: smaller font, allow horizontal scroll ── */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
    .table.table-sm td,
    .table.table-sm th {
        font-size: .75rem;
        padding: .3rem .4rem;
    }

    /* ── Financial chart smaller on mobile ── */
    #finChart {
        max-height: 180px;
    }

    /* ── Search wrap full width ── */
    .cs-search-wrap {
        margin: 1rem auto 0;
    }
}
