/* ═══════════════════════════════════════════════════════
   Intranet — Espacio Closet y Cocina
   Soft UI Glassmorphism Dashboard
   Palette: Naranja Dorado #D4932A, Gris Oscuro #5A5A5A, Blanco
   Font:    Plus Jakarta Sans
   ═══════════════════════════════════════════════════════ */

:root {
    /* Original Vibrant Orange Branding (#FF9900) */
    --color-primary-50: #fff8ec;
    --color-primary-100: #ffeed3;
    --color-primary-200: #ffd8a6;
    --color-primary-300: #ffb86b;
    --color-primary-400: #ff992b;
    --color-primary-500: #FF9900;
    /* Main Orange */
    --color-primary-600: #e68a00;
    --color-primary-700: #cc7a00;
    --color-primary-800: #995c00;
    --color-primary-900: #663d00;
    --color-primary-950: #331f00;

    --bg-body: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;

    /* Typography: Gris Antracita Standard */
    --text-main: #1f2937;
    /* Slate 800 - Deep Anthracite */
    --text-muted: #475569;
    /* Slate 600 - Medium Anthracite */
    --text-light: #64748b;
    /* Slate 500 - Light Anthracite */

    --primary-color: var(--color-primary-500);
    --primary-dark: var(--color-primary-600);
    --primary-light: var(--color-primary-50);
    --primary-glow: rgba(255, 153, 0, 0.1);
    --accent-success: #10b981;
    /* Standard emerald */
    --accent-success-light: rgba(16, 185, 129, 0.1);
    --border-color: #e0e0e0;
    /* Shadows */
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.03);
    --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 40px -10px rgba(0, 0, 0, 0.12);
    /* Radii */
    --radius-xl: 24px;
    --radius-l: 20px;
    --radius-m: 12px;
    --radius-s: 8px;
    /* Typography */
    --fs-section-title: 26px;
    --fs-stat-value: 36px;
    --fs-card-title: 17px;
    --fs-body: 14px;
    --fs-micro: 12px;
    /* Buttons */
    --btn-height: 48px;
    --btn-icon-size: 42px;
    --pill-height: 26px;
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
    overflow-y: auto;
    font-weight: 400;
    font-size: var(--fs-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* Override any styles from main site's styles.css */
body.intranet-body {
    background: var(--bg-body) !important;
    background-image: none !important;
}

/* ── Layout ────────────────────────── */
.dashboard-container {
    display: none;
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg-body);
}

.dashboard-container.active {
    display: flex;
}

/* ══════════════════════════════════════
   SIDEBAR — Icon-only (Finsight style)
   ══════════════════════════════════════ */
.sidebar {
    width: 68px;
    height: 100vh;
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
    gap: 8px;
}


.sidebar-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

/* Brand avatar/logo — soft gradient circle */
.sidebar-brand {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: -0.5px;
    line-height: 1;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.sidebar-subtitle {
    display: none;
}

.nav-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 0 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--btn-icon-size);
    height: var(--btn-icon-size);
    padding: 0;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-m);
    transition: all 0.25s ease;
    cursor: pointer;
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    position: relative;
}

/* Hide text labels */
.nav-item .nav-label {
    display: none;
}

.nav-item:hover {
    color: var(--primary-color);
    background: var(--primary-light);
}

.nav-item.active {
    background: var(--primary-color);
    color: white;
    border: none;
}

/* Icons — outline style */
.nav-item i {
    width: 22px;
    font-size: 20px;
    text-align: center;
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0 12px;
    gap: 12px;
}

.settings-menu-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

.settings-dropdown {
    position: absolute;
    bottom: 0;
    left: 60px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-m);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    width: 200px;
    padding: 8px;
    display: none;
    flex-direction: column;
    z-index: 1000;
    animation: slideInLeft 0.3s ease;
}

.settings-dropdown.active {
    display: flex;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border-radius: var(--radius-s);
    color: var(--text-main);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.dropdown-item:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.dropdown-item i {
    width: 16px;
    font-size: 14px;
}

.dropdown-item.logout-item {
    color: #ef4444;
}

.dropdown-item.logout-item:hover {
    background: #fef2f2;
    color: #ef4444;
}

.settings-dropdown hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 8px 0;
}

/* ══════════════════════════════════════
   MAIN CONTENT
   ══════════════════════════════════════ */
.main-content {
    flex: 1;
    padding: 32px 36px;
    overflow-y: auto;
    position: relative;
    background: transparent;
}

.dashboard-section {
    display: none;
    animation: fadeIn 0.35s ease;
}

.dashboard-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Section Headers ───────────────── */
header,
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

/* High-End SaaS: Section titles — Bold 700 */
h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: var(--fs-section-title);
    color: var(--text-main);
    letter-spacing: -0.3px;
}

/* High-End SaaS: Card titles — SemiBold 600 */
h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    font-size: var(--fs-card-title);
    color: var(--text-main);
    margin-bottom: 16px;
}

/* ══════════════════════════════════════
   CARDS
   ══════════════════════════════════════ */
/* Branding: Gutter 16-24px */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

/* High-End SaaS: Cards — 32px padding, 24px radius, layered shadow + border */
.stat-card {
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

/* Branding: Body/label 14px */
.stat-label {
    font-size: var(--fs-body);
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
    font-weight: 500;
}

/* High-End SaaS: Featured figures — ExtraBold 800 */
.stat-value {
    font-size: var(--fs-stat-value);
    font-weight: 800;
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -0.8px;
}

/* ══════════════════════════════════════
   TABLES
   ══════════════════════════════════════ */
.table-container {
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

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

/* Branding: Micro-copy 12px */
.crm-table th {
    text-align: left;
    padding: 12px 16px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: var(--fs-micro);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

/* Branding: Body 14px */
.crm-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f3f4f6;
    color: var(--text-main);
    font-size: var(--fs-body);
}

.crm-table tr:last-child td {
    border-bottom: none;
}

.crm-table tr:hover td {
    background: var(--primary-light);
    transition: background 0.15s ease;
}

/* Status Badges */
/* Branding: Pills/Badges — height 24-28px, radius 100px (full round) */
.status-badge {
    padding: 4px 14px;
    border-radius: 100px;
    font-size: var(--fs-micro);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    height: var(--pill-height);
    line-height: 1;
}

.status-contacto {
    background: var(--color-primary-50);
    color: var(--color-primary-700);
    border: 1px solid var(--color-primary-100);
}

.status-medición,
.status-medicion {
    background: #ecfdf5;
    /* emerald-50 */
    color: #047857;
    /* emerald-700 */
    border: 1px solid #d1fae5;
    /* emerald-100 */
}

.status-diseño,
.status-diseno {
    background: #fffbeb;
    /* amber-50 */
    color: #b45309;
    /* amber-700 */
    border: 1px solid #fef3c7;
    /* amber-100 */
}

.status-firmado,
.status-finalizada {
    background: #f0fdf4;
    /* green-50 */
    color: #15803d;
    /* green-700 */
    border: 1px solid #dcfce7;
    /* green-100 */
}

.status-fábrica,
.status-fabrica {
    background: #fff7ed;
    /* orange-50 */
    color: #c2410c;
    /* orange-700 */
    border: 1px solid #ffedd5;
    /* orange-100 */
}

.status-instalación,
.status-instalacion {
    background: #eff6ff;
    /* blue-50 */
    color: #1d4ed8;
    /* blue-700 */
    border: 1px solid #dbeafe;
    /* blue-100 */
}

.status-incidencia {
    background: #fef2f2;
    /* red-50 */
    color: #b91c1c;
    /* red-700 */
    border: 1px solid #fee2e2;
    /* red-100 */
}

/* ══════════════════════════════════════
   CONTROLS & INPUTS
   ══════════════════════════════════════ */
.inventory-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.search-input,
.warehouse-select {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-m);
    font-family: inherit;
    font-size: var(--fs-body);
    outline: none;
    transition: border-color 0.2s;
    background: var(--bg-card);
    color: var(--text-main);
    height: var(--btn-height);
}

.search-input:focus,
.warehouse-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
    border-radius: var(--radius-m);
}

.search-input {
    flex: 1;
    max-width: 360px;
    min-width: 200px;
}

/* ── Buttons ───────────────────────── */
/* Branding: Buttons — height 40-48px, radius 12px */
.btn {
    box-sizing: border-box;
    padding: 0 24px;
    border-radius: var(--radius-m);
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-family: inherit;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 48px;
    line-height: 1;
    margin: 0;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--color-primary-600);
    color: white;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--color-primary-300);
    box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-secondary {
    background: #ffffff;
    color: var(--color-primary-500);
    border: 1px solid var(--color-primary-500);
}

.btn-secondary:hover {
    background: var(--color-primary-50);
    border-color: var(--color-primary-600);
    color: var(--color-primary-600);
}

.btn.small {
    padding: 0 14px;
    font-size: var(--fs-micro);
    height: 36px;
}

.btn-delete-modal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    width: 48px;
    box-sizing: border-box;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #fecaca;
    color: #dc2626;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
    margin: 0;
}

.modal-footer-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

/* 🚀 FIX DEFINITIVO DE ALINEACIÓN (RESETEO TOTAL) 🚀 */
.modal-footer-actions .btn,
.modal-footer-actions button,
.modal-footer-actions .btn-primary,
.modal-footer-actions .btn-secondary,
.modal-footer-actions .btn-delete-modal {
    margin: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    border-radius: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    padding: 0 24px !important;
    line-height: normal !important;
    vertical-align: middle !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    width: auto !important;
}

.modal-footer-actions .btn-delete-modal {
    width: 48px !important;
    min-width: 48px !important;
    padding: 0 !important;
}

.modal-footer-actions .btn-primary {
    flex: 1 !important;
}

.btn-delete-modal:hover {
    background: #fee2e2;
    border-color: #f87171;
}

/* ── Sub-tab pills ─────────────────── */
.dashboard-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    background: var(--bg-card);
    padding: 4px;
    border-radius: var(--radius-m);
    width: fit-content;
    box-shadow: var(--shadow-soft);
}

/* Branding: Tab pill height ~26px, radius 100px */
.tab-btn {
    padding: 0 20px;
    border: none;
    background: transparent;
    border-radius: 100px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: var(--fs-body);
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    height: 32px;
    display: inline-flex;
    align-items: center;
}

.tab-btn.active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 6px var(--primary-glow);
}

.tab-btn:not(.active):hover {
    color: var(--text-main);
    background: var(--primary-light);
}

/* Sub-sections */
.inventory-sub-section {
    display: none;
}

.inventory-sub-section.active {
    display: block;
}

/* ══════════════════════════════════════
   MODALS
   ══════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 29, 38, 0.45);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    overflow-y: auto;
    padding: 20px 0;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: var(--bg-card);
    padding: 36px;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
    animation: slideUp 0.25s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary-200) transparent;
}

.modal-card::-webkit-scrollbar {
    width: 6px;
}

.modal-card::-webkit-scrollbar-track {
    background: transparent;
}

.modal-card::-webkit-scrollbar-thumb {
    background: var(--color-primary-100);
    border-radius: 10px;
}

@keyframes slideUp {
    from {
        transform: translateY(16px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-card h3 {
    margin-bottom: 24px;
}

/* ── Form Groups ───────────────────── */
.form-group {
    margin-bottom: 16px;
}

/* Branding: Labels as body text 14px */
.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: var(--fs-body);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-m);
    font-family: inherit;
    font-size: var(--fs-body);
    color: var(--text-main);
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
    height: var(--btn-height);
}

.form-group textarea {
    height: auto;
    min-height: 80px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
    background: #fff;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Password Visibility Toggle */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 45px !important;
}

.toggle-password {
    position: absolute;
    right: 14px;
    cursor: pointer;
    color: var(--text-light);
    font-size: 18px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.toggle-password:hover {
    color: var(--primary-color);
}

/* ══════════════════════════════════════
   LOGIN
   ══════════════════════════════════════ */
#loginSection {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-body);
    position: relative;
    z-index: 100;
}

.login-card {
    background: var(--bg-card);
    padding: 48px;
    border-radius: var(--radius-xl);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 16px 48px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    text-align: center;
    width: 380px;
}

.login-card h2 {
    font-size: 1.5rem;
    margin-bottom: 28px;
    color: var(--text-main);
}

.login-card .form-group {
    text-align: left;
}

.login-card .btn-primary {
    margin-top: 8px;
}

/* ── Pipeline cards ────────────────── */
.pipeline-stage {
    background: var(--bg-card);
    padding: 16px 20px;
    border-radius: var(--radius-m);
    min-width: 140px;
    box-shadow: var(--shadow-soft);
    border-left: 3px solid var(--primary-color);
}

/* ── Kanban ─────────────────────────── */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.kanban-col {
    background: var(--bg-card);
    border-radius: var(--radius-l);
    padding: 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
}

.kanban-col h4 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 12px;
}

/* Branding: Card sub-items with consistent radius */
.project-card {
    background: var(--bg-body);
    padding: 14px;
    border-radius: var(--radius-m);
    margin-bottom: 10px;
    font-size: var(--fs-body);
}

/* ── Demo badge ────────────────────── */
/* Branding: Badge pill style */
.demo-badge {
    background: #ef4444;
    color: white;
    padding: 0 10px;
    border-radius: 100px;
    font-size: var(--fs-micro);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    height: var(--pill-height);
    display: inline-flex;
    align-items: center;
}

/* ── Back-home link ────────────────── */
.back-home {
    position: fixed;
    top: 16px;
    left: 84px;
    z-index: 100;
    color: var(--text-muted);
    text-decoration: none;
    font-size: var(--fs-micro);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.back-home:hover {
    color: var(--primary-color);
}

/* ══════════════════════════════════════
/* ── Overview Header Bar ─────────────────────────── */
.overview-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 4px;
}

.overview-header-bar h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.overview-date-text {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    display: block;
    margin-top: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-search {
    position: relative;
    width: 280px;
}

.header-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 14px;
}

.header-search input {
    width: 100%;
    padding: 10px 10px 10px 40px;
    border-radius: 100px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    font-size: 13px;
    outline: none;
    transition: var(--transition-base);
}

.header-search input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar-mini {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.user-name-mini {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

/* ── Main Layout (Two Columns) ────────────────── */
.overview-main-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.overview-left-column {
    flex: 3;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.overview-sidebar-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 320px;
}

/* LEFT COLUMN ELEMENTS */
.overview-unified-finance {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 30px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}

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

.overview-unified-finance .unified-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
}

.unified-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.unified-metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.unified-metric-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.unified-metric-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
}

.unified-chart-area {
    display: flex;
    align-items: center;
    gap: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.donut-legend {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    flex: 1;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-label {
    font-size: 13px;
    color: var(--text-main);
    font-weight: 500;
}

/* Middle Row Distribution */
.overview-middle-row {
    display: flex;
    gap: 24px;
}

.pipeline-card {
    flex: 2;
}

.overview-stats-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px !important;
}

.stat-item .finance-icon {
    margin-bottom: 0;
    width: 40px;
    height: 40px;
    font-size: 16px;
    border-radius: 10px;
}

.stat-item .finance-value {
    font-size: 20px;
}

.stat-item .finance-label {
    font-size: 12px;
}

/* Cobros & Pagos Card */
.overview-cobros-pagos-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    display: flex;
    gap: 40px;
}

.cp-section {
    flex: 1;
}

.cp-header {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-main);
}

.cp-divider {
    width: 1px;
    background: var(--border-color);
}

.cp-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f8f9fa;
}

.cp-row:last-child {
    border: none;
}

.cp-row-name {
    font-size: 13px;
    font-weight: 500;
}

.cp-row-amount {
    font-size: 13px;
    font-weight: 700;
}

.cp-row-amount.income {
    color: #2e7d32;
}

.cp-row-amount.expense {
    color: #c62828;
}

.cp-empty {
    font-size: var(--fs-micro);
    color: var(--text-light);
    font-style: italic;
    padding: 4px 0;
}

/* KPI / Finance Cards */
.overview-finance-card,
.overview-finance.stat-card,
.mgt-card,
.unified-finance,
.card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.stat-card:hover,
.mgt-card:hover,
.unified-finance:hover,
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.finance-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
    background: var(--primary-light);
    color: var(--primary-color);
}

.finance-label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}

.finance-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
}

/* Metric (Pipeline) Card */
.overview-metric-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}

.metric-title {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 20px;
    display: block;
}

.pipeline-chart {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    height: 180px;
    /* Bigger in Finsight layout */
}

.pipeline-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 8px;
}

.pipeline-bar {
    width: 28px;
    border-radius: 8px 8px 4px 4px;
    background: var(--primary-color);
}

.bar-label {
    font-size: 11px;
    color: var(--text-muted);
}

.bar-count {
    font-size: var(--fs-micro);
    font-weight: 700;
    color: var(--text-main);
}

/* SIDEBAR COLUMN ELEMENTS */
.overview-calendar-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}

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

.cal-title {
    font-size: 15px;
    font-weight: 800;
}

.cal-month {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.cal-day-header {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    padding-bottom: 6px;
}

.cal-day {
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    border-radius: 50%;
}

.cal-day.today {
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
}

.cal-day.has-event {
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
}

.cal-day.empty {
    visibility: hidden;
}

/* Tall Projects List */
.overview-projects-list-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    flex: 1;
    /* Stretch to fill sidebar height if possible */
}

.overview-projects-list-card .projects-header {
    margin-bottom: 16px;
}

.overview-projects-list-card .projects-title {
    font-size: 15px;
    font-weight: 800;
}

.active-projects-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.active-project-item {
    display: flex;
    flex-direction: column;
    padding: 14px;
    border-radius: var(--radius-m);
    background: #f8f9fa;
    border-left: 3px solid var(--primary-color);
    gap: 6px;
}

.proj-client {
    font-weight: 600;
    font-size: 13px;
}

.proj-desc {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.4;
}

.proj-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.proj-stage {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 100px;
    background: var(--primary-light);
    color: var(--primary-color);
}

.proj-date {
    color: var(--text-muted);
    font-size: 11px;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px 40px;
    background: #ffffff;
}

/* Transitions & Misc */
.overview-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-light);
    font-size: 13px;
}

.overview-empty i {
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--text-light);
}

.main-content::-webkit-scrollbar {
    width: 6px;
}

.main-content::-webkit-scrollbar-track {
    background: transparent;
}

.main-content::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ── Online Store (Inventory Mode) ────────────────── */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 300px);
    gap: 30px;
    padding: 20px 0 60px;
    justify-content: flex-start;
}

.product-card {
    width: 300px;
    height: 300px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.product-image-box {
    width: 100%;
    height: 180px;
    background: #f8f9fa;
    position: relative;
}

.product-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 800;
    color: var(--text-main);
    z-index: 2;
}

.product-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.product-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.product-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary-color);
}

.product-stock {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    background: #f0f7f0;
    color: #2e7d32;
}

.product-stock.low {
    background: #fff0f0;
    color: #d32f2f;
}

/* ══════════════════════════════════════
   MANAGEMENT GRIDS & CARDS
   ══════════════════════════════════════ */
.management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding: 20px 0;
}

.mgt-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.25s ease;
    position: relative;
    box-shadow: var(--shadow-soft);
}

.mgt-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.mgt-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.mgt-card-title {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2px;
}

.mgt-card-subtitle {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

.mgt-card-body {
    flex: 1;
}

.mgt-card-image {
    width: calc(100% + 48px);
    margin: -24px -24px 16px -24px;
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: var(--primary-light);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    border-bottom: 1px solid var(--border-color);
}

.mgt-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.mgt-stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

.mgt-stat-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.budget-highlight {
    color: var(--primary-color);
    font-weight: 700;
}

.mgt-card-footer {
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Specific Card Layouts */
.staff-avatar-box {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.staff-contact-btns {
    display: flex;
    gap: 8px;
}


.btn-icon-only {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s;
    cursor: pointer;
}

.btn-icon-only:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.stock-indicator {
    margin: 12px 0;
}

.stock-bar-container {
    height: 6px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}

.stock-bar-fill {
    height: 100%;
    border-radius: 10px;
}

.btn.active {
    background: var(--primary-color);
    color: white;
}

/* ══════════════════════════════════════
   3-COLUMN DASHBOARD GRID
   ══════════════════════════════════════ */
.overview-grid-3-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
    height: calc(100vh - 120px) !important;
    overflow-y: auto !important;
    padding-right: 15px;
    margin-top: 10px;
}

.overview-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 40px;
}

.col-header-icon {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.col-header-icon i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Metric Cards Refined */
.metric-card {
    background: var(--bg-card);
    border-radius: var(--radius-l);
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card), 0 12px 24px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-color-200);
}

.metric-card.gold-border {
    border-left: 4px solid #D4932A;
}

.metric-card.primary-border {
    border-left: 4px solid var(--primary-color);
}

.metric-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.metric-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

.metric-value.small {
    font-size: 1.6rem;
}

.metric-footer-value {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    font-weight: 700;
    color: var(--primary-color);
    text-align: right;
    font-size: 0.95rem;
}

/* Lists & Grids */
.compact-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: var(--radius-m);
    font-size: 0.85rem;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.list-item:hover {
    background: white;
    border-color: var(--primary-color-100);
    transform: translateX(4px);
}

.list-item-name {
    font-weight: 600;
    color: var(--text-main);
}

.list-item-value {
    font-weight: 700;
}

.list-item-value.income {
    color: #2e7d32;
}

.list-item-value.expense {
    color: #ef4444;
}

.mini-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mini-project-card {
    padding: 12px;
    border-radius: var(--radius-m);
    background: #fdfdfd;
    border: 1px solid #f1f5f9;
}

.mini-project-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
}

.mini-project-status {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.dual-stat {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-box {
    text-align: left;
}

/* Pipeline Compact */
.pipeline-compact {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 60px;
    margin-top: 10px;
}

.pipeline-compact-bar {
    flex: 1;
    background: var(--primary-light);
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: height 0.3s ease;
}

.pipeline-compact-bar:hover {
    background: var(--primary-color);
}

/* Calendar Card Compact */
.calendar-card-compact {
    background: var(--bg-card);
    border-radius: var(--radius-l);
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

.cal-grid-mockup {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    padding: 5px;
}

.cal-day-mockup {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    border-radius: 50%;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.2s ease;
}

.cal-day-mockup.header-day {
    font-weight: 800;
    color: var(--text-main);
    background: #f8fafc;
    border-radius: 8px;
    font-size: 0.7rem;
}

.cal-day-mockup.event {
    background: var(--primary-color);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.cal-grid-mini {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-top: 20px;
}

.cal-day-mini {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    border-radius: 10px;
    color: var(--text-muted);
    font-weight: 600;
    cursor: default;
}

.cal-day-mini.today {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px var(--primary-glow);
}

.cal-day-mini.event {
    background: var(--primary-light);
    color: var(--primary-color);
    position: relative;
}

.cal-day-mini.event::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
}

.status-critical {
    border-left: 4px solid #ef4444 !important;
}

@media (max-width: 1400px) {
    .overview-grid-3-columns {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 900px) {
    .overview-grid-3-columns {
        grid-template-columns: 1fr !important;
    }
}

/* ══════════════════════════════════════
   GLASSMORPHISM DASHBOARD (VARIANT 3)
   ══════════════════════════════════════ */
:root {
    --primary: #FF9900;
    --primary-glow: rgba(255, 153, 0, 0.1);
    --glass-bg: rgba(255, 153, 0, 0.1);
    /* 10% opacity orange tint */
    --border-glass: rgba(255, 153, 0, 0.15);
    --gradient-orange: linear-gradient(135deg, #FF9900 0%, #FFB347 100%);
}

.glass-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-soft) !important;
    border-radius: 28px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover) !important;
    border-color: var(--primary) !important;
}

.glow-orange {
    position: relative;
    z-index: 1;
}

.glow-orange::after {
    display: none;
    /* Removed the 'mancha' glow effect */
}

.custom-gradient-text {
    background: var(--gradient-orange);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.custom-gradient-bg {
    background: var(--gradient-orange);
}

/* Scrollbar refinement */
.overview-dashboard-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 153, 0, 0.3);
    border-radius: 10px;
}

/* Kanban Cards (New Structure) */
.kanban-glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 16px;
    border-radius: 20px;
    margin-bottom: 12px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
}

.kanban-glass-card:hover {
    background: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .overview-dashboard-grid {
        padding: 16px;
    }
}

/* ══════════════════════════════════════
   DYNAMIC ORANGE DASHBOARD (FINSIGHT)
   ══════════════════════════════════════ */
:root {
    --gradient-primary: linear-gradient(135deg, #FF9900 0%, #FFB84D 100%);
    --primary-glow: rgba(255, 153, 0, 0.2);
}

.overview-dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px;
    height: auto;
    overflow-y: visible;
}

.dash-row {
    display: grid;
    gap: 20px;
    width: 100%;
}

.row-top {
    grid-template-columns: 1.8fr 1fr;
    height: auto;
}

.row-middle {
    grid-template-columns: 1.8fr 1fr;
    height: auto;
}

.nested-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.row-bottom {
    grid-template-columns: 1fr;
}

.dash-card {
    background: var(--bg-card);
    color: var(--text-main);
    border-radius: 32px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.dash-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary) !important;
}

/* Finance Card */
.card-finance {
    flex-direction: row !important;
    gap: 30px;
    align-items: center;
}

.finance-stats-detailed {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.finance-main-value .stat-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.finance-main-value .stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-main);
    display: block;
}

.finance-sub-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.sub-stat-item {
    background: #fdfdfd;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid #f8f8f8;
}

.sub-stat-item.negative .value {
    color: #f43f5e;
}

.sub-stat-item.positive .value {
    color: #10b981;
}

.sub-stat-item .label {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 2px;
}

.sub-stat-item .value {
    font-size: 1.1rem;
    font-weight: 700;
}

.chart-container-right {
    width: 200px;
    height: 200px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-center-info {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-center-info span {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.chart-center-info strong {
    font-size: 1.2rem;
    color: var(--text-main);
}

/* Header Elements */
.card-top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.header-icon-orange {
    background: #fff7ed;
    color: #ea580c;
}

.header-icon-blue {
    background: #eff6ff;
    color: #2563eb;
}

.header-icon-green {
    background: #ecfdf5;
    color: #059669;
}

.count-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-red {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-orange {
    background: #ffedd5;
    color: #c2410c;
}

/* Progress Bars */
.progress-container {
    margin-top: 15px;
}

.progress-item {
    margin-bottom: 12px;
}

.progress-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-bottom: 4px;
}

.progress-track {
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    width: 100%;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* Kanban Columns */
.kanban-columns-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.kanban-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-right: 15px;
    border-right: 1px solid #f1f5f9;
}

.kanban-col:last-child {
    border-right: none;
}

.kanban-col-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.marker {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.m-gray {
    background: #94a3b8;
}

.m-amber {
    background: #f59e0b;
}

.m-red {
    background: #ef4444;
}

.m-green {
    background: #10b981;
}

.kanban-col-header h4 {
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 700;
}

.col-count {
    margin-left: auto;
    font-size: 0.7rem;
    background: #f8fafc;
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 10px;
}

.kanban-card {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.kanban-card:hover {
    transform: translateX(5px);
    border-color: #ff9900;
}

.kanban-card .item-id {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
}

.kanban-card .item-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.kanban-card .item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: #94a3b8;
}

/* Lists */
.list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.row-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #f8fafc;
}

.row-list-item:last-child {
    border-bottom: none;
}

.item-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.item-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.item-right {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-main);
}

.date-badge {
    width: 44px;
    height: 44px;
    background: #f8fafc;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.date-month {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
}

.date-day {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

@media (max-width: 1200px) {

    .row-top,
    .row-middle {
        grid-template-columns: 1fr;
    }

    .kanban-columns-container {
        grid-template-columns: 1fr 1fr;
    }

    .kanban-col {
        border-right: none;
        border-bottom: 1px solid #f1f5f9;
        padding-bottom: 20px;
    }
}

.color-red {
    color: #ff4d4d;
}

/* Custom Scrollbar for dashboard */
.overview-dashboard-grid::-webkit-scrollbar {
    width: 6px;
}

.overview-dashboard-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 153, 0, 0.2);
    border-radius: 10px;
}

@media (max-width: 1200px) {

    .row-top,
    .row-middle {
        grid-template-columns: 1fr;
    }

    .status-grid-4 {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .status-item {
        border-right: none;
    }

}

/* ── UI Alignment: Interfaz Mockups ────────────────── */
.card-category-label {
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #94a3b8 !important;
    /* text-slate-400 */
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    margin-bottom: 4px !important;
}

.card-main-title {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    /* text-slate-900 */
    line-height: 1.2 !important;
    margin-bottom: 24px !important;
}

/* ── Calendar & Layout Refinements ────────────────── */
.calendar-day-selected {
    background: #FF9900 !important;
    color: white !important;
    font-weight: 800 !important;
    box-shadow: 0 8px 20px rgba(255, 153, 0, 0.3) !important;
    border-radius: 50% !important;
}

/* Remove the 'marco' (Blue Shadow Frame) and Top Blue Glow */
.dashboard-container::after {
    display: none !important;
    content: none !important;
}

.main-content::before {
    display: none !important;
    content: none !important;
}

/* Ensure pure white background and no extraneous borders */
.dashboard-container {
    background: #ffffff !important;
}

.main-content {
    background: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
}

/* ═══ CRM Attachments ═══ */
.crm-attachments-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.crm-attachments-section h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.crm-attachments-section h4 i {
    color: var(--color-primary-500);
}

.attachment-upload-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
}

.attachment-upload-row select {
    min-width: 120px;
    max-width: 100%;
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    box-sizing: border-box;
}

.attachment-upload-row input[type="file"] {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attachment-upload-row .btn {
    font-size: 12px;
    padding: 8px 14px;
    white-space: nowrap;
}

.attachment-category-group {
    margin-bottom: 12px;
}

.attachment-category-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.attachment-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    margin-bottom: 4px;
    border-radius: 8px;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    transition: all 0.15s ease;
}

.attachment-file-item:hover {
    background: #f3f4f6;
    border-color: #e5e7eb;
}

.attachment-file-item .file-icon {
    font-size: 14px;
    color: var(--color-primary-500);
    width: 20px;
    text-align: center;
}

.attachment-file-item .file-info {
    flex: 1;
    min-width: 0;
}

.attachment-file-item .file-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attachment-file-item .file-meta {
    font-size: 10px;
    color: var(--text-muted);
}

.attachment-file-item .file-actions {
    display: flex;
    gap: 4px;
}

.attachment-file-item .file-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    padding: 4px 6px;
    border-radius: 6px;
    transition: all 0.15s;
}

.attachment-file-item .file-actions .btn-download {
    color: var(--color-primary-500);
}

.attachment-file-item .file-actions .btn-download:hover {
    background: var(--color-primary-50);
}

.attachment-file-item .file-actions .btn-remove {
    color: #dc2626;
}

.attachment-file-item .file-actions .btn-remove:hover {
    background: #fef2f2;
}

.attachments-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
    font-size: 12px;
}

.attachments-empty i {
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
    opacity: 0.4;
}

/* ═══ File Preview Lightbox ═══ */
.file-preview-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.file-preview-overlay.active {
    display: flex;
}

.file-preview-box {
    background: #fff;
    border-radius: 16px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    min-width: 320px;
}

.file-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #f3f4f6;
}

.file-preview-header .preview-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.file-preview-header .preview-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.file-preview-header .preview-actions a,
.file-preview-header .preview-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.15s;
    color: var(--text-muted);
    text-decoration: none;
}

.file-preview-header .preview-actions a:hover,
.file-preview-header .preview-actions button:hover {
    background: #f3f4f6;
    color: var(--text-main);
}

.file-preview-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 20px;
    min-height: 200px;
}

.file-preview-body img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 8px;
    object-fit: contain;
}

.file-preview-body iframe {
    width: 70vw;
    height: 75vh;
    max-width: 100%;
    border: none;
    border-radius: 8px;
}

.file-preview-fallback {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.file-preview-fallback i {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.3;
}

.file-preview-fallback a {
    display: inline-block;
    margin-top: 12px;
    color: var(--color-primary-500);
    font-weight: 600;
    text-decoration: none;
}

.file-preview-fallback a:hover {
    text-decoration: underline;
}

/* ── Media Queries for Responsive Modals ────────────────── */
@media (max-width: 768px) {
    .modal-card {
        max-width: 95% !important;
        padding: 24px !important;
        margin: auto 0;
    }

    .modal-footer-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .modal-footer-actions .btn,
    .modal-footer-actions .btn-primary {
        width: 100% !important;
    }

    .modal-footer-actions .btn-delete-modal {
        align-self: flex-end;
    }
}