/* style.css */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-dark: #102a43;
    --primary-deep: #0b1f33;
    --success-color: #16a34a;
    --success-hover: #15803d;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --danger-hover: #b91c1c;
    --bg-dark: #f3f6fb;
    --bg-sidebar: linear-gradient(180deg, #0f2744 0%, #0b1f33 100%);
    --bg-panel: #ffffff;
    --bg-soft: #eef4fb;
    --text-main: #10233b;
    --text-muted: #5f738c;
    --text-soft: #8da2ba;
    --border-color: #d8e2ee;
    --border-strong: #bdd0e4;
    --glass-bg: rgba(255, 255, 255, 0.92);
    --glass-border: rgba(255, 255, 255, 0.9);
    --shadow-panel: 0 20px 45px rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.06);
    --sidebar-width: 290px;
    --sidebar-width-collapsed: 0px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.10), transparent 38%),
        radial-gradient(circle at bottom left, rgba(22, 163, 74, 0.05), transparent 32%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(243, 246, 251, 0.95) 100%);
    background-attachment: fixed;
}

.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.app-shell::before {
    content: "";
    position: fixed;
    inset: 18px 18px 18px 18px;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.34);
    backdrop-filter: blur(6px);
    pointer-events: none;
    z-index: 0;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 15, 26, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 11;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    box-shadow: 22px 0 45px rgba(3, 8, 18, 0.18);
    z-index: 12;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-header {
    padding: 28px 24px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.sidebar-brand-mark {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.35), rgba(59, 130, 246, 0.12));
    border: 1px solid rgba(148, 197, 255, 0.22);
    color: #dbeafe;
    font-size: 1.15rem;
}

.sidebar-brand-copy {
    min-width: 0;
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #f8fbff;
}

.sidebar-header h2 i {
    color: #60a5fa;
}

.sidebar-header p {
    font-size: 0.82rem;
    color: rgba(219, 234, 254, 0.72);
    margin-top: 5px;
}

.sidebar-contract-pill {
    margin-top: 18px;
    border: 1px solid rgba(148, 197, 255, 0.16);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    padding: 14px 16px;
    color: #f8fbff;
    display: grid;
    gap: 4px;
}

.contract-pill-label,
.sidebar-footer-label,
.summary-chip-label,
.sidebar-nav-label,
.topbar-breadcrumb {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.67rem;
    font-weight: 700;
}

.contract-pill-label {
    color: rgba(191, 219, 254, 0.7);
}

.sidebar-nav {
    padding: 18px 14px;
    flex: 1;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav-label {
    color: rgba(191, 219, 254, 0.55);
    padding: 16px 14px 8px;
}

.sidebar-nav li + .sidebar-nav-label {
    margin-top: 8px;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: rgba(219, 234, 254, 0.82);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.25s ease;
    border: 1px solid transparent;
    border-radius: 16px;
    margin-bottom: 6px;
}

.sidebar-nav li a i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    color: #93c5fd;
}

.sidebar-nav li a:hover, .sidebar-nav li a.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(37, 99, 235, 0.10));
    color: #ffffff;
    border-color: rgba(96, 165, 250, 0.26);
    transform: translateX(2px);
}

.sidebar-nav li a.active {
    box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.18);
}

.sidebar-footer {
    padding: 0 18px 22px;
}

.sidebar-footer-card {
    border-radius: var(--radius-md);
    padding: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
    border: 1px solid rgba(255,255,255,0.08);
    color: #eff6ff;
    display: grid;
    gap: 6px;
}

.sidebar-footer-card small {
    color: rgba(219, 234, 254, 0.72);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    max-width: 100%;
    position: relative;
    z-index: 1;
}

.topbar {
    height: auto;
    min-height: 88px;
    padding: 18px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
    background: linear-gradient(135deg, rgba(16, 42, 67, 0.96) 0%, rgba(11, 31, 51, 0.94) 100%);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 8;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.topbar-right {
    margin-left: auto;
}

.sidebar-toggle {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(191, 219, 254, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.16);
}

.page-title {
    display: grid;
    gap: 6px;
}

.topbar-breadcrumb {
    color: rgba(219, 234, 254, 0.72);
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-title h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: white;
}

.page-title p {
    color: rgba(219, 234, 254, 0.82);
    max-width: 720px;
    font-size: 0.92rem;
}

.topbar-summary-chip {
    min-width: 120px;
    padding: 11px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(191, 219, 254, 0.14);
    color: white;
    display: grid;
    gap: 4px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 250px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
    padding: 10px 18px 10px 10px;
    border-radius: 20px;
    backdrop-filter: blur(14px);
    border: 1px solid rgba(191, 219, 254, 0.22);
    box-shadow: 0 12px 24px rgba(15, 39, 68, 0.16);
}

.topbar-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, #60a5fa, #1d4ed8);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

#topbar-user-initials {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.topbar-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.topbar-user-kicker {
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(219, 234, 254, 0.72);
}

.topbar-user-info span:first-child {
    font-weight: 700;
    color: white;
    font-size: 0.95rem;
    line-height: 1.2;
}

#user-display {
    font-weight: 600;
    color: white;
    font-size: 0.95rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-role-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 999px;
    margin-top: 2px;
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.topbar-role-badge.admin {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.topbar-role-badge.invitado {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.topbar-role-badge.Trabajador, .topbar-role-badge.trabajador {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.topbar-role-badge.supervisor {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 20px;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.8);
    border-color: #ef4444;
}

.btn-logout i {
    margin-right: 6px;
}

.content-wrapper {
    padding: 32px;
    flex: 1;
}

.view-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.view-section.active {
    display: block;
}

.view-section.active {
    display: block;
}

#section-home {
    overflow-y: auto;
    max-height: calc(100vh - 80px);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cards & Glassmorphism */
.card-glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-md);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-soft);
}

.mina-table-card,
.table-responsive,
.table-container,
.home-hero,
.stat-card,
.dash-kpi-card,
.dash-summary-item,
.dash-chart-card,
.dash-list-card,
.dash-alert-card,
.modal-content,
.modal-box {
    box-shadow: var(--shadow-soft);
}

@media (max-width: 1280px) {
    .topbar {
        padding: 18px 24px;
    }

    .content-wrapper {
        padding: 24px;
    }

    .topbar-summary-chip {
        display: none;
    }
}

@media (max-width: 980px) {
    .app-shell::before {
        inset: 0;
        border-radius: 0;
    }

    .sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-100%);
        transition: transform 0.28s ease;
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        visibility: visible;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-right,
    .user-info {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .topbar-user {
        max-width: 100%;
        min-width: 0;
    }
}

@media (max-width: 640px) {
    .content-wrapper {
        padding: 18px;
    }

    .page-title h1 {
        font-size: 1.45rem;
    }

    .page-title p {
        font-size: 0.86rem;
    }

    .user-info {
        gap: 10px;
    }

    .btn-logout {
        margin-left: 0;
    }
}

.card-glass h3 {
    font-size: 1.25rem;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--text-main);
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.card-header-flex h3 { margin-bottom: 0; }

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.table th, .table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

/* Forms & Inputs */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input, .form-group select, .form-control {
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input[type="file"] {
    background: transparent;
    padding: 7px 0;
}

.form-group input:focus, .form-group select:focus, .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}
.btn-primary:hover { background-color: var(--primary-hover); }

.btn-success {
    background-color: var(--success-color);
    color: white;
}
.btn-success:hover { background-color: var(--success-hover); }

.btn-danger {
    background-color: var(--danger-color);
    color: white;
    padding: 6px 12px;
    font-size: 0.8rem;
}
.btn-danger:hover { background-color: var(--danger-hover); }

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.w-100 { width: 100%; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 25px; }
.mb-3 { margin-bottom: 15px; }
.mb-4 { margin-bottom: 25px; }

/* Tabs inside sections */
.tabs {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}
.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.tab-btn:hover { color: var(--text-main); }
.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Modal */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.6); 
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    width: 95%;
    max-width: 500px;
    position: relative;
    animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.close {
    color: var(--text-muted);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}
.close:hover { color: var(--danger-color); }

@keyframes zoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Generic Utilities */
.text-muted { color: var(--text-muted); }
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }

/* Toasts / Notifications */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    color: #1e293b;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.toast.success { border-left: 4px solid var(--success-color); }
.toast.error { border-left: 4px solid var(--danger-color); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.badge-success { background-color: rgba(16, 185, 129, 0.15); color: #059669; }
.badge-warning { background-color: rgba(245, 158, 11, 0.15); color: #d97706; }
.badge-danger  { background-color: rgba(239, 68, 68, 0.15);  color: #dc2626; }
.badge-muted   { background-color: rgba(100, 116, 139, 0.12); color: #64748b; }

.catalog-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.catalog-summary-card,
.catalog-admin-form,
.catalog-admin-table {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: #fff;
    padding: 18px;
}

.catalog-summary-card {
    display: grid;
    gap: 6px;
}

.catalog-summary-label {
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.catalog-summary-card strong {
    font-size: 1.8rem;
    color: var(--text-main);
}

.catalog-summary-card small {
    color: var(--text-muted);
}

.admin-docs-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.admin-docs-metric {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #dbe5ef;
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 6px;
}

.admin-docs-label {
    color: var(--text-muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.admin-docs-metric strong {
    color: var(--text-main);
    font-size: 1.85rem;
}

.admin-docs-metric small {
    color: var(--text-muted);
}

.admin-doc-worker {
    display: grid;
    gap: 4px;
}

.admin-doc-worker strong {
    color: var(--text-main);
    font-size: 0.92rem;
}

.admin-doc-worker small {
    color: var(--text-muted);
    font-size: 0.79rem;
}

.admin-doc-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.admin-doc-status.is-ok {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

.admin-doc-status.is-warning {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.admin-doc-status.is-danger {
    background: rgba(239, 68, 68, 0.14);
    color: #dc2626;
}

.admin-doc-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-doc-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef4f8;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 700;
}

.admin-doc-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-doc-icon {
    cursor: pointer;
    font-size: 1rem;
}

.admin-alert-card {
    background: white;
    border-radius: 12px;
    padding: 12px;
    border-left: 4px solid #ef4444;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-alert-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.admin-alert-card-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: #1e293b;
}

.admin-alert-card-body {
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

@media (max-width: 1100px) {
    .admin-docs-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .admin-docs-overview {
        grid-template-columns: 1fr;
    }
}

.catalog-admin-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.catalog-mini-stat {
    background: #f8fbff;
    border: 1px solid #dbe5ef;
    border-radius: 14px;
    padding: 12px 14px;
    display: grid;
    gap: 4px;
}

.catalog-mini-stat span {
    color: var(--text-muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.catalog-mini-stat strong {
    color: var(--text-main);
    font-size: 1.2rem;
}

.catalog-admin-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 10px;
    margin-bottom: 14px;
}

.catalog-admin-toolbar-wide {
    grid-template-columns: minmax(0, 1fr) 190px 170px;
}

.catalog-cell-stack {
    display: grid;
    gap: 3px;
}

.catalog-cell-stack strong {
    color: var(--text-main);
    font-size: 0.9rem;
}

.catalog-cell-stack small {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.catalog-badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eef4f8;
    color: #123962;
    font-size: 0.76rem;
    font-weight: 700;
}

@media (max-width: 900px) {
    .catalog-admin-overview,
    .catalog-admin-toolbar,
    .catalog-admin-toolbar-wide {
        grid-template-columns: 1fr;
    }
}

.catalog-admin-grid {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.catalog-admin-grid-wide {
    grid-template-columns: 420px minmax(0, 1fr);
}

.catalog-admin-table {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.catalog-admin-form h3,
.catalog-admin-table h3 {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
}

.catalog-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-main);
}

.catalog-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

#modal-flotas-mina-admin .modal-content,
#modal-equipos-mina-admin .modal-content {
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

#modal-flotas-mina-admin .modal-body,
#modal-equipos-mina-admin .modal-body {
    overflow: hidden;
}

#modal-flotas-mina-admin .catalog-admin-table .mina-table-container,
#modal-equipos-mina-admin .catalog-admin-table .mina-table-container {
    overflow: auto !important;
    max-height: min(56vh, 520px);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

#modal-flotas-mina-admin .catalog-admin-table .mina-table,
#modal-equipos-mina-admin .catalog-admin-table .mina-table {
    min-width: 760px;
}

.catalog-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
}

.esta-equipo-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.esta-equipo-metric {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #dbe5ef;
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 6px;
}

.esta-equipo-metric-label {
    color: var(--text-muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.esta-equipo-metric strong {
    font-size: 1.9rem;
    color: var(--text-main);
}

.esta-equipo-metric small {
    color: var(--text-muted);
}

.esta-filter-card {
    min-height: 100%;
}

.esta-filter-grid {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.esta-filter-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.esta-equipos-table-shell {
    border-radius: 22px;
}

.esta-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.esta-table-heading {
    display: grid;
    gap: 4px;
}

.esta-table-heading h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
}

.esta-table-heading p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.esta-equipo-code {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--text-main);
}

.esta-equipo-code::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
}

.esta-equipo-name {
    display: grid;
    gap: 3px;
}

.esta-equipo-name strong {
    color: var(--text-main);
}

.esta-equipo-name small,
.esta-cell-muted {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.esta-plan-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.esta-plan-metric {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #dbe5ef;
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 6px;
}

.esta-plan-metric-label {
    color: var(--text-muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.esta-plan-metric strong {
    font-size: 1.9rem;
    color: var(--text-main);
}

.esta-plan-metric small {
    color: var(--text-muted);
}

.esta-plan-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.esta-plan-heading {
    display: grid;
    gap: 4px;
}

.esta-plan-heading h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.esta-plan-heading p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.esta-plan-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.esta-plan-filterbar {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: rgba(248, 251, 255, 0.85);
}

.esta-plan-filter-group {
    display: grid;
    gap: 6px;
}

.esta-plan-filter-group label {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.esta-plan-filter-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.esta-plan-code {
    font-weight: 700;
    color: var(--text-main);
}

.esta-plan-equipo {
    display: grid;
    gap: 3px;
}

.esta-plan-equipo strong {
    color: var(--text-main);
}

.esta-plan-equipo small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.esta-plan-observacion {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-muted);
}

.esta-hist-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.esta-hist-metric {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #dbe5ef;
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 6px;
}

.esta-hist-metric-label {
    color: var(--text-muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.esta-hist-metric strong {
    font-size: 1.75rem;
    color: var(--text-main);
}

.esta-hist-metric small {
    color: var(--text-muted);
}

.esta-hist-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.esta-hist-heading {
    display: grid;
    gap: 4px;
}

.esta-hist-heading h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.esta-hist-heading p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.esta-hist-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.esta-hist-equipo {
    display: grid;
    gap: 3px;
}

.esta-hist-equipo strong {
    color: var(--text-main);
}

.esta-hist-equipo small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.mina-overview-strip {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.mina-overview-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #dbe5ef;
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 6px;
}

.mina-overview-label {
    color: var(--text-muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.mina-overview-card strong {
    font-size: 1.85rem;
    color: var(--text-main);
}

.mina-overview-card small {
    color: var(--text-muted);
}

.mina-backlog-table-shell {
    min-height: 100%;
}

.mina-table-heading {
    display: grid;
    gap: 4px;
}

.mina-table-heading p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.mina-filter-advanced {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.mina-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border-radius: 14px;
    background: #f1f5f9;
    border: 1px solid #dbe5ef;
}

.mina-view-btn {
    border: 0;
    background: transparent;
    color: var(--text-muted);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mina-view-btn.active {
    background: #123962;
    color: #fff;
    box-shadow: 0 10px 18px rgba(18, 57, 98, 0.2);
}

.mina-kanban-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 16px 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.08);
    color: #123962;
    font-size: 0.85rem;
}

.mina-kanban-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(260px, 1fr));
    gap: 16px;
    padding: 0 16px 16px;
    overflow-x: auto;
    align-items: start;
}

.mina-kanban-column {
    height: 74vh;
    min-height: 560px;
    max-height: 74vh;
    border-radius: 18px;
    border: 1px solid #dbe5ef;
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.98) 0%, rgba(240, 246, 252, 0.92) 100%);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mina-kanban-column.is-pendiente {
    border-top: 4px solid #f59e0b;
}

.mina-kanban-column.is-aprobado {
    border-top: 4px solid #10b981;
}

.mina-kanban-column.is-rechazado {
    border-top: 4px solid #ef4444;
}

.mina-kanban-column.is-realizado {
    border-top: 4px solid #2563eb;
}

.mina-kanban-column-header {
    padding: 16px 16px 12px;
    border-bottom: 1px solid #e2e8f0;
    display: grid;
    gap: 6px;
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.72);
}

.mina-kanban-column-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mina-kanban-column-title h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-main);
}

.mina-kanban-count {
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #123962;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
}

.mina-kanban-column-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

.mina-kanban-cards-wrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 10px;
}

.mina-kanban-cards {
    display: grid;
    gap: 10px;
    align-content: start;
    overflow-y: auto;
    min-height: 0;
    padding-right: 4px;
}

.mina-kanban-cards::-webkit-scrollbar {
    width: 8px;
}

.mina-kanban-cards::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.mina-kanban-card {
    background: #fff;
    border: 1px solid #dbe5ef;
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
    display: grid;
    gap: 10px;
}

.mina-kanban-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.mina-kanban-card-title {
    display: grid;
    gap: 2px;
}

.mina-kanban-kicker {
    color: var(--text-muted);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.mina-kanban-card-title strong {
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.2;
}

.mina-kanban-card-meta {
    display: grid;
    gap: 6px;
}

.mina-kanban-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.8rem;
}

.mina-kanban-meta-row span:first-child {
    color: var(--text-muted);
}

.mina-kanban-meta-row span:last-child {
    color: var(--text-main);
    font-weight: 600;
    text-align: right;
    max-width: 58%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mina-kanban-observation {
    border-top: 1px dashed #dbe5ef;
    padding-top: 8px;
    display: grid;
    gap: 4px;
}

.mina-kanban-observation span {
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.mina-kanban-observation p {
    margin: 0;
    color: var(--text-main);
    font-size: 0.8rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mina-kanban-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mina-kanban-more-btn {
    flex: 0 0 auto;
    width: 100%;
}

.mina-kanban-empty {
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.75);
    color: var(--text-muted);
    padding: 18px 14px;
    text-align: center;
    font-size: 0.84rem;
}

@media (max-width: 1100px) {
    .mina-kanban-board {
        grid-template-columns: repeat(2, minmax(280px, 1fr));
    }

    .mina-kanban-column {
        height: 68vh;
        max-height: 68vh;
    }
}

@media (max-width: 700px) {
    .mina-kanban-board {
        grid-template-columns: 1fr;
    }

    .mina-kanban-column {
        height: auto;
        max-height: none;
        min-height: 420px;
    }

    .mina-kanban-cards {
        max-height: 52vh;
    }
}


.mina-pauta-intro-strong {
    padding: 14px 16px;
    border-radius: 14px;
    background: #f8fbff;
    border: 1px solid #dbe5ef;
}

/* Warning button */
.btn-warning {
    background-color: #f59e0b;
    color: white;
    padding: 6px 12px;
    font-size: 0.8rem;
}
.btn-warning:hover { background-color: #d97706; }

/* Dashboard General Compacto */
#section-dashboard {
    padding: 24px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef4f8 100%);
    border-radius: 24px;
    border: 1px solid rgba(189, 208, 228, 0.6);
}

.dash-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.9fr);
    gap: 20px;
    margin-bottom: 24px;
}

.dash-report-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding: 20px 22px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid #dbe5ef;
    border-radius: 18px;
    backdrop-filter: blur(10px);
}

.dash-report-heading {
    display: grid;
    gap: 6px;
}

.dash-report-heading h3 {
    margin: 0;
    color: var(--text-main);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-report-heading p {
    margin: 0;
    color: var(--text-muted);
    max-width: 720px;
    font-size: 0.88rem;
}

.dash-report-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dash-report-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.dash-report-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #dbe5ef;
    border-radius: 16px;
    padding: 18px 16px;
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 6px;
}

.dash-report-label {
    color: var(--text-muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.dash-report-card strong {
    color: var(--text-main);
    font-size: 1.7rem;
    line-height: 1.1;
}

.dash-report-card small {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.dash-hero-copy,
.dash-hero-focus {
    border-radius: 22px;
    overflow: hidden;
}

.dash-hero-copy {
    padding: 26px 28px;
    background:
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.25), transparent 35%),
        linear-gradient(135deg, #0f2744 0%, #123962 55%, #174b7a 100%);
    color: white;
    box-shadow: 0 18px 35px rgba(15, 39, 68, 0.22);
}

.dash-hero-kicker {
    display: inline-block;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(219, 234, 254, 0.82);
}

.dash-hero-copy h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.dash-hero-copy p {
    max-width: 680px;
    color: rgba(219, 234, 254, 0.86);
    line-height: 1.6;
}

.dash-hero-focus {
    display: grid;
    gap: 14px;
}

.dash-focus-card {
    padding: 22px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid #dbe5ef;
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 8px;
}

.dash-focus-label {
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.dash-focus-card strong {
    font-size: 2rem;
    color: var(--text-main);
}

.dash-focus-card small {
    color: var(--text-muted);
}

/* KPI Cards Grid */
.dash-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.dash-kpi-grid-executive {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.dash-kpi-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid;
    border: 1px solid #e2e8f0;
}

.dash-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.dash-kpi-personal { border-color: #3b82f6; }
.dash-kpi-operativos { border-color: #10b981; }
.dash-kpi-compliance { border-color: #8b5cf6; }
.dash-kpi-mantencion { border-color: #14b8a6; }

.dash-kpi-icon {
    width: 55px;
    height: 55px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.dash-kpi-personal .dash-kpi-icon { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.dash-kpi-operativos .dash-kpi-icon { background: linear-gradient(135deg, #10b981, #059669); }
.dash-kpi-compliance .dash-kpi-icon { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.dash-kpi-mantencion .dash-kpi-icon { background: linear-gradient(135deg, #14b8a6, #0f766e); }

.dash-kpi-content {
    display: flex;
    flex-direction: column;
}

.dash-kpi-number {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.dash-kpi-label {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 4px;
}

.dash-kpi-sub {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 2px;
}

.dash-summary-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 25px;
}

.dash-summary-item {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid #dbe5ef;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    backdrop-filter: blur(8px);
}

.dash-summary-label {
    color: #64748b;
    font-size: 0.78rem;
}

.dash-summary-item strong {
    color: #0f172a;
    font-size: 1.15rem;
}

/* Main Grid */
.dash-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
    gap: 20px;
}

.dash-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.dash-chart-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.dash-chart-header {
    padding: 15px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.dash-chart-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-chart-header h3 i {
    color: #3b82f6;
}

.dash-chart-body {
    padding: 20px;
    min-height: 290px;
}

.dash-chart-body canvas {
    width: 100% !important;
    height: 250px !important;
}

.chart-legend-horizontal {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.chart-legend-horizontal .legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #64748b;
}

.chart-legend-horizontal .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dash-ops-grid {
    display: grid;
    gap: 18px;
}

.dash-list-card {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid #dbe5ef;
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.dash-list-header {
    padding: 16px 18px;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dash-list-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--text-main);
}

.dash-list-header span {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.dash-list-body {
    padding: 12px;
    display: grid;
    gap: 10px;
    min-height: 200px;
}

.dash-list-item {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    background: #fff;
    display: grid;
    gap: 8px;
}

.dash-list-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.dash-list-item-title {
    font-weight: 700;
    color: var(--text-main);
}

.dash-list-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.dash-list-item-note {
    color: var(--text-muted);
    font-size: 0.83rem;
}

.dash-empty-state {
    min-height: 100%;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    background: #f8fbff;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

/* Responsive */
@media (max-width: 1200px) {
    .dash-hero,
    .dash-main-grid {
        grid-template-columns: 1fr;
    }
    .dash-kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .dash-summary-strip {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1100px) {
    .dash-report-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .dash-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dash-summary-strip {
        grid-template-columns: repeat(2, 1fr);
    }
    .dash-charts-grid {
        grid-template-columns: 1fr;
    }
    .dash-hero-copy h2 {
        font-size: 1.6rem;
    }
    .catalog-summary-grid,
    .catalog-admin-grid,
    .catalog-admin-grid-wide,
    .catalog-form-grid,
    .esta-equipo-overview,
    .esta-filter-grid,
    .esta-plan-overview,
    .esta-plan-filterbar,
    .esta-hist-overview,
    .mina-overview-strip {
        grid-template-columns: 1fr;
    }
    .esta-table-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .esta-plan-toolbar {
        flex-direction: column;
    }
    .esta-filter-actions {
        justify-content: flex-start;
    }
    .esta-plan-actions,
    .esta-plan-filter-actions,
    .esta-hist-filters,
    .mina-filter-advanced {
        justify-content: flex-start;
    }
    .esta-hist-toolbar {
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .dash-kpi-grid {
        grid-template-columns: 1fr;
    }
    .dash-summary-strip {
        grid-template-columns: 1fr;
    }
}

/* Old Dashboard Styles (to be removed) */
.stat-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stat-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.stat-card-mini {
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-icon-mini {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.stat-info-mini h3 {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 2px;
}

.stat-info-mini p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dashboard-panel {
    padding: 20px;
}

.panel-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.compliance-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 6px;
    font-weight: 500;
}

.progress-container {
    height: 8px;
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.bg-success { background-color: #10b981 !important; }
.bg-warning { background-color: #f59e0b !important; }
.bg-danger  { background-color: #ef4444 !important; }
.bg-muted   { background-color: #94a3b8 !important; }

.bg-light-blue { background-color: rgba(59, 130, 246, 0.1) !important; border-left: 4px solid #3b82f6; }
.bg-light-green { background-color: rgba(16, 185, 129, 0.1) !important; border-left: 4px solid #10b981; }
.bg-light-red { background-color: rgba(239, 68, 68, 0.1) !important; border-left: 4px solid #ef4444; }
.bg-light-purple { background-color: rgba(168, 85, 247, 0.1) !important; border-left: 4px solid #a855f7; }
.text-purple { color: #a855f7 !important; }

.compliance-legend {
    display: flex;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.fleet-status-item {
    margin-bottom: 12px;
}

.fleet-status-item span:first-child {
    font-size: 0.85rem;
    display: block;
    margin-bottom: 4px;
}

.fleet-bar-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.fleet-val {
    font-weight: 700;
    font-size: 0.9rem;
    min-width: 15px;
}

@media (max-width: 1200px) {
    .stat-grid-6 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .stat-grid-6 { grid-template-columns: repeat(2, 1fr); }
    .dashboard-main-grid { grid-template-columns: 1fr; }
}


/* Modal Pauta ALMA - Compacto */
#modal-pauta .modal-content {
    max-height: 90vh !important;
    overflow-y: auto !important;
    padding: 1.5rem !important;
    width: 95% !important;
    margin: 2vh auto !important;
    background-color: white !important;
    color: var(--text-main) !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1) !important;
    border: none !important;
}

#modal-pauta h2 { font-size: 1.3rem; margin-bottom: 0.25rem; }
#modal-pauta p { margin-bottom: 0.5rem !important; }
#modal-pauta h4 { font-size: 1rem; margin-top: 0.8rem; margin-bottom: 0.4rem; }

.pauta-header-grid, .pauta-info-grid, .pauta-params-grid {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 0.8rem !important;
}

.pauta-header-grid { grid-template-columns: repeat(2, 1fr); }
.pauta-info-grid { grid-template-columns: repeat(3, 1fr); }
.pauta-params-grid { grid-template-columns: repeat(4, 1fr); }

#modal-pauta .form-group { margin-bottom: 0.4rem; }
#modal-pauta .form-group label { font-size: 0.75rem; margin-bottom: 0.1rem; }
#modal-pauta input, #modal-pauta select, #modal-pauta textarea {
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
}

.table-pauta th, .table-pauta td {
    padding: 0.3rem !important;
    font-size: 0.8rem;
}

#modal-pauta textarea { height: 50px; }

#modal-pauta .modal-header {
    background-color: #f8fafc !important;
    color: var(--text-main) !important;
    border-bottom: 2px solid var(--primary-color) !important;
    padding: 20px !important;
}

.radio-pauta {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.d-flex { display: flex; }
.gap-2 { gap: 10px; }
.flex-grow-1 { flex-grow: 1; }

@media (max-width: 768px) {
    .pauta-info-grid { grid-template-columns: 1fr 1fr; }
    .pauta-params-grid { grid-template-columns: 1fr 1fr; }
}

.btn-dashboard-premium {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white !important;
    border: none;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
    padding: 10px 24px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-decoration: none;
}

.btn-dashboard-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4);
    background: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
    filter: brightness(1.1);
}

.btn-dashboard-premium i {
    font-size: 1.1rem;
}

/* Bulk Plan Modal Specifics */
#modal-bulk-plan .modal-content {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    max-height: 90vh;
    overflow-y: auto;
}

#modal-bulk-plan .modal-header h3, #modal-bulk-plan h3 {
    color: white;
}

#modal-bulk-plan .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

#bulk-plan-filter {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

#bulk-plan-filter::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

#bulk-plan-equipos-list {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
    max-height: 200px !important;
}

#bulk-plan-equipos-list::-webkit-scrollbar {
    width: 6px;
}

#bulk-plan-equipos-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.equipo-item-check {
    border-left: 3px solid transparent;
}

.equipo-item-check:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-left-color: var(--primary-color);
}

.equipo-item-check input[type="checkbox"] {
    accent-color: var(--primary-color);
}


/* Styles optimized for light mode */


/* Clean Light Modal Design (Matches User Screenshot) */
.modal-clean .modal-content {
    background: #fdfdfd;
    border-radius: 12px;
    border: none;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    color: #1f2937;
    padding: 0;
    max-width: 900px;
}

.modal-clean .modal-header {
    background: #f1f5f9;
    padding: 20px 25px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-clean .modal-header h2, .modal-clean .modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.modal-clean .modal-body {
    padding: 25px;
    background: #f1f5f9; /* Light grey background for the body area */
}

#modal-programado-mina .modal-content {
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
}

#modal-programado-mina .modal-body {
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

#modal-programado-mina #form-programado-mina {
    padding-right: 4px;
}

#modal-componente-mina-image {
    z-index: 2300;
}

.modal-clean .form-group label {
    color: #64748b;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.modal-clean .form-control, .modal-clean input, .modal-clean select, .modal-clean textarea {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
    padding: 12px;
    font-size: 0.95rem;
    border-radius: 8px;
}

.modal-clean .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modal-clean .btn-success {
    background-color: #10b981;
    color: white;
    font-weight: 600;
    padding: 14px;
    font-size: 1.1rem;
    border-radius: 10px;
}

.modal-clean .bulk-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px; /* Reduced padding from 20px */
    height: 100%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.modal-clean .bulk-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
}

.modal-clean #bulk-plan-equipos-list {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.modal-clean .equipo-item-check {
    border-bottom: 1px solid #f1f5f9;
}

.modal-clean .equipo-item-check:hover {
    background: #f8fafc !important;
}

.modal-clean .selected-info-bar {
    background: #1e293b; /* Dark background for high contrast */
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.modal-clean .selected-info-bar label {
    color: #ffffff !important;
    margin-bottom: 0;
}

.modal-clean .selected-info-bar .text-primary {
    color: #60a5fa !important;
}

/* ===== HOME PAGE STYLES - PROFESSIONAL DESIGN ===== */
#section-home {
    padding: 0 !important;
    margin: 0;
    overflow-y: auto;
    max-height: calc(100vh - 80px);
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Hero Header */
.home-hero {
    position: relative;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f2744 50%, #1e3a5f 100%);
    padding: 40px 40px 60px;
    overflow: hidden;
    border-radius: 0;
}

.home-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(59, 130, 246, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #93c5fd;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
}

.hero-badge i {
    font-size: 1rem;
}

.hero-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin: 0 0 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-text p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
    margin: 0;
}

.hero-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.hero-user {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.1);
    padding: 12px 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.user-avatar {
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    color: white;
}

.user-info span:first-child {
    font-weight: 600;
    font-size: 1rem;
}

.hero-date {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    margin-left: 30px;
}

.role-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), #1d4ed8);
    padding: 4px 14px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

.hero-decoration {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 50%;
    overflow: hidden;
    z-index: 1;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(16, 185, 129, 0.1));
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -50px;
    animation: float 6s ease-in-out infinite;
}

.circle-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    right: 150px;
    animation: float 8s ease-in-out infinite reverse;
}

.circle-3 {
    width: 100px;
    height: 100px;
    top: 50%;
    right: 20%;
    animation: float 5s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Stats Cards Grid */
.stats-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: -30px 30px 30px;
    position: relative;
    z-index: 10;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.stat-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.stat-personal .stat-card-icon { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.stat-personal::before { background: linear-gradient(180deg, #3b82f6, #1d4ed8); }

.stat-equipos .stat-card-icon { background: linear-gradient(135deg, #10b981, #059669); }
.stat-equipos::before { background: linear-gradient(180deg, #10b981, #059669); }

.stat-mantencion .stat-card-icon { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-mantencion::before { background: linear-gradient(180deg, #f59e0b, #d97706); }

.stat-compliance .stat-card-icon { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.stat-compliance::before { background: linear-gradient(180deg, #3b82f6, #1d4ed8); }

.stat-planificadas .stat-card-icon { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.stat-planificadas::before { background: linear-gradient(180deg, #8b5cf6, #7c3aed); }

.stat-card-content {
    flex: 1;
}

.stat-card-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
}

.stat-card-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.stat-card-trend {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.stat-card-trend.up {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.stat-card-trend.down {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.stat-card-trend.neutral {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
}

/* Main Content Grid */
.home-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 25px;
    padding: 0 30px 30px;
}

.home-panel {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.panel-header-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(to right, #fafbfc, #ffffff);
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.panel-title i {
    font-size: 1.3rem;
    color: var(--primary-color);
}

.panel-title h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
}

.panel-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.panel-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.panel-badge.secondary {
    background: linear-gradient(135deg, #10b981, #059669);
}

.panel-badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    margin-right: 6px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Quick Access Panel */
.quick-access-panel {
    grid-row: span 2;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 20px 24px;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: #f8fafc;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.quick-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.quick-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.quick-link:hover::before {
    transform: scaleY(1);
    background: white;
}

.quick-link i {
    font-size: 1.4rem;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.quick-link:hover i {
    background: rgba(255, 255, 255, 0.2);
}

.quick-link.admin-only { border-left: 3px solid #ef4444; }
.quick-link.invitado-only { border-left: 3px solid #10b981; }

/* Alerts Panel */
.alerts-panel {
    max-height: 320px;
}

.alerts-list-custom {
    padding: 15px 20px;
    max-height: 240px;
    overflow-y: auto;
}

.alert-item-custom {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.alert-item-custom:last-child {
    margin-bottom: 0;
}

.alert-item-custom:hover {
    transform: translateX(4px);
}

.alert-item-custom.danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.03));
    border-left: 3px solid #ef4444;
    color: #dc2626;
}

.alert-item-custom.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.03));
    border-left: 3px solid #f59e0b;
    color: #d97706;
}

.alert-item-custom.info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.03));
    border-left: 3px solid #3b82f6;
    color: #1d4ed8;
}

.alert-item-custom i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

/* Activity Panel */
.activity-panel {
    max-height: 320px;
}

.activity-timeline {
    padding: 15px 20px;
    max-height: 240px;
    overflow-y: auto;
}

.activity-item-custom {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px dashed #e2e8f0;
    position: relative;
}

.activity-item-custom:last-child {
    border-bottom: none;
}

.activity-item-custom::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 32px;
    bottom: -12px;
    width: 2px;
    background: #e2e8f0;
}

.activity-item-custom:last-child::before {
    display: none;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), #1d4ed8);
    color: white;
    font-size: 0.75rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.activity-content {
    flex: 1;
    padding-top: 4px;
}

.activity-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.4;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Chart Panel */
.chart-panel {
    display: flex;
    flex-direction: column;
}

.chart-panel .panel-header-custom {
    flex-shrink: 0;
}

.chart-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.chart-ring {
    position: relative;
    width: 140px;
    height: 140px;
}

.chart-ring svg {
    transform: rotate(-90deg);
}

.chart-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.chart-percent {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
}

.chart-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.chart-legend {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.legend-item .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: var(--text-muted);
    text-align: center;
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 1200px) {
    .stats-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .home-main-grid {
        grid-template-columns: 1fr;
    }
    .quick-access-panel {
        grid-row: auto;
    }
}

@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        gap: 30px;
    }
    .hero-meta {
        align-items: flex-start;
        width: 100%;
    }
    .hero-text h1 {
        font-size: 1.8rem;
    }
    .stats-cards-grid {
        grid-template-columns: 1fr;
        margin: -20px 15px 20px;
    }
    .dash-report-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .dash-report-grid {
        grid-template-columns: 1fr;
    }
    .home-main-grid {
        padding: 0 15px 20px;
    }
    .quick-links-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== MINA SECTION STYLES ===== */
#section-mina {
    padding: 0;
}

/* Mina Header */
.mina-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f2744 100%);
    padding: 30px 30px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.mina-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mina-header-icon {
    width: 65px;
    height: 65px;
    background: rgba(245, 158, 11, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #f59e0b;
}

.mina-header-text h1 {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 5px;
}

.mina-header-text p {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    margin: 0;
}

.mina-stats-mini {
    display: flex;
    gap: 30px;
}

.mina-stat-item {
    text-align: center;
    background: rgba(255,255,255,0.1);
    padding: 15px 25px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.mina-stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.mina-stat-label {
    display: block;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
    text-transform: uppercase;
}

/* Mina Tabs */
.mina-tabs-container {
    background: white;
    padding: 0 30px;
    border-bottom: 1px solid #e2e8f0;
}

.mina-tabs {
    display: flex;
    gap: 5px;
}

.mina-tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 25px;
    background: none;
    border: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.mina-tab-btn:hover {
    color: #1e3a5f;
}

.mina-tab-btn.active {
    color: #1e3a5f;
    border-bottom-color: #f59e0b;
}

.mina-tab-btn i {
    font-size: 1.1rem;
}

/* Mina Content Grid */
.mina-content-grid {
    display: grid !important;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    padding: 20px;
    background: #f8fafc;
}

.mina-content-grid.hidden {
    display: none !important;
}

@media (max-width: 1024px) {
    .mina-content-grid {
        grid-template-columns: 1fr;
    }
}

.mina-content-grid .mina-upload-card {
    height: fit-content;
}

.mina-content-grid.table-only {
    grid-template-columns: 1fr;
}

#esta-equipos-content .mina-content-grid.table-only .esta-filter-card {
    min-height: auto;
}

#esta-equipos-content .mina-content-grid.table-only .esta-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mina-content-grid .mina-table-card {
    overflow: hidden;
}

/* Upload Card */
.mina-upload-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    height: fit-content;
}

.mina-card-header {
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mina-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mina-card-header h3 i {
    color: #f59e0b;
}

.mina-upload-form {
    padding: 20px;
}

.mina-upload-form-embedded {
    padding: 0;
    margin-top: 0;
}

.mina-pauta-intro {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
    color: #1e3a5f;
    font-size: 0.9rem;
}

.mina-pauta-intro p {
    margin: 0;
}

.mina-pauta-launch-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
    padding: 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.88rem;
}

.mina-pauta-launch-card strong {
    color: #0f172a;
    font-size: 0.92rem;
}

.mina-pauta-upload-divider {
    height: 1px;
    margin: 22px 0;
    background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
}

.mina-form-group {
    margin-bottom: 18px;
}

.mina-form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.mina-form-group small {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 0.78rem;
}

.mina-form-status {
    margin-bottom: 18px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
}

.mina-form-status.info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.mina-form-hint {
    margin: 10px 0 0;
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.5;
}

.mina-form-section {
    margin-bottom: 22px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
}

.mina-form-section-header {
    padding: 14px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.mina-form-section-header h4 {
    margin: 0;
    font-size: 0.95rem;
    color: #0f172a;
}

.mina-form-section-body {
    padding: 16px;
}

.mina-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.mina-form-grid.single {
    grid-template-columns: 1fr;
}

.mina-form-grid.measurement {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mina-dynamic-input,
.mina-dynamic-select,
.mina-dynamic-textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.92rem;
    background: #fff;
}

.mina-dynamic-textarea {
    min-height: 96px;
    resize: vertical;
}

.mina-checklist-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.mina-checklist-table th,
.mina-checklist-table td {
    border: 1px solid #e2e8f0;
    padding: 10px 8px;
    vertical-align: middle;
}

.mina-checklist-table thead th {
    background: #eff6ff;
    color: #1e3a5f;
    font-weight: 700;
}

.mina-checklist-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.mina-checklist-table .item-col {
    min-width: 240px;
}

.mina-checklist-inline {
    display: flex;
    justify-content: center;
    align-items: center;
}

.mina-signature-box {
    padding: 14px;
    border: 1px dashed #94a3b8;
    border-radius: 12px;
    background: #f8fafc;
}

.mina-pauta-modal-content {
    width: min(1400px, 96vw);
    max-width: 1400px !important;
    height: 92vh;
    display: flex;
    flex-direction: column;
}

.mina-pauta-modal-body {
    overflow-y: auto;
    padding: 20px 24px 26px;
}

.mina-pauta-modal-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.mina-pauta-summary-item {
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.mina-pauta-summary-item label {
    display: block;
    margin-bottom: 6px;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mina-pauta-summary-item span {
    color: #0f172a;
    font-weight: 600;
}

.mina-pauta-modal-actions {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 16px;
    margin-top: 8px;
    background: linear-gradient(180deg, rgba(255,255,255,0.75), #fff 35%);
}

.backlog-repeat-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.backlog-repeat-item {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    gap: 10px;
    padding: 12px;
    border: 1px solid #dbe4ee;
    border-radius: 12px;
    background: #f8fafc;
}

.backlog-repeat-item.single {
    grid-template-columns: minmax(0, 1fr) auto;
}

.backlog-repeat-actions {
    display: flex;
    align-items: center;
    justify-content: center;
}

.backlog-readonly #btn-add-backlog-personal,
.backlog-readonly #btn-add-backlog-material,
.backlog-readonly .backlog-repeat-actions,
.backlog-readonly #btn-submit-backlog-builder {
    display: none !important;
}

.mina-measurement-unit {
    display: inline-block;
    margin-top: 6px;
    color: #64748b;
    font-size: 0.78rem;
}

@media (max-width: 1024px) {
    .mina-form-grid,
    .mina-form-grid.measurement {
        grid-template-columns: 1fr;
    }

    .mina-pauta-modal-summary {
        grid-template-columns: 1fr;
    }

    .mina-pauta-modal-actions {
        flex-direction: column-reverse;
    }

    .backlog-repeat-item,
    .backlog-repeat-item.single {
        grid-template-columns: 1fr;
    }

    .mina-checklist-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

.mina-form-group label i {
    color: #94a3b8;
}

.mina-form-group select,
.mina-form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.mina-form-group select:focus,
.mina-form-group input:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.mina-file-input {
    position: relative;
}

.mina-file-input input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.mina-file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 25px;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 10px;
    color: #64748b;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.mina-file-input:hover .mina-file-label {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
    color: #f59e0b;
}

.mina-file-label i {
    font-size: 1.3rem;
}

.mina-file-label.has-file {
    border-style: solid;
    border-color: #22c55e;
    background: #dcfce7;
    color: #15803d;
    font-weight: 600;
    animation: pulse-success 0.5s ease;
}

.mina-file-label.has-file i {
    color: #22c55e;
}

@keyframes pulse-success {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.mina-btn-upload {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.mina-btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

/* Table Card */
.mina-table-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    overflow-x: auto;
}

.mina-filter-select {
    padding: 8px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #475569;
}

.mina-table-container {
    overflow-x: auto;
    max-width: 100%;
}

.mina-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.mina-table th {
    background: #f8fafc;
    padding: 12px 15px;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e2e8f0;
}

.mina-table td {
    padding: 14px 15px;
    font-size: 0.9rem;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
}

.mina-table tr:hover td {
    background: #f8fafc;
}

.mina-table .badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.mina-table .badge-warning { background: #fef3c7; color: #d97706; }
.mina-table .badge-success { background: #d1fae5; color: #059669; }
.mina-table .badge-danger { background: #fee2e2; color: #dc2626; }
.mina-table .badge-info { background: #dbeafe; color: #2563eb; }
.mina-table .badge-muted { background: #e2e8f0; color: #475569; }

.mina-programados-overview {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    padding: 20px 30px 0;
    background: #f8fafc;
}

.mina-programados-metric {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #dbe5ef;
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 6px;
}

.mina-programados-label {
    color: var(--text-muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.mina-programados-metric strong {
    font-size: 1.9rem;
    color: var(--text-main);
}

.mina-programados-metric small {
    color: var(--text-muted);
}

.mina-programados-shell {
    margin: 20px 30px 30px;
    padding: 22px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #dbe5ef;
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 18px;
}

.mina-programados-toolbar,
.mina-programados-actions,
.mina-programados-heading,
.mina-programados-filterbar {
    display: flex;
}

.mina-programados-toolbar {
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.mina-programados-heading {
    flex-direction: column;
    gap: 10px;
}

.mina-programados-heading h3 {
    margin: 0;
    color: #0f2744;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mina-programados-heading p {
    margin: 0;
    color: var(--text-muted);
    max-width: 720px;
}

.mina-programados-actions {
    align-items: center;
    gap: 12px;
}

.mina-programados-filterbar {
    flex-wrap: wrap;
    gap: 12px;
}

.mina-programados-filterbar .form-control {
    min-width: 220px;
}

.mina-programados-table-wrap {
    overflow-x: auto;
}

.mina-programado-bool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
}

.mina-programado-components {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mina-programado-components .catalog-badge-soft {
    white-space: nowrap;
}

.mina-programado-detail-cell {
    min-width: 260px;
}

.mina-programado-detail-cell small {
    display: block;
    color: #64748b;
    margin-top: 4px;
}

/* Responsive */
@media (max-width: 1024px) {
    .mina-header {
        flex-direction: column;
        text-align: center;
    }
    .mina-stats-mini {
        flex-wrap: wrap;
        justify-content: center;
    }

    .mina-programados-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 16px 16px 0;
    }

    .mina-programados-shell {
        margin: 16px;
        padding: 18px;
    }

    .mina-programados-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .mina-programados-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .mina-programados-overview {
        grid-template-columns: 1fr;
    }

    .mina-programados-filterbar .form-control {
        min-width: 100%;
    }
}

/* ===== PLANIFICACIÓN SEMANAL SECTION ===== */

.plan-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.plan-header-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.plan-header-icon {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.plan-header-text h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.plan-header-text p {
    margin: 5px 0 0 0;
    opacity: 0.85;
    font-size: 0.9rem;
}

.plan-year-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.15);
    padding: 8px 15px;
    border-radius: 8px;
}

.plan-year-selector label {
    font-weight: 600;
    font-size: 0.9rem;
}

.plan-year-dropdown {
    background: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    color: #1e3a5f;
    cursor: pointer;
}

.plan-controls {
    background: white;
    padding: 15px 30px;
    border-bottom: 1px solid #e2e8f0;
}

.mina-plan-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    padding: 20px 30px 0;
    background: #f8fafc;
}

.mina-plan-metric {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #dbe5ef;
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 6px;
}

.mina-plan-metric-label {
    color: var(--text-muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.mina-plan-metric strong {
    font-size: 1.9rem;
    color: var(--text-main);
}

.mina-plan-metric small {
    color: var(--text-muted);
}

.mina-plan-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.mina-plan-heading {
    display: grid;
    gap: 10px;
}

.mina-plan-heading h3 {
    margin: 0;
    color: #0f2744;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mina-plan-heading p {
    margin: 0;
    color: var(--text-muted);
    max-width: 720px;
}

.mina-plan-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mina-plan-summary-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
    gap: 18px;
    padding: 0 30px 20px;
    background: #f8fafc;
}

.mina-plan-focus-card,
.mina-plan-list-card {
    background: #fff;
    border: 1px solid #dbe5ef;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

.mina-plan-focus-card {
    padding: 22px;
    background:
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.2), transparent 35%),
        linear-gradient(135deg, #0f2744 0%, #123962 55%, #174b7a 100%);
    color: #fff;
    display: grid;
    gap: 10px;
}

.mina-plan-focus-kicker {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    color: rgba(219, 234, 254, 0.82);
    font-weight: 700;
}

.mina-plan-focus-card h3 {
    margin: 0;
    font-size: 2rem;
}

.mina-plan-focus-card p {
    margin: 0;
    color: rgba(219, 234, 254, 0.84);
}

.mina-plan-focus-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.mina-plan-focus-meta div {
    border-radius: 14px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    display: grid;
    gap: 4px;
}

.mina-plan-focus-meta span {
    font-size: 0.76rem;
    color: rgba(219, 234, 254, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.mina-plan-focus-meta strong {
    font-size: 1rem;
    color: #fff;
}

.mina-plan-list-card {
    padding: 20px;
    display: grid;
    gap: 14px;
}

.mina-plan-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mina-plan-list-header h3 {
    margin: 0;
    color: var(--text-main);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mina-plan-list-header span {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.mina-plan-list-body {
    display: grid;
    gap: 10px;
}

.mina-plan-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.mina-plan-list-item-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.mina-plan-list-item-main strong {
    color: var(--text-main);
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mina-plan-list-item-main span {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.mina-plan-list-item-tag {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

.mina-plan-list-item-tag.doc-ot {
    background: #dbeafe;
    color: #1d4ed8;
}

.mina-plan-list-item-tag.doc-terreno {
    background: #dcfce7;
    color: #15803d;
}

.mina-plan-list-item-tag.doc-eeaa {
    background: #fef3c7;
    color: #b45309;
}

.mina-plan-empty {
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    background: #f8fbff;
    color: var(--text-muted);
    padding: 18px;
    text-align: center;
    font-size: 0.85rem;
}

.plan-doc-types {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.plan-doc-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.plan-doc-badge.doc-ot {
    background: #dbeafe;
    color: #1d4ed8;
}

.plan-doc-badge.doc-terreno {
    background: #dcfce7;
    color: #15803d;
}

.plan-doc-badge.doc-eeaa {
    background: #fef3c7;
    color: #b45309;
}

.plan-weeks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    padding: 20px 30px;
    background: #f8fafc;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

.plan-week-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #dbe5ef;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    transition: all 0.2s ease;
}

.plan-week-card:hover {
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14);
    transform: translateY(-2px);
}

.plan-week-header {
    background: linear-gradient(135deg, #1e3a5f, #2d5a87);
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.plan-week-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.plan-week-status {
    font-size: 0.7rem;
    background: rgba(255,255,255,0.2);
    padding: 3px 8px;
    border-radius: 10px;
}

.plan-week-status.complete {
    background: #22c55e;
}

.plan-week-status.partial {
    background: #f59e0b;
}

.plan-week-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.plan-file-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.plan-file-row.has-file {
    background: #f0fdf4;
    border-color: #86efac;
}

.plan-file-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.plan-file-row[data-type="ot"] .plan-file-icon {
    background: #dbeafe;
    color: #2563eb;
}

.plan-file-row[data-type="terreno"] .plan-file-icon {
    background: #dcfce7;
    color: #16a34a;
}

.plan-file-row[data-type="eeaa"] .plan-file-icon {
    background: #fef3c7;
    color: #d97706;
}

.plan-file-info {
    flex: 1;
    min-width: 0;
}

.plan-file-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-file-name {
    font-size: 0.8rem;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.plan-file-name.empty {
    color: #94a3b8;
    font-style: italic;
}

.plan-file-actions {
    display: flex;
    gap: 5px;
}

.plan-file-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.plan-file-btn.upload {
    background: #e2e8f0;
    color: #64748b;
}

.plan-file-btn.upload:hover {
    background: #1e3a5f;
    color: white;
}

.plan-file-btn.download {
    background: #22c55e;
    color: white;
    display: none;
}

.plan-file-btn.download.visible {
    display: flex;
}

.plan-file-btn.download:hover {
    background: #16a34a;
}

.plan-file-btn.delete {
    background: #fee2e2;
    color: #dc2626;
    display: none;
}

.plan-file-btn.delete.visible {
    display: flex;
}

.plan-file-btn.delete:hover {
    background: #dc2626;
    color: white;
}

.plan-week-footer {
    padding: 8px 12px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.plan-week-date {
    font-size: 0.7rem;
    color: #64748b;
}

@media (max-width: 1100px) {
    .mina-plan-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mina-plan-summary-grid {
        grid-template-columns: 1fr;
    }

    .mina-plan-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .mina-plan-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .mina-plan-overview {
        grid-template-columns: 1fr;
        padding: 16px 16px 0;
    }

    .plan-controls,
    .mina-plan-summary-grid,
    .plan-weeks-grid {
        padding-left: 16px;
        padding-right: 16px;
    }

    .mina-plan-focus-meta {
        grid-template-columns: 1fr;
    }
}

/* Plan upload modal */
#modal-plan-upload .modal-content {
    max-width: 500px;
}

#modal-plan-upload .modal-header {
    background: #1e3a5f;
    color: white;
}

#modal-plan-upload .modal-header .close {
    color: white;
}

.plan-upload-form {
    padding: 20px;
}

.plan-upload-form .form-group {
    margin-bottom: 15px;
}

.plan-upload-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
}

.plan-upload-form select,
.plan-upload-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
}

.plan-upload-file {
    position: relative;
    border: 2px dashed #e2e8f0;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8fafc;
}

.plan-upload-file:hover {
    border-color: #1e3a5f;
    background: #f1f5f9;
}

.plan-upload-file input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.plan-upload-file i {
    font-size: 2rem;
    color: #64748b;
    margin-bottom: 10px;
}

.plan-upload-file p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.plan-upload-file.has-file {
    border-color: #22c55e;
    background: #f0fdf4;
}

.plan-upload-file.has-file i {
    color: #22c55e;
}

.plan-upload-file.has-file p {
    color: #15803d;
    font-weight: 600;
}

.plan-upload-info {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.plan-upload-info-item {
    flex: 1;
    background: #f1f5f9;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}

.plan-upload-info-item label {
    display: block;
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.plan-upload-info-item span {
    font-weight: 700;
    color: #1e3a5f;
}

/* Responsive planificación */
@media (max-width: 768px) {
    .plan-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    .plan-weeks-grid {
        grid-template-columns: 1fr;
        padding: 15px;
    }
}





/* ===== GLOBAL RESPONSIVE LAYER (tablet/mobile) ===== */
@media (max-width: 1024px) {
    .app-container {
        flex-direction: column;
        min-height: auto;
    }

    .sidebar {
        width: 100%;
        border-right: 0;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    }

    .sidebar-header {
        padding: 14px 18px;
    }

    .sidebar-nav {
        padding: 8px 0;
    }

    .sidebar-nav ul {
        display: flex;
        gap: 4px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0 10px 6px;
    }

    .sidebar-nav ul::-webkit-scrollbar {
        height: 6px;
    }

    .sidebar-nav li {
        flex: 0 0 auto;
    }

    .sidebar-nav li a {
        border-left: 0;
        border-bottom: 3px solid transparent;
        padding: 12px 14px;
        white-space: nowrap;
        border-radius: 8px;
        font-size: 0.9rem;
        gap: 10px;
    }

    .sidebar-nav li a:hover,
    .sidebar-nav li a.active {
        border-bottom-color: var(--primary-color);
        border-left-color: transparent;
    }

    .topbar {
        position: static;
        padding: 12px 16px;
    }

    .content-wrapper {
        padding: 16px;
    }

    #section-home {
        max-height: none;
    }

    .card-glass {
        padding: 18px;
    }

    .card-header-flex {
        flex-wrap: wrap;
        gap: 10px;
        align-items: flex-start;
    }

    .table th,
    .table td {
        padding: 10px;
    }

    .btn {
        min-height: 42px;
    }
}

@media (max-width: 768px) {
    .page-title h1 {
        font-size: 1.1rem;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .user-info {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
        margin-left: 0;
    }

    .topbar-user {
        max-width: calc(100% - 130px);
        padding-right: 10px;
    }

    .topbar-user-info span:first-child {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
    }

    .btn-logout {
        margin-left: 0;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .mina-header,
    .plan-header {
        padding: 18px 16px;
    }

    .mina-header-text h1,
    .plan-header-text h1 {
        font-size: 1.2rem;
    }

    .mina-header-content {
        align-items: flex-start;
    }

    .mina-stats-mini {
        width: 100%;
        gap: 10px;
    }

    .mina-stat-item {
        flex: 1;
        min-width: 88px;
        padding: 10px;
    }

    .mina-tabs-container,
    .plan-controls {
        padding: 0 10px;
    }

    .mina-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .mina-tab-btn {
        padding: 12px 14px;
        font-size: 0.86rem;
    }

    .mina-content-grid {
        padding: 12px;
        gap: 12px;
    }

    .mina-upload-form {
        padding: 14px;
    }

    .mina-table {
        min-width: 720px;
    }

    .table-responsive,
    .mina-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #section-estacionarios .card-glass > .d-flex.align-items-center.mb-3,
    #section-estacionarios .card-glass > .d-flex.justify-content-between.align-items-center.mb-3,
    #section-estacionarios .card-glass .pagination-container {
        flex-wrap: wrap;
        justify-content: flex-start !important;
    }

    #section-estacionarios .card-glass > .d-flex.align-items-center.mb-3 > .d-flex,
    #section-estacionarios .card-glass > .d-flex.justify-content-between.align-items-center.mb-3 > .d-flex,
    #section-estacionarios .card-glass .pagination-controls {
        width: 100%;
        flex-wrap: wrap;
    }

    #section-estacionarios .card-glass > .d-flex.align-items-center.mb-3 .btn,
    #section-estacionarios .card-glass > .d-flex.align-items-center.mb-3 .form-control,
    #section-estacionarios .card-glass > .d-flex.justify-content-between.align-items-center.mb-3 .btn,
    #section-estacionarios .card-glass > .d-flex.justify-content-between.align-items-center.mb-3 .form-control,
    #section-estacionarios .card-glass .pagination-controls .btn {
        width: 100%;
    }

    #section-estacionarios .card-glass > .d-flex.align-items-center.mb-3 .flex-grow-1,
    #section-estacionarios .card-glass > .d-flex.justify-content-between.align-items-center.mb-3 > div:first-child,
    #section-estacionarios .card-glass .pagination-info {
        width: 100%;
    }

    #section-estacionarios #plan-filter-order,
    #section-estacionarios #historial-filter-order,
    #section-estacionarios #historial-codigo-equipo,
    #section-estacionarios #historial-fecha-inicio,
    #section-estacionarios #historial-fecha-fin {
        width: 100% !important;
    }

    #section-estacionarios .btn-dashboard-premium {
        width: 100%;
        margin-left: 0 !important;
        justify-content: center;
    }

    .modal {
        padding: 12px;
        align-items: flex-start;
        overflow-y: auto;
    }

    .modal-clean .modal-content,
    #modal-pauta .modal-content,
    .mina-pauta-modal-content {
        max-height: calc(100vh - 24px) !important;
    }

    .modal-clean .modal-body {
        max-height: calc(100vh - 150px);
        overflow-y: auto;
    }

    .stat-grid-4,
    .stat-grid-3 {
        grid-template-columns: 1fr;
    }
}


.badge-info {
    background: rgba(14, 116, 144, 0.15);
    color: #0f766e;
}


.mina-equipo-detail-hero {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
    border: 1px solid #d9e4ef;
    margin-bottom: 18px;
}

.mina-equipo-detail-kicker {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.mina-equipo-detail-hero h3 {
    margin: 0 0 6px;
}

.mina-equipo-detail-hero p {
    margin: 0;
    color: #64748b;
}

.mina-equipo-detail-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.mina-equipo-detail-panel {
    display: none;
}

.mina-equipo-detail-panel.active {
    display: block;
}

.mina-equipo-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.mina-equipo-detail-card {
    background: #f8fafc;
    border: 1px solid #dbe4ee;
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mina-equipo-detail-card span {
    font-size: 0.78rem;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
}

.mina-equipo-detail-card strong {
    color: #0f2d4f;
}

.mina-equipo-detail-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mina-equipo-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #dbe4ee;
    background: #ffffff;
}

.mina-equipo-detail-item div:first-child {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mina-equipo-detail-item span {
    color: #64748b;
    font-size: 0.9rem;
}

.mina-equipo-components-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.mina-equipo-components-toolbar-main {
    min-width: 0;
}

.mina-equipo-components-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.mina-equipo-components-toolbar-actions .form-control {
    min-width: 250px;
}

.btn-outline-primary {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.btn-outline-primary:hover {
    background: #dbeafe;
    color: #1e40af;
}

.mina-equipo-components-toolbar h4 {
    margin: 0 0 6px;
    color: #0f2d4f;
}

.mina-equipo-components-toolbar p {
    margin: 0;
    color: #64748b;
}

.mina-componentes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.mina-componentes-scroll {
    max-height: 62vh;
    overflow-y: auto;
    padding-right: 6px;
}

.mina-componente-card {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 14px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid #dbe4ee;
    background: #fff;
}

.mina-componente-image {
    width: 160px;
    height: 160px;
    border-radius: 14px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #dbe4ee;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mina-componente-image-button {
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.mina-componente-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mina-componente-image-empty {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.85rem;
}

.mina-componente-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mina-componente-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.mina-componente-head strong {
    display: block;
    color: #0f2d4f;
    margin-bottom: 4px;
}

.mina-componente-head span {
    color: #64748b;
    font-size: 0.9rem;
}

.mina-componente-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mina-componente-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 0.82rem;
    font-weight: 600;
}

.mina-componente-body p {
    margin: 0;
    color: #475569;
}

.mina-componente-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mina-componente-upload-btn {
    position: relative;
    overflow: hidden;
    margin: 0;
}

.mina-componente-upload-btn input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.mina-componente-trace-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 18px;
}

.mina-componente-trace-card {
    border: 1px solid #dbe4ee;
    border-radius: 16px;
    background: #fff;
    padding: 18px;
}

.mina-componente-trace-card h4 {
    margin: 0 0 14px;
    color: #0f2d4f;
}

.mina-componente-trace-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.mina-componente-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mina-componente-gallery-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    border: 1px solid #dbe4ee;
    border-radius: 14px;
    background: #f8fafc;
    cursor: pointer;
    text-align: left;
}

.mina-componente-gallery-preview {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    text-align: left;
}

.mina-componente-gallery-item.is-primary {
    border-color: #60a5fa;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.mina-componente-gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    background: #fff;
}

.mina-componente-gallery-item span {
    color: #475569;
    font-size: 0.84rem;
    font-weight: 600;
}

.mina-componente-gallery-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.mina-componente-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 58vh;
    overflow-y: auto;
    padding-right: 4px;
}

.mina-componente-changes-scroll {
    max-height: 62vh;
    overflow-y: auto;
    padding-right: 6px;
}

.mina-componente-history-item {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 14px;
    background: #f8fafc;
}

.mina-componente-history-item.is-operational {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.mina-componente-history-item strong {
    display: block;
    color: #0f2d4f;
    margin-bottom: 6px;
}

.mina-componente-history-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.mina-componente-history-item p {
    margin: 0 0 8px;
    color: #475569;
    line-height: 1.45;
}

.mina-componente-history-item small {
    display: block;
    margin: 0 0 8px;
    color: #64748b;
    font-size: 0.82rem;
}

.mina-componente-history-item span {
    color: #64748b;
    font-size: 0.82rem;
}

.mina-componente-preview-shell {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}

.mina-componente-preview-shell img {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 16px;
    border: 1px solid #dbe4ee;
    background: #f8fafc;
}

.mina-componente-preview-caption {
    margin: 0;
    color: #64748b;
    font-size: 0.92rem;
    text-align: center;
}

@media (max-width: 1200px) {
    .mina-equipo-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mina-componentes-grid {
        grid-template-columns: 1fr;
    }

    .mina-componente-trace-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .sidebar-header h2 {
        font-size: 1.05rem;
    }

    .sidebar-header p {
        font-size: 0.75rem;
    }

    .content-wrapper {
        padding: 12px;
    }

    .card-glass {
        padding: 14px;
        border-radius: 10px;
    }

.topbar-user {
    gap: 8px;
}

.mina-componente-preview-shell {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}

.mina-componente-preview-shell img {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 16px;
    border: 1px solid #dbe4ee;
    background: #f8fafc;
}

.mina-componente-preview-caption {
    margin: 0;
    color: #64748b;
    font-size: 0.92rem;
    text-align: center;
}

    .topbar-user-avatar {
        width: 40px;
        height: 40px;
    }

    .btn,
    button,
    input,
    select,
    textarea {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .mina-equipo-detail-hero {
        flex-direction: column;
    }

    .mina-equipo-detail-grid {
        grid-template-columns: 1fr;
    }

    .mina-equipo-components-toolbar,
    .mina-componente-card {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .mina-componente-image {
        width: 100%;
        height: 220px;
    }

}
