:root {
    --bg-dark: #111827;
    --bg-dark-accent: #1f2937;
    --primary-orange: #f97316;
    --primary-orange-hover: #fb923c;
    --text-light: #e5e7eb;
    --text-muted: #9ca3af;
    --border-color: #374151;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #eab308;
    --sidebar-width: 260px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-size: 16px;
}

@media (min-width: 1280px) {
    body.web-desktop-compact {
        zoom: 0.93;
        --sidebar-width: 236px;
    }

    body.web-desktop-compact #main-content {
        padding: 1rem 1rem 64px 1rem;
    }

    body.web-desktop-compact #sidebar {
        gap: 0.8rem;
        padding: 1.1rem 0.85rem;
    }

    body.web-desktop-compact .section-header {
        margin-bottom: 1rem;
    }

    body.web-desktop-compact .card,
    body.web-desktop-compact .modal-header,
    body.web-desktop-compact .report-builder-grid,
    body.web-desktop-compact .report-signatures,
    body.web-desktop-compact .report-received-body,
    body.web-desktop-compact .report-modal-content .equipment-card-header,
    body.web-desktop-compact .report-modal-content .equipment-card-body {
        padding: 0.82rem;
    }

    body.web-desktop-compact .dashboard-wrapper,
    body.web-desktop-compact .dashboard-metrics-grid,
    body.web-desktop-compact .dashboard-analytics-grid,
    body.web-desktop-compact .dashboard-bottom-grid,
    body.web-desktop-compact .report-builder-body,
    body.web-desktop-compact .report-builder-grid,
    body.web-desktop-compact .report-modal-content .equipment-fields,
    body.web-desktop-compact .report-modal-content .equipment-fields-row-compact,
    body.web-desktop-compact .form-grid,
    body.web-desktop-compact .equipment-form-grid {
        gap: 0.75rem;
    }

    body.web-desktop-compact .modal-content {
        width: min(980px, calc(100% - 1.25rem));
        height: 92vh;
        max-height: 92vh;
    }

    body.web-desktop-compact .report-modal-content {
        width: min(1120px, calc(100% - 1rem));
    }

    body.web-desktop-compact .report-builder-field input,
    body.web-desktop-compact .report-builder-field select,
    body.web-desktop-compact .report-builder-field textarea,
    body.web-desktop-compact .report-material-row input,
    body.web-desktop-compact .report-material-row select,
    body.web-desktop-compact .form-group input,
    body.web-desktop-compact .form-group textarea,
    body.web-desktop-compact .form-group select {
        padding: 0.72rem 0.82rem;
        font-size: 0.9rem;
    }

    body.web-desktop-compact .report-signature-canvas-wrap canvas {
        height: 118px;
    }

    body.web-desktop-compact .report-chip {
        padding: 0.55rem 0.88rem;
        font-size: 0.82rem;
    }
}

body.app-not-authenticated #bottom-nav {
    display: none !important;
}

body.apk-native #logout-btn-mobile {
    display: none !important;
}

.hidden {
    display: none !important;
}

.global-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(2, 6, 23, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.global-loading-box {
    min-width: 220px;
    max-width: 320px;
    border-radius: 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.95);
    padding: 1rem 1.2rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
}

.global-loading-spinner {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 3px solid rgba(148, 163, 184, 0.35);
    border-top-color: #f97316;
    animation: global-spin 0.8s linear infinite;
}

#global-loading-text {
    margin: 0;
    font-size: 0.9rem;
    color: #e5e7eb;
    text-align: center;
}

body.loading-open {
    overflow: hidden;
}

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

#login-section {
    position: relative;
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: hidden;
}

.login-background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.login-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-panel {
    width: 100%;
    max-width: 28rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background-color: rgba(31, 41, 55, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.login-header {
    text-align: center;
}

.login-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    margin: 0;
}

#login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

#login-form label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

#login-form input {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    color: white;
    transition: all 0.2s ease-in-out;
}

#login-form input:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.4);
}

#login-form button {
    width: 100%;
    padding: 0.875rem 1rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    background-color: var(--primary-orange);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 15px -1px rgba(0, 0, 0, 0.3);
}

#login-form .login-biometric-btn {
    width: auto;
    min-width: 0;
    margin: 0.9rem auto 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    box-shadow: none;
}

.login-biometric-shell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem;
}

.login-biometric-scanner {
    position: relative;
    width: 5.2rem;
    height: 5.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.login-biometric-orbit {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    border: 1px solid rgba(249, 115, 22, 0.22);
}

.login-biometric-orbit-a {
    inset: 0;
    animation: biometric-spin 5.2s linear infinite;
}

.login-biometric-orbit-b {
    inset: 0.42rem;
    border-style: dashed;
    border-color: rgba(249, 115, 22, 0.28);
    animation: biometric-spin-reverse 7.6s linear infinite;
}

.login-biometric-core {
    position: relative;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(249, 115, 22, 0.34);
    background:
        radial-gradient(circle at 50% 50%, rgba(249, 115, 22, 0.28), rgba(249, 115, 22, 0.08) 58%, transparent 76%),
        transparent;
    box-shadow:
        0 0 0 1px rgba(249, 115, 22, 0.08),
        0 0 20px rgba(249, 115, 22, 0.16);
}

.login-biometric-scanline {
    position: absolute;
    left: 18%;
    width: 64%;
    height: 0.14rem;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.96), transparent);
    opacity: 0.1;
    transform: translateY(-0.72rem);
}

.login-biometric-icon {
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.login-biometric-icon-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(249, 115, 22, 0.32));
}

#login-form .login-biometric-btn[data-state="ready"] .login-biometric-core {
    box-shadow:
        0 0 0 1px rgba(249, 115, 22, 0.1),
        0 0 28px rgba(249, 115, 22, 0.2);
}

#login-form .login-biometric-btn[data-state="scanning"] .login-biometric-orbit-a {
    animation-duration: 2.6s;
}

#login-form .login-biometric-btn[data-state="scanning"] .login-biometric-orbit-b {
    animation-duration: 3.4s;
}

#login-form .login-biometric-btn[data-state="scanning"] .login-biometric-scanline {
    opacity: 1;
    animation: biometric-scan 1.2s ease-in-out infinite;
}

#login-form .login-biometric-btn[data-state="success"] {
    color: rgba(34, 197, 94, 0.92);
}

#login-form .login-biometric-btn[data-state="success"] .login-biometric-core,
#login-form .login-biometric-btn[data-state="success"] .login-biometric-icon {
    box-shadow:
        0 0 0 1px rgba(34, 197, 94, 0.12),
        0 0 28px rgba(34, 197, 94, 0.24);
}

#login-form .login-biometric-btn[data-state="error"] {
    color: rgba(239, 68, 68, 0.92);
}

#login-form .login-biometric-btn[data-state="locked"] .login-biometric-shell {
    opacity: 0.68;
}

#login-form .login-biometric-btn:disabled {
    cursor: not-allowed;
    transform: none;
}

#login-biometric-status {
    display: none;
    margin-top: 0.1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 18rem;
    margin-inline: auto;
}

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

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

@keyframes biometric-scan {
    0%,
    100% {
        transform: translateY(-1rem);
    }

    50% {
        transform: translateY(1rem);
    }
}

#login-form button:hover {
    background-color: var(--primary-orange-hover);
    transform: translateY(-2px);
}

#main-app {
    min-height: 100vh;
    position: relative;
}

#sidebar {
    width: var(--sidebar-width);
    background: rgba(17, 24, 39, 0.95);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 1rem;
    position: fixed;
    inset: 0 auto 0 0;
    transform: translateX(-110%);
    transition: transform 0.3s ease;
    z-index: 2200;
    overflow-y: auto;
}

body.sidebar-visible #sidebar {
    transform: translateX(0);
}

body.sidebar-visible::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 2100;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.sidebar-brand img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: contain;
    background: rgba(15, 23, 42, 0.8);
    padding: 4px;
}

.sidebar-brand strong {
    display: block;
    color: var(--text-light);
    font-size: 1rem;
}

#sidebar nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: 0.95rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover {
    color: var(--text-light);
    background-color: rgba(148, 163, 184, 0.08);
}

.nav-link.active {
    color: var(--text-light);
    background-color: rgba(249, 115, 22, 0.14);
}

.nav-link .nav-icon {
    width: 34px;
    height: 34px;
    border-radius: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-muted);
    transition: inherit;
}

.nav-link.active .nav-icon {
    background: rgba(249, 115, 22, 0.2);
    color: var(--primary-orange);
}

.nav-link .nav-icon svg {
    width: 22px;
    height: 22px;
}

.nav-link .nav-label {
    flex: 1;
}

#main-content {
    width: 100%;
    padding: 1.5rem 1.5rem 80px 1.5rem;
    overflow-y: auto;
}

#dashboard-view {
    color: var(--text-light);
}

.dashboard-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dashboard-kpi-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.75rem;
}

.dashboard-kpi-item {
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.92));
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dashboard-kpi-item.dashboard-kpi-alert {
    border-color: rgba(239, 68, 68, 0.4);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(15, 23, 42, 0.92));
}

.dashboard-kpi-item.dashboard-kpi-alert strong {
    color: var(--danger-color);
}

.dashboard-kpi-item strong {
    color: var(--text-light);
    font-size: 0.96rem;
}

.dashboard-kpi-item small,
.dashboard-chart-caption {
    color: var(--text-muted);
    line-height: 1.45;
}

.dashboard-kpi-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-orange);
}

.dashboard-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: 1.25rem;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(14, 116, 144, 0.12));
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.dashboard-intro h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.dashboard-intro p {
    margin: 0.35rem 0 0 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

#dashboard-refresh-btn {
    border-radius: 999px;
    padding: 0.65rem 1.4rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: var(--text-light);
    background: rgba(15, 23, 42, 0.35);
    transition: all 0.2s ease;
}

#dashboard-refresh-btn:hover,
#dashboard-refresh-btn:focus-visible {
    background: rgba(249, 115, 22, 0.18);
    border-color: rgba(249, 115, 22, 0.35);
    cursor: pointer;
}

.dashboard-metrics-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.dashboard-metric-card {
    background: rgba(24, 32, 53, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 1.2rem;
    padding: 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    min-height: 128px;
    position: relative;
    overflow: hidden;
}

.dashboard-metric-card::after {
    content: "";
    position: absolute;
    top: -40px;
    right: -60px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.12) 0%, transparent 70%);
    z-index: 0;
}

.dashboard-metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1;
}

.dashboard-metric-label {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(203, 213, 225, 0.9);
    font-weight: 600;
}

.dashboard-metric-card strong {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1;
    z-index: 1;
}

.dashboard-metric-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    z-index: 1;
}

.dashboard-analytics-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.dashboard-card {
    background: rgba(17, 24, 39, 0.88);
    border-radius: 1.2rem;
    border: 1px solid rgba(148, 163, 184, 0.12);
    display: flex;
    flex-direction: column;
    min-height: 200px;
    overflow: hidden;
}

.dashboard-card-header {
    padding: 1.1rem 1.25rem 0.6rem 1.25rem;
}

.dashboard-card-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.92);
}

.dashboard-card-body {
    flex: 1;
    padding: 0 1.25rem 1.25rem 1.25rem;
}

.dashboard-card .dashboard-card-body canvas {
    max-height: 220px;
}

.dashboard-card-gauge .dashboard-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.dashboard-gauge-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.dashboard-gauge {
    --gauge-value: 0%;
    width: 180px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: conic-gradient(var(--primary-orange) var(--gauge-value), rgba(148, 163, 184, 0.14) var(--gauge-value));
    position: relative;
    display: grid;
    place-items: center;
}

.dashboard-gauge::before {
    content: "";
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.92);
}

.dashboard-gauge-inner {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-light);
}

.dashboard-gauge-inner span {
    font-size: 2rem;
    font-weight: 700;
}

.dashboard-gauge-inner small {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.dashboard-gauge-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
}

.dashboard-gauge-meta p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
}

.dashboard-gauge-meta strong {
    display: block;
    text-align: center;
    margin-top: 0.3rem;
    font-size: 1.35rem;
}

.dashboard-bottom-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    align-items: start;
}

.dashboard-card-tasks {
    grid-column: span 2;
    min-height: 220px;
}

@media (max-width: 1024px) {
    .dashboard-card-tasks {
        grid-column: span 1;
    }
}

.dashboard-top-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 230px;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.dashboard-top-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0.85rem;
    border-radius: 1rem;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.dashboard-top-item-info {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.dashboard-top-item-rank {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--text-light);
}

.dashboard-rank-1 {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.7), rgba(249, 115, 22, 0.5));
}

.dashboard-rank-2 {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.4), rgba(99, 102, 241, 0.35));
}

.dashboard-rank-3 {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.4), rgba(34, 197, 94, 0.3));
}

.dashboard-top-item-details span {
    display: block;
}

.dashboard-top-item-name {
    font-size: 0.95rem;
    font-weight: 600;
}

.dashboard-top-item-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.dashboard-top-item-score {
    min-width: 72px;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-light);
}

.dashboard-table-wrapper {
    overflow-x: auto;
    max-height: 235px;
    overflow-y: auto;
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 0.9rem;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.dashboard-table thead tr {
    text-align: left;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
}

.dashboard-table thead {
    position: sticky;
    top: 0;
    background: rgba(15, 23, 42, 0.96);
    z-index: 1;
}

.dashboard-table th,
.dashboard-table td {
    padding: 0.62rem 0.7rem;
    border-bottom: 1px solid rgba(71, 85, 105, 0.35);
    white-space: nowrap;
}

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

.dashboard-empty {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.dashboard-card-tasks .dashboard-card-body {
    padding-top: 0.15rem;
}

.dashboard-card-span-2 {
    grid-column: span 2;
}

.dashboard-card-tech-hours {
    min-height: 520px;
}

.dashboard-tech-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dashboard-tech-period,
.dashboard-tech-search {
    font: inherit;
    color: var(--text-light);
    background: rgba(30, 41, 59, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 0.8rem;
    outline: none;
}

.dashboard-tech-period {
    min-width: 144px;
    padding: 0.45rem 0.75rem;
    font-size: 0.82rem;
}

.dashboard-tech-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1rem;
    min-height: 0;
}

.dashboard-tech-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 1rem;
    padding: 0.95rem;
    min-height: 0;
}

.dashboard-tech-sidebar-header {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.dashboard-tech-label,
.dashboard-tech-stat-label {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.dashboard-tech-search {
    width: 100%;
    padding: 0.55rem 0.75rem;
    font-size: 0.82rem;
}

.dashboard-tech-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem;
    background: rgba(30, 41, 59, 0.75);
    border-radius: 0.9rem;
    padding: 0.25rem;
}

.dashboard-tech-tab {
    border: none;
    background: transparent;
    color: var(--text-muted);
    padding: 0.42rem 0.55rem;
    border-radius: 0.7rem;
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
}

.dashboard-tech-tab.active {
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-light);
}

.dashboard-tech-list {
    flex: 1;
    overflow-y: auto;
    min-height: 220px;
    padding-right: 0.2rem;
}

.dashboard-tech-zone {
    margin-bottom: 0.5rem;
}

.dashboard-tech-zone-header {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0.25rem;
    cursor: pointer;
    text-align: left;
}

.dashboard-tech-zone-name {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 600;
}

.dashboard-tech-zone-badge,
.dashboard-tech-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}

.dashboard-tech-zone-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-left: 1.3rem;
}

.dashboard-tech-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.48rem 0.35rem;
    border-radius: 0.8rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.dashboard-tech-item:hover,
.dashboard-tech-item.is-selected {
    background: rgba(30, 41, 59, 0.72);
}

.dashboard-tech-item input {
    accent-color: var(--primary-orange);
}

.dashboard-tech-item-nested {
    padding-left: 0;
}

.dashboard-tech-color,
.dashboard-tech-legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dashboard-tech-name {
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.84rem;
}

.dashboard-tech-item.is-selected .dashboard-tech-name {
    color: var(--text-light);
    font-weight: 600;
}

.dashboard-tech-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.45rem;
}

.dashboard-tech-actions .btn {
    padding: 0.42rem 0.55rem;
    font-size: 0.74rem;
}

.dashboard-tech-main {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    min-width: 0;
}

.dashboard-tech-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.dashboard-tech-stat {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 1rem;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.dashboard-tech-stat strong {
    color: var(--text-light);
    font-size: 1.45rem;
    line-height: 1.1;
}

.dashboard-tech-stat small {
    color: var(--text-muted);
}

.dashboard-tech-chart-card {
    flex: 1;
    min-height: 0;
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 1.1rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.dashboard-tech-chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.dashboard-tech-chart-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
}

.dashboard-tech-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem;
}

.dashboard-tech-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-muted);
    font-size: 0.76rem;
}

.dashboard-tech-chart-wrap {
    position: relative;
    flex: 1;
    min-height: 280px;
}

.dashboard-tech-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: rgba(15, 23, 42, 0.3);
    border-radius: 0.8rem;
}

.dashboard-priority {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.dashboard-priority-high {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
}

.dashboard-priority-medium {
    background: rgba(234, 179, 8, 0.18);
    color: #fde68a;
}

.dashboard-priority-low {
    background: rgba(34, 197, 94, 0.18);
    color: #bbf7d0;
}

.dashboard-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.dashboard-status-pending {
    background: rgba(148, 163, 184, 0.18);
    color: #cbd5e1;
}

.dashboard-status-progress {
    background: rgba(59, 130, 246, 0.18);
    color: #bfdbfe;
}

.dashboard-status-closed {
    background: rgba(34, 197, 94, 0.18);
    color: #bbf7d0;
}

.dashboard-status-cancelled {
    background: rgba(239, 68, 68, 0.18);
    color: #fecaca;
}

.dashboard-status-viewed {
    background: rgba(249, 115, 22, 0.18);
    color: #fdba74;
}

@media (max-width: 900px) {
    .dashboard-card-span-2 {
        grid-column: span 1;
    }

    .dashboard-tech-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-tech-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-tech-chart-header {
        flex-direction: column;
    }

    .dashboard-tech-legend {
        justify-content: flex-start;
    }

    .dashboard-card-gauge .dashboard-card-body {
        padding-top: 1.5rem;
    }

    .dashboard-gauge-meta {
        gap: 1.5rem;
    }
}

@media (max-width: 640px) {
    .dashboard-wrapper {
        gap: 0.8rem;
    }

    .dashboard-metrics-grid,
    .dashboard-analytics-grid,
    .dashboard-bottom-grid {
        grid-template-columns: 1fr;
    }

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

    .dashboard-metric-card {
        min-height: auto;
    }

    .dashboard-card-header,
    .dashboard-card-body {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    .dashboard-table thead {
        display: none;
    }

    .dashboard-table,
    .dashboard-table tbody,
    .dashboard-table tr,
    .dashboard-table td {
        display: block;
        width: 100%;
    }

    .dashboard-table tbody tr {
        background: rgba(30, 41, 59, 0.45);
        border: 1px solid rgba(148, 163, 184, 0.22);
        border-radius: 0.85rem;
        margin-bottom: 0.75rem;
        padding: 0.35rem 0.7rem;
    }

    .dashboard-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.7rem;
        padding: 0.5rem 0;
        border-bottom: 1px dashed rgba(148, 163, 184, 0.2);
    }

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

    .dashboard-table td::before {
        content: attr(data-label);
        font-size: 0.68rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--text-muted);
        font-weight: 600;
    }

    .dashboard-intro {
        flex-direction: column;
        align-items: flex-start;
    }

    #dashboard-refresh-btn {
        width: 100%;
        text-align: center;
    }

    .dashboard-gauge {
        width: 150px;
    }
}

#bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(65px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(31, 41, 55, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    gap: 0.5rem;
}

.nav-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    background: none;
    border: none;
    padding: 0 12px;
    height: 100%;
    font-size: 11px;
    flex-grow: 1;
    transition: all 0.2s;
    position: relative;
}

.nav-button-inner {
    padding: 4px 12px;
    border-radius: 9999px;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-button-inner svg {
    width: 20px;
    height: 20px;
}

.nav-button.active {
    color: white;
}

.nav-button.active .nav-button-inner {
    background-color: rgba(249, 115, 22, 0.15);
}

.nav-button svg {
    width: 24px;
    height: 24px;
}

.nav-button-logout {
    flex-grow: 0;
    min-width: 72px;
    color: #fca5a5;
}

.nav-button-logout .nav-button-inner {
    background-color: rgba(239, 68, 68, 0.16);
}

.nav-button-logout:hover .nav-button-inner,
.nav-button-logout:focus-visible .nav-button-inner {
    background-color: rgba(239, 68, 68, 0.25);
}

.nav-button-add {
    position: absolute;
    top: -22px;
    width: 56px;
    height: 56px;
    background: var(--primary-orange);
    color: white;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 30px -12px rgba(249, 115, 22, 0.6);
}

.nav-button-add svg {
    width: 28px;
    height: 28px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: 0.95rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover {
    color: var(--text-light);
    background-color: rgba(148, 163, 184, 0.08);
}

.nav-link.active {
    color: var(--text-light);
    background-color: rgba(249, 115, 22, 0.14);
}

.nav-link .nav-icon {
    width: 34px;
    height: 34px;
    border-radius: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(148, 163, 184, 0.12);
    color: inherit;
    transition: inherit;
}

.nav-link.active .nav-icon {
    background: rgba(249, 115, 22, 0.2);
    color: var(--primary-orange);
}

.nav-link .nav-icon svg {
    width: 20px;
    height: 20px;
}

.nav-link .nav-label {
    flex: 1;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-header-compact {
    margin: 0.5rem 0 0.75rem;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.section-title-block {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.section-header h2 {
    margin: 0;
}

.section-subtitle {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.header-actions {
    display: inline-flex;
    gap: 0.75rem;
    align-items: center;
}

.notification-wrapper {
    position: relative;
}

.notification-btn {
    position: relative;
    background: rgba(26, 35, 50, 0.85);
}

.notification-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.notification-count {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    background: var(--danger-color);
    color: #fff;
    border-radius: 999px;
    min-width: 1.15rem;
    height: 1.15rem;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.25rem;
}

.notification-count.hidden {
    display: none;
}

.notifications-panel {
    position: absolute;
    top: 2.8rem;
    right: 0;
    width: 320px;
    max-height: 420px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(14px);
    z-index: 50;
}

.notifications-panel.hidden {
    display: none;
}

.notification-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.85rem;
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.notification-item strong {
    color: var(--text-light);
    font-size: 0.9rem;
}

.notification-item span {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.notifications-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 0.75rem 0;
    font-size: 0.85rem;
}

.btn-icon {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.reports-shell {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.reports-status-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.reports-status-filter {
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.7);
    color: var(--text-muted);
    border-radius: 999px;
    padding: 0.48rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reports-status-filter:hover,
.reports-status-filter:focus-visible {
    color: var(--text-light);
    border-color: rgba(249, 115, 22, 0.42);
}

.reports-status-filter.active {
    background: rgba(249, 115, 22, 0.14);
    border-color: rgba(249, 115, 22, 0.36);
    color: #fdba74;
    box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.14) inset;
}

.reports-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.35rem;
    border-radius: 1.3rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background:
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.18), transparent 38%),
        linear-gradient(180deg, rgba(12, 21, 38, 0.96), rgba(15, 23, 42, 0.9));
}

.reports-hero-copy h3 {
    margin: 0;
}

.reports-kicker {
    margin: 0 0 0.3rem;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.82);
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}

.report-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.15rem 1.2rem;
    border-radius: 1.15rem;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background:
        linear-gradient(180deg, rgba(13, 23, 40, 0.98), rgba(17, 27, 43, 0.94));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.report-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.report-card-heading {
    min-width: 0;
    flex: 1 1 auto;
}

.report-card-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.82);
}

.report-card-kicker::before {
    content: "";
    width: 0.44rem;
    height: 0.44rem;
    border-radius: 999px;
    background: var(--primary-orange);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.report-card-info h4 {
    margin: 0;
    font-size: 1rem;
    font-family: "Syne", sans-serif;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.report-card-info p {
    margin: 0.45rem 0 0;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.report-card-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}

.report-card-badge,
.report-card-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.36rem 0.72rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(30, 41, 59, 0.72);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.report-card-status.status-abierto {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.28);
}

.report-card-status.status-en-progreso {
    color: #fde68a;
    background: rgba(250, 204, 21, 0.14);
    border-color: rgba(250, 204, 21, 0.28);
}

.report-card-status.status-cerrado {
    color: #86efac;
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.28);
}

.report-card-status.status-cancelado {
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.24);
}

.report-card-badge.priority-baja {
    color: #86efac;
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.28);
}

.report-card-badge.priority-media {
    color: #fde68a;
    background: rgba(250, 204, 21, 0.12);
    border-color: rgba(250, 204, 21, 0.28);
}

.report-card-badge.priority-alta {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.28);
}

.report-card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.report-card-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    padding: 0.72rem 0.8rem;
    border-radius: 0.9rem;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.08);
}

.report-card-meta-item span {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.78);
}

.report-card-meta-item strong {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-light);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.report-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.45rem;
}

@media (max-width: 720px) {
    .reports-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .reports-hero .btn {
        width: 100%;
    }

    .reports-status-filters {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-card-meta {
        grid-template-columns: 1fr;
    }

    .report-card-header {
        flex-direction: column;
    }

    .report-card-badges {
        justify-content: flex-start;
    }
}

.report-card-actions-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.report-card-actions-btn svg {
    width: 20px;
    height: 20px;
}

.actions-menu {
    position: absolute;
    top: 50px;
    right: 20px;
    background: #374151;
    border-radius: 0.5rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    z-index: 10;
    overflow: hidden;
}

.actions-menu button {
    background: none;
    border: none;
    color: var(--text-light);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.actions-menu button:hover {
    background: var(--primary-orange);
}

.actions-menu button svg {
    width: 18px;
    height: 18px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    z-index: 9999;
    transition: opacity 0.3s;
}

.modal-content {
    background: var(--bg-dark-accent);
    width: min(900px, calc(100% - 2rem));
    height: 95vh;
    max-height: 95vh;
    margin: auto;
    display: flex;
    flex-direction: column;
    border-radius: 1rem;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.modal-overlay.visible .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
}

.modal-close-btn {
    margin-left: auto;
    cursor: pointer;
}

.modal-body {
    padding: 1rem 1.25rem;
    overflow-y: auto;
    flex: 1;
    padding-bottom: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: var(--bg-dark-accent);
    box-shadow: 0 -8px 16px rgba(0, 0, 0, 0.35);
    position: sticky;
    bottom: 0;
}

#task-report-link-modal .modal-content {
    width: min(560px, calc(100% - 1.1rem));
    height: auto;
    max-height: 88vh;
}

.task-report-help {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.task-report-help strong {
    color: var(--text-light);
}

#task-report-link-select {
    width: 100%;
    padding: 0.72rem 0.9rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.75);
    color: var(--text-light);
    font-size: 0.9rem;
}

#task-report-link-select:focus {
    outline: none;
    border-color: rgba(249, 115, 22, 0.6);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

.task-report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    justify-content: flex-end;
}

#report-form,
#safety-form {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.report-modal-content {
    width: min(1024px, calc(100% - 1.5rem));
    background: linear-gradient(180deg, rgba(9, 16, 30, 0.98), rgba(12, 21, 38, 0.96));
    font-family: "DM Sans", sans-serif;
}

.report-modal-header {
    padding-bottom: 1rem;
    gap: 1rem;
}

.report-modal-heading {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.report-modal-heading h3 {
    margin: 0;
    font-family: "Syne", sans-serif;
    letter-spacing: -0.02em;
}

.report-modal-heading .muted-text {
    display: block;
    margin-top: 0.28rem;
    max-width: 34rem;
}

.report-order-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.38rem 0.9rem;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.12);
    border: 1px solid rgba(249, 115, 22, 0.32);
    color: var(--primary-orange);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.report-progress-wrap {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    padding: 0 1.25rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.report-progress-step {
    flex: 1;
    height: 0.28rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
}

.report-progress-step.is-done {
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.9), rgba(251, 146, 60, 0.8));
}

.report-progress-step.is-active {
    background: rgba(249, 115, 22, 0.42);
}

.report-builder-form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.report-builder-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1rem;
    min-height: 0;
    overflow-y: auto;
}

.report-builder-section,
.report-received-card {
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 1rem;
    overflow: hidden;
    flex: 0 0 auto;
}

.report-builder-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1rem 0.95rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.report-builder-section-head h4 {
    margin: 0.18rem 0 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    font-family: "Syne", sans-serif;
}

.report-section-kicker {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.8);
}

.report-section-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.75rem;
    padding: 0.32rem 0.78rem;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.14);
    border: 1px solid rgba(249, 115, 22, 0.24);
    color: #fbbf24;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.report-section-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.report-builder-grid {
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

.report-builder-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-builder-field {
    display: flex;
    flex-direction: column;
    gap: 0.46rem;
    min-width: 0;
}

.report-builder-field-full {
    grid-column: 1 / -1;
}

.report-builder-field span {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.report-builder-field input,
.report-builder-field select,
.report-builder-field textarea,
.report-material-row input,
.report-material-row select {
    width: 100%;
    background: rgba(30, 41, 59, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 0.9rem;
    padding: 0.88rem 0.98rem;
    color: var(--text-light);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.report-builder-field textarea {
    min-height: 6.25rem;
    resize: vertical;
}

.report-builder-field input:focus,
.report-builder-field select:focus,
.report-builder-field textarea:focus,
.report-material-row input:focus,
.report-material-row select:focus {
    outline: none;
    border-color: rgba(249, 115, 22, 0.65);
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.18);
}

.report-inline-actions {
    display: flex;
    align-items: stretch;
    gap: 0.7rem;
}

.report-inline-actions input {
    flex: 1;
}

.report-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.report-chip {
    appearance: none;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(30, 41, 59, 0.76);
    color: var(--text-muted);
    border-radius: 999px;
    padding: 0.66rem 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.report-chip:hover,
.report-chip:focus-visible {
    border-color: rgba(249, 115, 22, 0.45);
    color: var(--text-light);
    outline: none;
}

.report-chip.is-selected {
    background: rgba(249, 115, 22, 0.14);
    border-color: rgba(249, 115, 22, 0.45);
    color: #fed7aa;
    box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.14);
}

.report-chip-success.is-selected {
    background: rgba(34, 197, 94, 0.16);
    border-color: rgba(34, 197, 94, 0.42);
    color: #86efac;
}

.report-chip-warning.is-selected {
    background: rgba(250, 204, 21, 0.16);
    border-color: rgba(250, 204, 21, 0.42);
    color: #fde68a;
}

.report-chip-danger.is-selected {
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.42);
    color: #fca5a5;
}

.report-hours-group {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.report-hours-group input {
    width: 5.8rem;
    text-align: center;
}

.report-hours-group small,
.report-field-help {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.report-materials-list {
    display: flex;
    flex-direction: column;
    gap: 0.72rem;
    padding: 1rem 1rem 0.6rem;
}

.report-material-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 92px auto;
    gap: 0.7rem;
    align-items: end;
}

.report-material-row .report-builder-field {
    gap: 0.38rem;
}

.report-material-remove {
    align-self: stretch;
    min-width: 2.75rem;
    padding-inline: 0.8rem;
}

.report-add-inline-btn {
    margin: 0 1rem 1rem;
    align-self: flex-start;
}

.report-signatures {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.report-signature-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.report-signature-tab {
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(30, 41, 59, 0.72);
    color: var(--text-muted);
    border-radius: 0.9rem;
    padding: 0.8rem 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.report-signature-tab.is-active {
    background: rgba(249, 115, 22, 0.14);
    border-color: rgba(249, 115, 22, 0.45);
    color: #fff;
}

.report-signature-pane {
    display: none;
    flex-direction: column;
    gap: 0.9rem;
}

.report-signature-pane.is-active {
    display: flex;
}

.report-signature-canvas-wrap {
    border-radius: 1rem;
    border: 1px dashed rgba(148, 163, 184, 0.26);
    background: rgba(15, 23, 42, 0.72);
    overflow: hidden;
}

.report-signature-canvas-wrap.is-read-only {
    opacity: 0.92;
}

.report-signature-canvas-wrap canvas {
    width: 100%;
    height: 140px;
    display: block;
    touch-action: none;
    cursor: crosshair;
}

.report-signature-canvas-wrap.is-read-only canvas {
    cursor: default;
}

.report-signature-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.report-received-card {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.18);
}

.report-received-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.report-received-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 6rem;
    padding: 0.34rem 0.82rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.report-received-status.is-pending {
    background: rgba(250, 204, 21, 0.12);
    border: 1px solid rgba(250, 204, 21, 0.28);
    color: #fde68a;
}

.report-received-status.is-ready {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.28);
    color: #86efac;
}

.report-client-format-btn {
    align-self: flex-start;
}

.report-modal-footer {
    gap: 0.75rem;
    flex-wrap: wrap;
}

.report-modal-footer .btn-primary {
    flex: 1 1 14rem;
}

.report-modal-footer .btn-outline {
    flex: 0 1 auto;
}

.report-modal-content .equipment-card {
    padding: 0;
    overflow: hidden;
    background: rgba(10, 18, 34, 0.78);
}

.report-modal-content .equipment-card-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.report-modal-content .equipment-card-body {
    padding: 1rem;
}

.report-modal-content .equipment-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.report-modal-content .equipment-fields-report {
    grid-template-columns: 1fr;
    gap: 0.9rem;
}

.report-modal-content .equipment-fields-row-compact {
    display: grid;
    grid-template-columns: minmax(180px, 0.95fr) minmax(220px, 1.2fr) minmax(180px, 1fr);
    gap: 0.9rem;
    align-items: start;
}

.report-modal-content .equipment-field-compact {
    min-width: 0;
}

@media (max-width: 920px) {
    .report-builder-grid-two,
    .report-material-row,
    .equipment-fields-static-grid {
        grid-template-columns: 1fr;
    }

    .report-modal-content .equipment-fields {
        grid-template-columns: 1fr;
    }

    .report-modal-content .equipment-fields-row-compact {
        grid-template-columns: 1fr;
    }

    .report-inline-actions {
        flex-direction: column;
    }

    .report-modal-footer .btn-outline,
    .report-modal-footer .btn-primary {
        flex: 1 1 100%;
    }
}

@media (max-width: 640px) {
    .report-modal-content {
        width: min(100%, calc(100% - 0.5rem));
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 1rem 1rem 0 0;
    }

    .report-progress-wrap,
    .report-builder-body,
    .report-signatures,
    .report-materials-list,
    .report-received-body {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    .report-builder-section-head {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    .report-add-inline-btn {
        margin-left: 0.9rem;
        margin-right: 0.9rem;
    }

    .equipment-card-header {
        align-items: flex-start;
    }
}

.btn {
    padding: 0.7rem 1.25rem;
    border-radius: 0.85rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    letter-spacing: 0.01em;
    background: linear-gradient(135deg, var(--primary-orange) 0%, #ea6c0a 100%);
    color: #fff;
    border: 1px solid rgba(249, 115, 22, 0.5);
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.25), inset 0 1px 0 rgba(255,255,255,0.12);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.08) 0%, transparent 60%);
    pointer-events: none;
    border-radius: inherit;
}

.btn:hover,
.btn:focus-visible {
    background: linear-gradient(135deg, #fb923c 0%, var(--primary-orange) 100%);
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.4), inset 0 1px 0 rgba(255,255,255,0.15);
    transform: translateY(-2px);
    outline: none;
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(249, 115, 22, 0.3);
}

/* Variante secundaria / outline */
.btn-outline {
    background: rgba(249, 115, 22, 0.08);
    color: var(--primary-orange);
    border: 1px solid rgba(249, 115, 22, 0.4);
    box-shadow: none;
}

.btn-outline::after { display: none; }

.btn-outline:hover,
.btn-outline:focus-visible {
    background: rgba(249, 115, 22, 0.16);
    border-color: rgba(249, 115, 22, 0.65);
    color: #fff;
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

/* Variante ghost / neutra */
.btn-ghost {
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-muted);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: none;
}

.btn-ghost::after { display: none; }

.btn-ghost:hover,
.btn-ghost:focus-visible {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-light);
    border-color: rgba(148, 163, 184, 0.35);
    transform: translateY(-1px);
}

/* Variante peligro */
.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25), inset 0 1px 0 rgba(255,255,255,0.1);
}

.btn-danger:hover,
.btn-danger:focus-visible {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

/* Variante éxito */
.btn-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-color: rgba(34, 197, 94, 0.5);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.22), inset 0 1px 0 rgba(255,255,255,0.1);
}

.btn-success:hover,
.btn-success:focus-visible {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}

.card {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 1rem;
    padding: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

select option {
    background: #111827;
    color: #f8fafc;
}

.profile-form {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.85rem;
    background: rgba(15, 23, 42, 0.45);
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.85rem;
    margin-bottom: 1rem;
}

.simple-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.simple-table th,
.simple-table td {
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    text-align: left;
    font-size: 0.88rem;
}

.simple-table thead th {
    color: var(--text-muted);
    font-weight: 600;
    background: rgba(15, 23, 42, 0.7);
}

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

.btn-sm {
    padding: 0.4rem 0.65rem;
    font-size: 0.8rem;
}

.muted-text {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.badge-success {
    color: #86efac;
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.35);
}

.badge-warning {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.35);
}

.badge-danger {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.35);
}

.reportar-materiales-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.reportar-material-input {
    width: 100%;
}

.time-map-card {
    margin: 0.75rem 0 1rem;
    padding: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.85rem;
    background: rgba(15, 23, 42, 0.45);
}

.time-control-map {
    width: 100%;
    height: clamp(240px, 42vh, 360px);
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    overflow: hidden;
    touch-action: pan-y !important;
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.time-control-map.leaflet-container {
    touch-action: pan-y !important;
    z-index: 1;
    pointer-events: none;
}

.time-control-map .leaflet-pane,
.time-control-map .leaflet-top,
.time-control-map .leaflet-bottom,
.time-control-map .leaflet-control {
    z-index: 2 !important;
    pointer-events: none !important;
}

body.sidebar-visible .time-control-map,
body.sidebar-visible .time-control-map .leaflet-container,
body.sidebar-visible .time-control-map .leaflet-pane,
body.sidebar-visible .time-control-map .leaflet-control {
    pointer-events: none !important;
}

#time-control-geofence-status {
    margin-top: 0.6rem;
    font-weight: 600;
}

.time-control-top-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.time-control-top-actions .btn {
    min-width: 8.4rem;
    min-height: 2.9rem;
    border-radius: 999px;
    font-weight: 700;
    border-color: rgba(249, 115, 22, 0.28);
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.92), rgba(51, 65, 85, 0.68));
    color: #f8fafc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.time-control-top-actions .btn:hover,
.time-control-top-actions .btn:focus-visible {
    border-color: rgba(249, 115, 22, 0.52);
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(51, 65, 85, 0.86));
}

.time-main-action {
    margin: 1rem 0 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.time-main-button {
    width: 100%;
    min-height: 3.4rem;
    border-radius: 0.95rem;
    font-size: 1.02rem;
    font-weight: 700;
}

#time-next-action-status {
    display: block;
}

#time-history-modal .modal-content {
    width: min(1100px, calc(100% - 2rem));
    height: min(88vh, 760px);
    max-height: 88vh;
}

@media (max-width: 760px) {
    .time-control-top-actions {
        width: 100%;
        justify-content: stretch;
        gap: 0.7rem;
    }

    .time-control-top-actions .btn {
        flex: 1 1 0;
        min-width: 0;
    }

    .time-main-button {
        font-size: 0.96rem;
    }
}

.equipment-empty {
    border: 1px dashed var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    background: rgba(17, 24, 39, 0.4);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.equipment-empty-icon {
    font-size: 2rem;
    opacity: 0.6;
}

.equipment-card {
    background: rgba(17, 24, 39, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 1rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.equipment-card+.equipment-card {
    margin-top: 1rem;
}

.equipment-card:hover {
    border-color: var(--primary-orange);
    transform: translateY(-2px);
}

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

.equipment-card-title-stack {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.equipment-card-title {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.equipment-severity-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.85rem;
    padding: 0.24rem 0.72rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.equipment-severity-baja {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.28);
}

.equipment-severity-media {
    background: rgba(250, 204, 21, 0.15);
    color: #fde68a;
    border: 1px solid rgba(250, 204, 21, 0.28);
}

.equipment-severity-alta,
.equipment-severity-critica {
    background: rgba(239, 68, 68, 0.16);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.32);
}

.equipment-remove-btn {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: var(--danger-color);
    border-radius: 0.75rem;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.equipment-remove-btn:hover {
    background: var(--danger-color);
    color: #fff;
}

.equipment-card-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.equipment-card .equipment-gallery,
.equipment-card .equipment-detail-gallery {
    margin-top: 0.5rem;
}

.equipment-fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.equipment-field-full {
    width: 100%;
}

.equipment-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.equipment-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.equipment-input,
.equipment-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 0.85rem;
    padding: 0.85rem 1rem;
    color: var(--text-light);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    resize: vertical;
    min-height: 48px;
}

.equipment-select {
    appearance: none;
}

.equipment-textarea {
    min-height: 110px;
}

.equipment-textarea-compact {
    min-height: 84px;
}

.equipment-input:focus,
.equipment-textarea:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

.equipment-photos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.equipment-photo {
    position: relative;
    display: block;
    border: 2px dashed rgba(148, 163, 184, 0.3);
    border-radius: 1rem;
    overflow: hidden;
    background: rgba(26, 35, 50, 0.65);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.equipment-photo input[type="file"] {
    display: none;
}

.equipment-photo-inner {
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 210px;
}

.equipment-photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.equipment-photo-label {
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.equipment-photo-icon {
    font-size: 1.5rem;
    color: var(--primary-orange);
}

.equipment-photo-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.equipment-photo-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.equipment-photo.has-image {
    border-style: solid;
    border-color: rgba(249, 115, 22, 0.65);
    background: rgba(249, 115, 22, 0.05);
}

.equipment-photo.has-image .equipment-photo-inner {
    padding: 0;
    min-height: auto;
}

.equipment-card-view {
    background: rgba(17, 24, 39, 0.65);
    border-style: solid;
    border-color: rgba(148, 163, 184, 0.18);
    cursor: default;
    transform: none !important;
}

.equipment-card-view:hover {
    border-color: rgba(148, 163, 184, 0.18);
}

.equipment-fields-static {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.equipment-fields-static-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.equipment-field-static-full {
    grid-column: 1 / -1;
}

.equipment-field-static p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.45;
    white-space: pre-wrap;
}

.equipment-photo-view {
    cursor: default;
    border-style: solid;
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(26, 35, 50, 0.55);
}

.equipment-photo-view .equipment-photo-inner {
    min-height: 180px;
}

.equipment-photo-view .equipment-photo-placeholder .equipment-photo-hint {
    color: var(--text-muted);
}

.read-only-field {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(148, 163, 184, 0.2);
    cursor: default;
}

.equipment-photo-clear {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.4);
    color: var(--text-light);
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.equipment-photo-clear:hover {
    background: var(--danger-color);
    border-color: var(--danger-color);
}

.tasks-group {
    background: rgba(17, 24, 39, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1.1rem;
    padding: 1.2rem 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tasks-group+.tasks-group {
    margin-top: 1.2rem;
}

.tasks-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.tasks-group-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
}

.tasks-group-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tasks-group-body {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.tasks-group-single {
    background: transparent;
    border: none;
    padding: 0;
}

.tasks-group-single .tasks-group-header {
    padding: 0 0.2rem 0.5rem 0.2rem;
}

.tasks-group-single .tasks-group-body {
    padding: 0;
}

.task-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.task-card:hover {
    border-color: rgba(249, 115, 22, 0.35);
    transform: translateY(-1px);
}

.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.task-card-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.task-card-title-block {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.task-card-title-block h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
}

.task-card-assignee {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.task-status-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-light);
}

.task-status-completed {
    background: rgba(34, 197, 94, 0.2);
    color: #bbf7d0;
}

.task-origin-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.16);
    color: #bfdbfe;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.task-priority-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.task-card-description {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
}

.task-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.task-card-date {
    font-weight: 500;
}

.task-card-footer-left {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.task-report-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.58rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #86efac;
    background: rgba(34, 197, 94, 0.12);
    letter-spacing: 0.03em;
}

.task-report-link.missing {
    border-color: rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.12);
}

.task-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.task-card-actions-empty {
    min-width: 0;
}

.task-complete-btn {
    background: rgba(34, 197, 94, 0.18);
    border: 1px solid rgba(34, 197, 94, 0.45);
    color: #bbf7d0;
    border-radius: 0.75rem;
    padding: 0.45rem 0.9rem;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.task-complete-btn:hover,
.task-complete-btn:focus-visible {
    background: rgba(34, 197, 94, 0.32);
    border-color: rgba(34, 197, 94, 0.65);
    outline: none;
}

.task-ack-btn {
    background: rgba(59, 130, 246, 0.22);
    border: 1px solid rgba(59, 130, 246, 0.45);
    color: #bfdbfe;
    border-radius: 0.75rem;
    padding: 0.45rem 0.9rem;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.task-ack-btn:hover,
.task-ack-btn:focus-visible {
    background: rgba(59, 130, 246, 0.32);
    border-color: rgba(59, 130, 246, 0.65);
    outline: none;
}

.task-card-completed {
    border-color: rgba(34, 197, 94, 0.35);
}

.task-completed-label {
    font-weight: 600;
    color: #bbf7d0;
}

.task-ack-label {
    font-weight: 600;
    color: #bfdbfe;
}

.planner-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.planner-calendar-panel {
    background: rgba(17, 24, 39, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 1.25rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.planner-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.planner-calendar-subtitle {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.planner-calendar-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.planner-nav-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.75rem;
    background: rgba(26, 35, 50, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.planner-nav-btn:hover {
    border-color: var(--primary-orange);
    transform: translateY(-1px);
}

.planner-current-month {
    min-width: 160px;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-light);
}

.planner-weekdays,
.planner-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.65rem;
}

.planner-weekdays {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
}

.planner-weekday {
    text-align: center;
}

.planner-grid {
    min-height: 320px;
}

.planner-day {
    min-height: 100px;
    border-radius: 1rem;
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.15);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.planner-day:hover {
    border-color: var(--primary-orange);
    transform: translateY(-2px);
}

.planner-day.other-month {
    opacity: 0.35;
}

.planner-day.selected {
    border-color: var(--primary-orange);
    background: rgba(249, 115, 22, 0.1);
}

.planner-day-number {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.95rem;
}

.planner-day-tasks {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: auto;
}

.planner-day-task {
    font-size: 0.75rem;
    padding: 0.3rem 0.45rem;
    border-radius: 0.6rem;
    background: rgba(249, 115, 22, 0.12);
    color: var(--primary-orange);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.planner-day-task.more {
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-muted);
}

.planner-sidebar {
    background: rgba(17, 24, 39, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 1.25rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-height: 100%;
}

.planner-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.planner-sidebar-label {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
}

#planner-selected-date {
    margin: 0.25rem 0 0;
}

.planner-task-form {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 1rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.planner-task-form.hidden {
    display: none;
}

.planner-form-actions {
    display: flex;
    gap: 0.75rem;
}

.planner-assignee-checklist {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: 190px;
    overflow-y: auto;
    padding: 0.55rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 0.8rem;
    background: rgba(2, 6, 23, 0.55);
}

.planner-assignee-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.55rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.65);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.planner-assignee-option:hover {
    border-color: rgba(249, 115, 22, 0.42);
    background: rgba(249, 115, 22, 0.08);
}

.planner-assignee-option input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    accent-color: #f97316;
    cursor: pointer;
}

.planner-assignee-option span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-light);
    font-size: 0.86rem;
}

.planner-assignee-option span small {
    color: var(--text-muted);
}

.planner-assignee-empty {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.82rem;
    padding: 0.35rem 0.2rem;
}

.planner-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.planner-task-card {
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 1rem;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.planner-task-card header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.planner-task-title {
    font-weight: 600;
    color: var(--text-light);
    margin: 0;
    font-size: 1rem;
}

.planner-task-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.planner-task-priority {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.planner-task-actions {
    display: flex;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.planner-task-delete {
    background: transparent;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    padding: 0.25rem 0.4rem;
    border-radius: 0.5rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.planner-task-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #fff;
}

.planner-tasks-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 1rem;
    border: 1px dashed rgba(148, 163, 184, 0.25);
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.45);
}

.planner-tasks-empty span {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.planner-missing {
    grid-column: 1 / -1;
    padding: 1.25rem;
    border-radius: 1rem;
    border: 1px dashed rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.planner-missing span {
    font-size: 2rem;
}

.planner-missing code {
    display: block;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.75rem;
    padding: 0.75rem;
    font-size: 0.8rem;
    color: #f1f5f9;
    white-space: pre-line;
}

@media (max-width: 1100px) {
    .planner-layout {
        grid-template-columns: 1fr;
    }

    .planner-sidebar {
        order: 2;
    }

    .planner-calendar-panel {
        order: 1;
    }
}

@media (max-width: 768px) {
    .planner-layout {
        gap: 1rem;
    }

    .planner-calendar-panel,
    .planner-sidebar {
        padding: 0.95rem;
        border-radius: 1rem;
    }

    .planner-calendar-panel {
        gap: 0.9rem;
    }

    .planner-calendar-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .planner-calendar-subtitle {
        margin-top: 0.2rem;
        font-size: 0.82rem;
    }

    .planner-calendar-controls {
        width: 100%;
        justify-content: space-between;
    }

    .planner-current-month {
        min-width: 0;
        font-size: 0.95rem;
    }

    .planner-weekdays,
    .planner-grid {
        gap: 0.4rem;
    }

    .planner-grid {
        min-height: 0;
    }

    .planner-day {
        min-height: 78px;
        padding: 0.42rem;
        border-radius: 0.8rem;
    }

    .planner-day-number {
        font-size: 0.82rem;
    }

    .planner-day-task {
        font-size: 0.65rem;
        padding: 0.14rem 0.3rem;
        border-radius: 0.5rem;
    }

    .planner-sidebar-header {
        flex-direction: column;
        gap: 0.65rem;
        align-items: stretch;
    }

    #add-task-btn {
        width: 100%;
    }

    .planner-form-actions {
        flex-direction: column;
        gap: 0.55rem;
    }

    .planner-form-actions .btn {
        width: 100%;
    }

    .planner-task-card {
        padding: 0.75rem 0.82rem;
    }
}

@media (max-width: 520px) {
    .planner-day {
        min-height: 68px;
        padding: 0.34rem;
    }

    .planner-day-task {
        font-size: 0.6rem;
        padding: 0.12rem 0.22rem;
    }

    .planner-weekday {
        font-size: 0.65rem;
    }
}

@media (min-width: 1024px) {
    #main-app {
        display: grid;
        grid-template-columns: var(--sidebar-width) 1fr;
    }

    #sidebar {
        position: relative;
        inset: auto;
        transform: none;
        height: auto;
    }

    body.sidebar-visible #sidebar {
        transform: none;
    }

    body.sidebar-visible::before {
        display: none;
    }

    #bottom-nav {
        display: none;
    }

    #menu-btn {
        display: none;
    }
}


.section-header span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.equipment-view-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.equipment-view-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    background: rgba(17, 24, 39, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1rem;
    padding: 1rem 1.5rem;
}

.equipment-view-title {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.equipment-view-title h3 {
    margin: 0 0 0.35rem 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.equipment-view-title p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.equipment-view-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.equipment-search-wrapper {
    min-width: 240px;
    position: relative;
}

.equipment-submenu-wrapper {
    position: relative;
}

.equipment-submenu-toggle {
    min-width: 190px;
}

.equipment-submenu-panel {
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    width: 240px;
    padding: 0.45rem;
    background: rgba(17, 24, 39, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 0.85rem;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.38);
    z-index: 35;
}

.equipment-submenu-item {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.7rem;
    background: rgba(15, 23, 42, 0.7);
    color: #f8fafc;
    padding: 0.55rem 0.7rem;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.84rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.equipment-submenu-item:hover {
    border-color: rgba(249, 115, 22, 0.55);
    background: rgba(249, 115, 22, 0.12);
    color: #fb923c;
    transform: translateY(-1px);
}

#equipment-search-input {
    width: 100%;
    padding: 0.65rem 1rem;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 0.75rem;
    color: var(--text-light);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#equipment-search-input:focus {
    outline: none;
    border-color: rgba(249, 115, 22, 0.6);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

.equipment-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.equipment-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
}

.equipment-category-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.equipment-category-card:hover {
    border-color: rgba(249, 115, 22, 0.45);
    transform: translateY(-2px);
}

.equipment-category-image {
    width: 100%;
    height: 140px;
    border-radius: 0.8rem;
    object-fit: cover;
    background: rgba(30, 41, 59, 0.6);
}

.equipment-category-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.equipment-category-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.equipment-category-description {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.equipment-empty-state {
    background: rgba(15, 23, 42, 0.85);
    border: 1px dashed rgba(148, 163, 184, 0.3);
    border-radius: 1rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

.equipment-context-card {
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1rem;
    padding: 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.equipment-context-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.equipment-context-card-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.equipment-context-card-header p {
    margin: 0.3rem 0 0;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.equipment-context-eyebrow {
    display: inline-flex;
    align-items: center;
    color: #fb923c;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.equipment-plant-map-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.equipment-plant-map-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
}

.equipment-plant-map-stat {
    background: rgba(30, 41, 59, 0.64);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 0.95rem;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.equipment-plant-map-stat span,
.equipment-plant-map-stat small {
    color: var(--text-muted);
}

.equipment-plant-map-stat strong {
    font-size: 1.55rem;
    color: var(--text-light);
}

.equipment-plant-map-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(320px, 0.95fr);
    gap: 1rem;
    align-items: start;
}

.equipment-plant-map-card,
.equipment-plant-map-sidebar {
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1rem;
    overflow: hidden;
}

.equipment-plant-map-canvas {
    width: 100%;
    min-height: 520px;
}

.equipment-plant-map-sidebar {
    display: flex;
    flex-direction: column;
    min-height: 520px;
}

.equipment-plant-map-sidebar-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1rem 0.85rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.equipment-plant-map-sidebar-head h4 {
    margin: 0;
    font-size: 1rem;
}

.equipment-plant-map-sidebar-head span {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.equipment-plant-map-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem;
    overflow: auto;
}

.equipment-plant-map-item {
    background: rgba(30, 41, 59, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 0.95rem;
    padding: 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.equipment-plant-map-item.active {
    border-color: rgba(249, 115, 22, 0.45);
    box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.16);
}

.equipment-plant-map-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.equipment-plant-map-item-header h4 {
    margin: 0;
    font-size: 0.98rem;
}

.equipment-plant-map-item-header p {
    margin: 0.3rem 0 0;
    color: var(--text-muted);
    font-size: 0.84rem;
}

.equipment-plant-map-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.equipment-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.equipment-list-item {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 1rem;
    padding: 1rem 1.2rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.equipment-list-item:hover {
    border-color: rgba(249, 115, 22, 0.4);
    transform: translateY(-1px);
}

.equipment-list-item img,
.equipment-list-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 0.75rem;
    background: rgba(30, 41, 59, 0.7);
    flex-shrink: 0;
}

.equipment-list-item h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.equipment-list-item p {
    margin: 0.2rem 0 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.equipment-detail-card {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 1.2rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.equipment-detail-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.equipment-detail-block h4 {
    margin: 0 0 0.4rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.equipment-detail-block p {
    margin: 0;
    font-size: 1rem;
}

.equipment-answer-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.4rem;
    margin-bottom: 0.4rem;
}

.equipment-answer-pill.si {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.equipment-answer-pill.no {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.equipment-answer-pill.na {
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-muted);
}

.equipment-answer-pill.nota {
    background: rgba(250, 204, 21, 0.2);
    color: #facc15;
}

.equipment-question {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.equipment-question-label {
    font-size: 0.9rem;
    font-weight: 500;
}

.equipment-question-label .required {
    color: var(--danger-color);
}

.equipment-question-pills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 0.6rem;
}

.equipment-question-pill {
    padding: 0.6rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-light);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.equipment-question-pill.active {
    background: rgba(249, 115, 22, 0.16);
    border-color: rgba(249, 115, 22, 0.6);
}

.equipment-question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.equipment-question-comment textarea {
    width: 100%;
    min-height: 64px;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.7);
    color: var(--text-light);
    padding: 0.75rem;
    font-size: 0.85rem;
    resize: vertical;
}

.equipment-question-comment textarea:focus {
    outline: none;
    border-color: rgba(249, 115, 22, 0.55);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.equipment-question-comment-read {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(15, 23, 42, 0.6);
    border-radius: 0.75rem;
    padding: 0.6rem 0.8rem;
}

.equipment-form {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 1.2rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.equipment-step-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 0.4rem;
}

.equipment-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.equipment-form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.equipment-form-group input,
.equipment-form-group select,
.equipment-form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.85);
    color: var(--text-light);
    resize: vertical;
    min-height: 44px;
}

.equipment-form-group input:focus,
.equipment-form-group select:focus,
.equipment-form-group textarea:focus {
    outline: none;
    border-color: rgba(249, 115, 22, 0.6);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.18);
}

.equipment-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.equipment-checklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.6rem;
}

.equipment-check-option {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.7rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.55);
    font-size: 0.84rem;
}

.equipment-check-option input {
    width: 16px;
    height: 16px;
}

.equipment-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.equipment-photo-preview {
    max-height: 220px;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
}

.equipment-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.equipment-gallery-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.equipment-gallery-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 1rem;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
}

.equipment-gallery-card.new {
    border-style: dashed;
}

.equipment-gallery-card.cover {
    border-color: rgba(249, 115, 22, 0.6);
    box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.3);
}

.equipment-gallery-card.cover::after {
    content: "Principal";
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    background: rgba(249, 115, 22, 0.85);
    color: #0b0f1a;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
}

.equipment-gallery-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 0.75rem;
}

.equipment-gallery-card-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

.equipment-photo-btn {
    flex: 1;
    padding: 0.4rem 0.6rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.7);
    color: var(--text-light);
    font-size: 0.75rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.equipment-photo-btn:hover:not(:disabled) {
    border-color: rgba(249, 115, 22, 0.45);
    background: rgba(249, 115, 22, 0.12);
}

.equipment-photo-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.equipment-gallery-add {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(148, 163, 184, 0.35);
    border-radius: 1rem;
    padding: 1.5rem;
    color: var(--text-muted);
    gap: 0.5rem;
    background: rgba(15, 23, 42, 0.5);
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
    position: relative;
    overflow: hidden;
}

.equipment-gallery-add:hover {
    border-color: rgba(249, 115, 22, 0.6);
    color: var(--text-light);
}

.equipment-gallery-add.dragover {
    border-color: var(--primary-orange);
    background: rgba(249, 115, 22, 0.06);
    color: var(--text-light);
}

.equipment-gallery-add input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

.equipment-gallery-add-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.2);
    color: var(--primary-orange);
    font-size: 1.25rem;
    font-weight: 700;
}

.equipment-gallery-empty {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.equipment-gallery-limit {
    margin: 0.5rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.equipment-location-status {
    margin-top: 0.4rem;
    min-height: 1.6rem;
}

.equipment-detail-gallery {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.equipment-detail-gallery-item {
    margin: 0;
}

.equipment-detail-gallery-item img {
    width: 100%;
    border-radius: 1rem;
    object-fit: cover;
    max-height: 220px;
}

.equipment-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.6rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-muted);
}

.equipment-detail-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* =========================================================
   FSM FASE 1 — BADGES DE ZONA GEOGRÁFICA
   Usado en la tabla de Perfiles para identificar la zona
   de cada técnico/supervisor a simple vista.
   ========================================================= */

.badge-zona {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: rgba(249, 115, 22, 0.12);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.25);
    white-space: nowrap;
}

.badge-zona:empty::after {
    content: '—';
    opacity: 0.5;
}

/* =========================================================
   SISTEMA DE NOTIFICACIONES TOAST
   Reemplaza los alert() bloqueantes por notificaciones
   visuales no intrusivas en la esquina inferior derecha.
   ========================================================= */

#toast-container {
    position: fixed;
    bottom: 5rem;
    right: 1.25rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    pointer-events: none;
    max-width: 380px;
    width: calc(100vw - 2.5rem);
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1.1rem;
    border-radius: 0.85rem;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.45;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2);
    pointer-events: all;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.12);
    animation: toastEnter 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
        toastLeave 0.35s ease 3.65s forwards;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.toast-icon {
    font-size: 1.1rem;
    line-height: 1.45;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
}

/* Tipos de toast */
.toast-error {
    background: rgba(220, 38, 38, 0.92);
    color: #fff;
}

.toast-success {
    background: rgba(22, 163, 74, 0.92);
    color: #fff;
}

.toast-warning {
    background: rgba(202, 138, 4, 0.92);
    color: #fff;
}

.toast-info {
    background: rgba(37, 99, 235, 0.92);
    color: #fff;
}

@keyframes toastEnter {
    from {
        opacity: 0;
        transform: translateX(110%) scale(0.92);
    }

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

@keyframes toastLeave {
    from {
        opacity: 1;
        transform: translateY(0);
        max-height: 100px;
    }

    to {
        opacity: 0;
        transform: translateY(8px);
        max-height: 0;
        padding: 0;
        margin: 0;
    }
}

@media (max-width: 480px) {
    #toast-container {
        bottom: 5.5rem;
        right: 0.75rem;
        left: 0.75rem;
        width: auto;
    }
}/* Tablero Inspection Question UI */
.inspection-question-card {
  background: var(--bg-dark-accent);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  border: 1px solid var(--border-color);
}
.inspection-question-title {
  font-weight: 500;
  margin-bottom: 12px;
  color: #fff;
  font-size: 1.05rem;
}
.inspection-toggle-group {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.inspection-toggle-btn {
  flex: 1;
  padding: 8px 0;
  border: 1px solid var(--border-color);
  background: var(--bg-dark);
  color: var(--text-color);
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  font-weight: bold;
}
.inspection-toggle-btn:hover {
  filter: brightness(1.2);
}
.inspection-toggle-btn.active[data-value="SI"] { background: #1f8538; color: white; border-color: #1f8538; }
.inspection-toggle-btn.active[data-value="NO"] { background: #b02a37; color: white; border-color: #b02a37; }
.inspection-toggle-btn.active[data-value="N/A"] { background: #5c636a; color: white; border-color: #5c636a; }
.inspection-toggle-btn.active[data-value="NOTA"] { background: #ffc107; color: black; border-color: #ffc107; }

.inspection-nota-panel {
  display: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
  animation: fadeIn 0.3s ease-in-out;
}
.inspection-nota-panel.show {
  display: block;
}

/* Mejoras Select M�ltiple Planificador */
select[multiple] {
    padding: 0.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    scrollbar-width: thin;
    overflow-y: auto;
}
select[multiple] option {
    padding: 0.75rem 1rem;
    margin-bottom: 2px;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
select[multiple] option:hover {
    background: rgba(255, 255, 255, 0.05);
}
select[multiple] option:checked {
    background: var(--primary-color) linear-gradient(0deg, var(--primary-color) 0%, var(--primary-color) 100%);
    color: #fff;
    font-weight: 500;
}

/* =========================================================
   SISTEMA DE BOTONES - Tractonic Gestor
   ========================================================= */

/* Base */
.btn {
    padding: 0.7rem 1.25rem;
    border-radius: 0.85rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    letter-spacing: 0.01em;
    background: linear-gradient(135deg, #f97316 0%, #ea6c0a 100%);
    color: #fff;
    border: 1px solid rgba(249, 115, 22, 0.5);
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.08) 0%, transparent 60%);
    pointer-events: none;
    border-radius: inherit;
}

.btn:hover,
.btn:focus-visible {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    outline: none;
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(249, 115, 22, 0.3);
}

.btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Outline */
.btn-outline {
    background: rgba(249, 115, 22, 0.08);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.4);
    box-shadow: none;
}

.btn-outline::after { display: none; }

.btn-outline:hover,
.btn-outline:focus-visible {
    background: rgba(249, 115, 22, 0.16);
    border-color: rgba(249, 115, 22, 0.65);
    color: #fff;
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

/* Ghost / Neutral */
.btn-ghost {
    background: rgba(148, 163, 184, 0.08);
    color: #9ca3af;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: none;
}

.btn-ghost::after { display: none; }

.btn-ghost:hover,
.btn-ghost:focus-visible {
    background: rgba(148, 163, 184, 0.15);
    color: #e5e7eb;
    border-color: rgba(148, 163, 184, 0.35);
    transform: translateY(-1px);
}

/* Danger */
.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-danger::after { display: none; }

.btn-danger:hover,
.btn-danger:focus-visible {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

/* Success */
.btn-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-color: rgba(34, 197, 94, 0.5);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.22),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-success::after { display: none; }

.btn-success:hover,
.btn-success:focus-visible {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}

/* Tamao pequeno */
.btn-sm {
    padding: 0.38rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 0.65rem;
    gap: 0.35rem;
}

.btn-sm svg {
    width: 14px;
    height: 14px;
}

/* Icono compacto */
.btn-icon {
    padding: 0.6rem;
    border-radius: 0.75rem;
    width: 2.4rem;
    height: 2.4rem;
    font-size: 0.88rem;
}

/* =========================================================
   BOTONES DE ACCION EN TARJETAS
   ========================================================= */

/* Completar tarea */
.task-complete-btn {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(22, 163, 74, 0.15) 100%);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #86efac;
    border-radius: 0.75rem;
    padding: 0.45rem 0.9rem;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(34, 197, 94, 0.12),
                inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.task-complete-btn::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z'/%3E%3C/svg%3E") center/contain no-repeat;
    flex-shrink: 0;
}

.task-complete-btn:hover,
.task-complete-btn:focus-visible {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.35) 0%, rgba(22, 163, 74, 0.25) 100%);
    border-color: rgba(34, 197, 94, 0.75);
    color: #bbf7d0;
    box-shadow: 0 3px 10px rgba(34, 197, 94, 0.25);
    transform: translateY(-1px);
    outline: none;
}

/* Acusar recibo */
.task-ack-btn {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.15) 100%);
    border: 1px solid rgba(59, 130, 246, 0.5);
    color: #93c5fd;
    border-radius: 0.75rem;
    padding: 0.45rem 0.9rem;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.12),
                inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.task-ack-btn::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z'/%3E%3C/svg%3E") center/contain no-repeat;
    flex-shrink: 0;
}

.task-ack-btn:hover,
.task-ack-btn:focus-visible {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.35) 0%, rgba(37, 99, 235, 0.25) 100%);
    border-color: rgba(59, 130, 246, 0.75);
    color: #bfdbfe;
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.25);
    transform: translateY(-1px);
    outline: none;
}

/* Eliminar equipo */
.equipment-remove-btn {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.1) 100%);
    border: 1px solid rgba(239, 68, 68, 0.45);
    color: #fca5a5;
    border-radius: 0.75rem;
    padding: 0.4rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(239, 68, 68, 0.1);
}

.equipment-remove-btn::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z'/%3E%3C/svg%3E") center/contain no-repeat;
    flex-shrink: 0;
}

.equipment-remove-btn:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #ef4444;
    color: #fff;
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.35);
    transform: translateY(-1px);
}

/* Botones icono en reporte */
.report-card-actions-btn {
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 0.65rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.45rem 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.report-card-actions-btn svg {
    width: 18px;
    height: 18px;
}

.report-card-actions-btn:hover {
    background: rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.35);
    color: #f97316;
    transform: translateY(-1px);
}

.report-card-actions-btn.is-loading,
.report-card-actions-btn:disabled {
    opacity: 0.55;
    cursor: wait;
    transform: none;
}

/* Botones foto de equipo */
.equipment-photo-btn {
    flex: 1;
    padding: 0.42rem 0.6rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.6);
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: all 0.2s ease;
}

.equipment-photo-btn:hover:not(:disabled) {
    border-color: rgba(249, 115, 22, 0.5);
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
    transform: translateY(-1px);
}

.equipment-photo-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

/* Eliminar tarea del planificador */
.planner-task-delete {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    cursor: pointer;
    padding: 0.3rem 0.55rem;
    border-radius: 0.6rem;
    font-size: 0.78rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s ease;
}

.planner-task-delete::before {
    content: '';
    display: inline-block;
    width: 13px;
    height: 13px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z'/%3E%3C/svg%3E") center/contain no-repeat;
    flex-shrink: 0;
}

.planner-task-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fff;
    transform: translateY(-1px);
}

/* =========================================================
   MENU DE ACCIONES CONTEXTUAL
   ========================================================= */
.actions-menu {
    position: absolute;
    top: 50px;
    right: 20px;
    background: rgba(17, 24, 39, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0.95rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5),
                0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.4rem;
    min-width: 170px;
}

.actions-menu button {
    background: none;
    border: none;
    color: #9ca3af;
    padding: 0.65rem 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: 0.65rem;
    transition: all 0.15s ease;
}

.actions-menu button:hover {
    background: rgba(249, 115, 22, 0.12);
    color: #e5e7eb;
}

.actions-menu button.danger {
    color: #fca5a5;
}

.actions-menu button.danger:hover {
    background: rgba(239, 68, 68, 0.14);
    color: #fca5a5;
}

.actions-menu button svg {
    width: 16px;
    height: 16px;
    opacity: 0.75;
    flex-shrink: 0;
}

.actions-menu button:hover svg {
    opacity: 1;
}

/* =========================================================
   COTIZADOR (NOVEDADES -> EXCEL)
   ========================================================= */
#cotizador-modal .modal-content.cotizador-modal-content {
    width: min(980px, calc(100% - 1rem));
    height: min(96vh, 1050px);
}

#cotizador-modal #cotizador-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

#cotizador-modal .modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

#cotizador-modal .cotizador-ui {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 0 12px;
}

#cotizador-modal .cotizador-ui .page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: #131920;
    border: 1px solid #253040;
    border-radius: 14px;
    margin-bottom: 16px;
}

#cotizador-modal .cotizador-ui .logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

#cotizador-modal .cotizador-ui .logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f97316;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.4);
}

#cotizador-modal .cotizador-ui .logo-text h1 {
    font-size: 15px;
    font-weight: 700;
    color: #e2e8f0;
    margin: 0;
}

#cotizador-modal .cotizador-ui .logo-text p {
    font-size: 11px;
    color: #7d8fa3;
    margin: 0;
}

#cotizador-modal .cotizador-ui .header-badge {
    font-size: 10px;
    font-weight: 500;
    background: rgba(249, 115, 22, 0.12);
    border: 1px solid rgba(249, 115, 22, 0.3);
    color: #f97316;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

#cotizador-modal .cotizador-ui .section {
    background: #131920;
    border: 1px solid #253040;
    border-radius: 14px;
    margin-bottom: 14px;
    overflow: hidden;
}

#cotizador-modal .cotizador-ui .section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-bottom: 1px solid #253040;
    background: #1a2330;
}

#cotizador-modal .cotizador-ui .section-num {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #f97316;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#cotizador-modal .cotizador-ui .section-head h2 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #e2e8f0;
    margin: 0;
}

#cotizador-modal .cotizador-ui .section-head p {
    font-size: 11px;
    color: #7d8fa3;
    margin: 0 0 0 auto;
}

#cotizador-modal .cotizador-ui .section-body {
    padding: 20px;
}

#cotizador-modal .cotizador-ui .fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

#cotizador-modal .cotizador-ui .field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#cotizador-modal .cotizador-ui .field-full {
    grid-column: 1 / -1;
}

#cotizador-modal .cotizador-ui .field label {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #7d8fa3;
    display: flex;
    align-items: center;
    gap: 5px;
}

#cotizador-modal .cotizador-ui .cell-ref {
    font-size: 9px;
    font-weight: 500;
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.25);
    color: #f97316;
    padding: 1px 5px;
    border-radius: 4px;
}

#cotizador-modal .cotizador-ui input,
#cotizador-modal .cotizador-ui select,
#cotizador-modal .cotizador-ui textarea {
    background: #1f2b3a;
    border: 1px solid #2e3d50;
    color: #e2e8f0;
    font-size: 13px;
    padding: 9px 12px;
    border-radius: 9px;
    outline: none;
    width: 100%;
}

#cotizador-modal .cotizador-ui textarea {
    min-height: 60px;
    resize: vertical;
}

#cotizador-modal .cotizador-ui input[readonly] {
    background: rgba(34, 197, 94, 0.05);
    border-color: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

#cotizador-modal .cotizador-ui .services-search-wrap {
    position: relative;
    margin-bottom: 10px;
}

#cotizador-modal .cotizador-ui .services-search-wrap input {
    padding-left: 36px;
}

#cotizador-modal .cotizador-ui .search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: #7d8fa3;
    pointer-events: none;
}

#cotizador-modal .cotizador-ui .autocomplete-list {
    position: absolute;
    z-index: 100;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #1a2330;
    border: 1px solid #2e3d50;
    border-radius: 10px;
    max-height: 260px;
    overflow-y: auto;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    display: none;
}

#cotizador-modal .cotizador-ui .autocomplete-list.open {
    display: block;
}

#cotizador-modal .cotizador-ui .ac-item {
    padding: 8px 12px;
    cursor: pointer;
    border: none;
    width: 100%;
    text-align: left;
    background: transparent;
    color: #e2e8f0;
    border-bottom: 1px solid rgba(37, 48, 64, 0.5);
    display: flex;
    align-items: center;
    gap: 8px;
}

#cotizador-modal .cotizador-ui .ac-item:last-child {
    border-bottom: none;
}

#cotizador-modal .cotizador-ui .ac-item:hover,
#cotizador-modal .cotizador-ui .ac-item.selected {
    background: rgba(249, 115, 22, 0.12);
}

#cotizador-modal .cotizador-ui .ac-code {
    font-size: 10px;
    color: #f97316;
    flex-shrink: 0;
}

#cotizador-modal .cotizador-ui .ac-name {
    font-size: 12px;
    color: #e2e8f0;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#cotizador-modal .cotizador-ui .ac-equipo {
    font-size: 10px;
    color: #e5e7eb;
    font-weight: 600;
    flex-shrink: 0;
}

#cotizador-modal .cotizador-ui .services-table,
#cotizador-modal .cotizador-ui .materiales-table {
    width: 100%;
    border-collapse: collapse;
}

#cotizador-modal .cotizador-ui .services-table thead tr {
    background: #1a2330;
}

#cotizador-modal .cotizador-ui .services-table thead th,
#cotizador-modal .cotizador-ui .materiales-table thead th {
    padding: 8px 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #7d8fa3;
    text-align: left;
    border-bottom: 1px solid #2e3d50;
}

#cotizador-modal .cotizador-ui .services-table tbody tr {
    border-bottom: 1px solid #253040;
}

#cotizador-modal .cotizador-ui .services-table td,
#cotizador-modal .cotizador-ui .materiales-table td {
    padding: 7px 10px;
    font-size: 12px;
    vertical-align: middle;
}

#cotizador-modal .cotizador-ui .td-code {
    color: #f97316;
    font-size: 11px;
}

#cotizador-modal .cotizador-ui .td-actividad {
    color: #e2e8f0;
}

#cotizador-modal .cotizador-ui .td-equipo {
    color: #7d8fa3;
    font-size: 11px;
}

#cotizador-modal .cotizador-ui .td-valor {
    color: #e2e8f0;
    text-align: right;
}

#cotizador-modal .cotizador-ui .td-total {
    color: #22c55e;
    font-weight: 600;
    text-align: right;
}

#cotizador-modal.reportar-tech-mode .cotizador-tech-hide {
    display: none !important;
}

#cotizador-modal.reportar-tech-mode .services-table th.cotizador-price-col,
#cotizador-modal.reportar-tech-mode .services-table td.cotizador-price-col,
#cotizador-modal.reportar-tech-mode .materiales-table th.cotizador-price-col,
#cotizador-modal.reportar-tech-mode .materiales-table td.cotizador-price-col {
    display: none !important;
}

#cotizador-modal .cotizador-ui .td-cant input {
    width: 68px;
    padding: 5px 8px;
    text-align: center;
    min-height: auto;
}

#cotizador-modal .cotizador-ui .td-del button {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #4a5a6e;
    padding: 4px 6px;
    border-radius: 5px;
    font-size: 14px;
}

#cotizador-modal .cotizador-ui .td-del button:hover {
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
}

#cotizador-modal .cotizador-ui .empty-row td {
    text-align: center;
    padding: 22px;
    color: #4a5a6e;
    font-size: 12px;
    font-style: italic;
}

#cotizador-modal .cotizador-ui .empty-row.hidden {
    display: none;
}

#cotizador-modal .cotizador-ui .add-service-btn,
#cotizador-modal .cotizador-ui .add-mat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    border-radius: 8px;
    border: 1px dashed #2e3d50;
    background: transparent;
    color: #7d8fa3;
    cursor: pointer;
    font-size: 12px;
}

#cotizador-modal .cotizador-ui .add-service-btn:hover,
#cotizador-modal .cotizador-ui .add-mat-btn:hover {
    border-color: rgba(249, 115, 22, 0.4);
    color: #f97316;
    background: rgba(249, 115, 22, 0.12);
}

#cotizador-modal .cotizador-ui .logistica-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
}

#cotizador-modal .cotizador-ui .logistica-info {
    grid-column: 1 / -1;
    background: #1f2b3a;
    border-radius: 9px;
    padding: 10px 14px;
    font-size: 11px;
    color: #7d8fa3;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

#cotizador-modal .cotizador-ui .logistica-info b {
    color: #e2e8f0;
}

#cotizador-modal .cotizador-ui .resumen-box {
    background: #1a2330;
    border: 1px solid #253040;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 8px;
}

#cotizador-modal .cotizador-ui .resumen-items {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

#cotizador-modal .cotizador-ui .res-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#cotizador-modal .cotizador-ui .rlbl {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #7d8fa3;
    font-weight: 600;
}

#cotizador-modal .cotizador-ui .rval {
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
}

#cotizador-modal .cotizador-ui .rval.total {
    color: #f97316;
    font-size: 18px;
}

#cotizador-modal .cotizador-ui .resumen-divider {
    width: 1px;
    height: 40px;
    background: #2e3d50;
}

#cotizador-modal .generate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f97316, #c2580f);
    border: 1px solid rgba(249, 115, 22, 0.5);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(249, 115, 22, 0.35);
}

#cotizador-modal .cotizador-footer-actions {
    display: flex;
    gap: 0.8rem;
    width: 100%;
}

#cotizador-modal .cotizador-footer-actions .btn,
#cotizador-modal .cotizador-footer-actions .generate-btn {
    flex: 1;
}

@media (max-width: 760px) {
    #cotizador-modal .cotizador-footer-actions {
        flex-direction: column;
    }

    #cotizador-modal .modal-content.cotizador-modal-content {
        width: calc(100% - 0.4rem);
        height: 98vh;
    }

    #cotizador-modal .cotizador-ui .fields-grid,
    #cotizador-modal .cotizador-ui .logistica-grid {
        grid-template-columns: 1fr;
    }

    #cotizador-modal .cotizador-ui .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.55rem;
    }
}

/* =========================================================
   TABLA PERFILES - Tractonic Gestor
   Reemplaza los estilos de .data-table en el tab-perfiles
   ========================================================= */

.profiles-section {
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 1.25rem;
    overflow: hidden;
}

.profiles-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    background: rgba(15, 23, 42, 0.4);
}

.profiles-section-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 0.01em;
}

.profiles-section-title svg {
    color: var(--primary-orange);
    opacity: 0.85;
}

.profiles-count {
    background: rgba(249, 115, 22, 0.12);
    color: #fb923c;
    border: 1px solid rgba(249, 115, 22, 0.25);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    letter-spacing: 0.03em;
}

.profiles-table-wrapper {
    overflow-x: auto;
}

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

.profiles-table thead tr {
    background: rgba(15, 23, 42, 0.55);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.profiles-table thead th {
    padding: 0.7rem 1.1rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-align: left;
    white-space: nowrap;
}

.profiles-table tbody tr {
    border-bottom: 1px solid rgba(148, 163, 184, 0.07);
    transition: background 0.15s ease;
}

.profiles-table tbody tr:last-child {
    border-bottom: none;
}

.profiles-table tbody tr:hover {
    background: rgba(249, 115, 22, 0.04);
}

.profiles-table td {
    padding: 0.8rem 1.1rem;
    font-size: 0.875rem;
    vertical-align: middle;
}

.reportar-table .reportar-cell-fecha,
.reportar-table .reportar-cell-equipo,
.reportar-table .reportar-cell-cliente {
    font-weight: 600;
}

.reportar-table .reportar-cell-actividad,
.reportar-table .reportar-cell-novedad {
    max-width: 420px;
    word-break: break-word;
}

.reportar-table .reportar-cell-acciones .profile-actions {
    justify-content: flex-end;
}

@media (max-width: 980px) {
    .reportar-table thead {
        display: none;
    }

    .reportar-table tbody tr.reportar-row {
        display: block;
        margin: 0.75rem;
        border: 1px solid rgba(148, 163, 184, 0.18);
        border-radius: 0.9rem;
        background: rgba(15, 23, 42, 0.6);
    }

    .reportar-table tbody td.reportar-cell {
        display: flex;
        align-items: flex-start;
        gap: 0.7rem;
        width: 100%;
        padding: 0.58rem 0.85rem;
        border: none;
    }

    .reportar-table tbody td.reportar-cell::before {
        content: attr(data-label);
        min-width: 82px;
        color: var(--text-muted);
        font-size: 0.68rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        padding-top: 0.1rem;
    }

    .reportar-table .reportar-cell-acciones .profile-actions {
        margin-left: auto;
        width: 100%;
        justify-content: flex-end;
    }
}

.profile-user-cell {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(249,115,22,0.3) 0%, rgba(234,107,10,0.2) 100%);
    border: 1px solid rgba(249, 115, 22, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fb923c;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.profile-name {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.875rem;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.role-admin      { background: rgba(139,92,246,0.14); color: #c4b5fd; border: 1px solid rgba(139,92,246,0.3); }
.role-tecnico    { background: rgba(59,130,246,0.14); color: #93c5fd; border: 1px solid rgba(59,130,246,0.3); }
.role-gerente    { background: rgba(234,179,8,0.14); color: #fde047; border: 1px solid rgba(234,179,8,0.3); }
.role-supervisor { background: rgba(249,115,22,0.14); color: #fb923c; border: 1px solid rgba(249,115,22,0.3); }

.zona-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(148, 163, 184, 0.2);
    white-space: nowrap;
}

.profile-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-edit {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.38rem 0.75rem;
    border-radius: 0.6rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(249, 115, 22, 0.4);
    background: rgba(249, 115, 22, 0.1);
    color: #fb923c;
    transition: all 0.2s ease;
    font-family: inherit;
    letter-spacing: 0.01em;
}

.btn-edit:hover {
    background: linear-gradient(135deg, #f97316 0%, #ea6c0a 100%);
    border-color: #f97316;
    color: #fff;
    box-shadow: 0 3px 10px rgba(249, 115, 22, 0.35);
    transform: translateY(-1px);
}

.btn-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 0.55rem;
    border: 1px solid rgba(148, 163, 184, 0.15);
    background: rgba(148, 163, 184, 0.07);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-action-icon:hover {
    background: rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.35);
    color: var(--primary-orange);
    transform: translateY(-1px);
}

.btn-action-icon.danger:hover {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.btn-action-icon svg {
    width: 14px;
    height: 14px;
}

/* =========================================================
   TABLERO GENERAL DE EQUIPOS
   ========================================================= */
.gb-layout {
    display: flex;
    height: min(78vh, calc(100vh - 220px));
    min-height: 560px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.75);
}

#gb-map-full {
    flex: 1;
    height: 100%;
    z-index: 1;
}

.gb-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: linear-gradient(to bottom, rgba(17, 24, 39, 0.92) 0%, rgba(17, 24, 39, 0) 100%);
    pointer-events: none;
}

.gb-topbar-left,
.gb-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    pointer-events: all;
}

.gb-title-block h2 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.gb-title-block p {
    margin: 0.15rem 0 0;
    font-size: 0.75rem;
    color: rgba(229, 231, 235, 0.7);
}

.gb-title-block {
    pointer-events: none;
}

.gb-stat {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: var(--text-light);
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    backdrop-filter: blur(8px);
}

.gb-stat span {
    color: #fb923c;
    font-weight: 700;
}

.gb-add-fab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1rem;
    border-radius: 0.85rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid rgba(249, 115, 22, 0.5);
    background: linear-gradient(135deg, #f97316, #ea6c0a);
    color: #fff;
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.4);
    transition: all 0.2s ease;
    font-family: inherit;
}

.gb-add-fab:hover {
    background: linear-gradient(135deg, #fb923c, #f97316);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5);
}

.gb-panel {
    width: 360px;
    height: 100%;
    background: rgba(17, 24, 39, 0.97);
    border-left: 1px solid rgba(148, 163, 184, 0.12);
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    z-index: 400;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.gb-panel.collapsed {
    transform: translateX(100%);
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
}

.gb-tabs {
    display: flex;
    gap: 0.4rem;
    padding: 0.75rem 1.1rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    flex-shrink: 0;
}

.gb-tab {
    flex: 1;
    padding: 0.45rem 0.5rem;
    border-radius: 0.6rem 0.6rem 0 0;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease;
    font-family: inherit;
}

.gb-tab.active {
    color: #fb923c;
    border-bottom-color: #f97316;
}

.gb-tab-content {
    display: none;
    flex-direction: column;
    min-height: 0;
}

.gb-tab-content.active {
    display: flex;
    flex: 1;
}

.gb-panel-header {
    padding: 1rem 1.1rem 0.75rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.gb-panel-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
}

.gb-panel-title svg {
    color: var(--primary-orange);
}

.gb-panel-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 0.5rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.gb-panel-close:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.gb-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(249, 115, 22, 0.3) transparent;
}

.gb-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.gb-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.gb-input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-light);
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gb-input:focus {
    outline: none;
    border-color: rgba(249, 115, 22, 0.6);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.gb-mini-map-wrap {
    border-radius: 0.85rem;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    height: 180px;
    position: relative;
}

#gb-panel-map {
    width: 100%;
    height: 100%;
}

.gb-map-hint {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(17, 24, 39, 0.82);
    border: 1px solid rgba(249, 115, 22, 0.3);
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    font-size: 0.68rem;
    color: #fb923c;
    pointer-events: none;
    white-space: nowrap;
    z-index: 10;
}

.gb-gps-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    padding: 0.6rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(249, 115, 22, 0.4);
    background: rgba(249, 115, 22, 0.08);
    color: #fb923c;
    transition: all 0.2s ease;
    font-family: inherit;
}

.gb-gps-btn:hover {
    background: rgba(249, 115, 22, 0.16);
    border-color: rgba(249, 115, 22, 0.65);
    color: #fff;
}

.gb-upload {
    border: 1.5px dashed rgba(148, 163, 184, 0.25);
    border-radius: 0.85rem;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.02);
    position: relative;
}

.gb-upload:hover {
    border-color: rgba(249, 115, 22, 0.5);
    background: rgba(249, 115, 22, 0.05);
}

.gb-upload input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.gb-upload p {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.gb-panel-footer {
    padding: 0.85rem 1.1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    flex-shrink: 0;
}

.gb-submit-btn {
    width: 100%;
    padding: 0.8rem;
    border-radius: 0.85rem;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid rgba(249, 115, 22, 0.5);
    background: linear-gradient(135deg, #f97316, #ea6c0a);
    color: #fff;
    box-shadow: 0 2px 10px rgba(249, 115, 22, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transition: all 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.gb-submit-btn:hover {
    background: linear-gradient(135deg, #fb923c, #f97316);
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.45);
    transform: translateY(-1px);
}

.gb-eq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gb-eq-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.1);
    cursor: pointer;
    transition: all 0.15s ease;
}

.gb-eq-item:hover {
    background: rgba(249, 115, 22, 0.06);
    border-color: rgba(249, 115, 22, 0.25);
}

.gb-eq-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f97316;
    flex-shrink: 0;
}

.gb-eq-info {
    flex: 1;
    min-width: 0;
}

.gb-eq-info strong {
    font-size: 0.82rem;
    font-weight: 600;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gb-eq-info span {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.custom-cluster {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 800;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.cluster-sm {
    width: 36px;
    height: 36px;
    background: rgba(249, 115, 22, 0.9);
    font-size: 0.78rem;
}

.cluster-md {
    width: 46px;
    height: 46px;
    background: rgba(234, 88, 12, 0.92);
    font-size: 0.85rem;
}

.cluster-lg {
    width: 56px;
    height: 56px;
    background: rgba(194, 65, 12, 0.95);
    font-size: 0.9rem;
}

.eq-popup .leaflet-popup-content-wrapper {
    background: rgba(17, 24, 39, 0.96) !important;
    border: 1px solid rgba(249, 115, 22, 0.3) !important;
    border-radius: 0.85rem !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(12px) !important;
    padding: 0 !important;
}

.eq-popup .leaflet-popup-content {
    margin: 0 !important;
    color: #e5e7eb !important;
    font-family: "Inter", sans-serif !important;
    min-width: 200px;
}

.eq-popup .leaflet-popup-tip {
    background: rgba(17, 24, 39, 0.95) !important;
}

.eq-popup .leaflet-popup-close-button {
    color: #9ca3af !important;
    top: 8px !important;
    right: 10px !important;
}

.popup-body {
    padding: 0.85rem 1rem;
}

.popup-body h4 {
    font-size: 0.88rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: #fff;
}

.popup-code {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(249, 115, 22, 0.12);
    color: #fb923c;
    border: 1px solid rgba(249, 115, 22, 0.25);
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    margin-bottom: 0.5rem;
}

.popup-zone {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
}

.popup-edit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    padding: 0.42rem;
    border-radius: 0.6rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(249, 115, 22, 0.4);
    background: rgba(249, 115, 22, 0.1);
    color: #fb923c;
    transition: all 0.18s ease;
    font-family: inherit;
}

.popup-edit-btn:hover {
    background: linear-gradient(135deg, #f97316, #ea6c0a);
    color: #fff;
    border-color: #f97316;
}

.gb-eq-tooltip.leaflet-tooltip {
    background: rgba(17, 24, 39, 0.96);
    border: 1px solid rgba(249, 115, 22, 0.55);
    color: #f8fafc;
    border-radius: 999px;
    padding: 0.24rem 0.62rem;
    font-size: 0.72rem;
    font-weight: 600;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
}

.gb-eq-tooltip.leaflet-tooltip-top::before {
    border-top-color: rgba(249, 115, 22, 0.55);
}

@media (max-width: 900px) {
    .gb-layout {
        height: calc(100vh - 220px);
        min-height: 500px;
    }
}

@media (max-width: 640px) {
    .gb-layout {
        height: calc(100vh - 170px);
        min-height: 540px;
        border-radius: 0.95rem;
    }

    #gb-map-full {
        height: 100%;
    }

    .gb-topbar {
        padding: 0.55rem 0.6rem;
        align-items: flex-start;
        gap: 0.4rem;
    }

    .gb-topbar-right {
        margin-left: auto;
        gap: 0.45rem;
    }

    .gb-stat {
        padding: 0.22rem 0.48rem;
        font-size: 0.68rem;
    }

    .gb-add-fab {
        padding: 0.45rem 0.7rem;
        border-radius: 0.68rem;
        font-size: 0.74rem;
        gap: 0.35rem;
    }

    .gb-panel {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        border-left: none;
        border-top: 1px solid rgba(148, 163, 184, 0.12);
        height: min(78vh, 640px);
        max-height: 82%;
        border-radius: 1rem 1rem 0 0;
        box-shadow: 0 -14px 34px rgba(0, 0, 0, 0.42);
        z-index: 540;
    }

    .gb-panel.collapsed {
        transform: translateY(102%);
        top: auto;
        right: 0;
        left: 0;
    }

    .gb-tabs {
        padding: 0.6rem 0.85rem 0;
    }

    .gb-panel-header {
        padding: 0.78rem 0.85rem 0.68rem;
    }

    .gb-panel-body {
        padding: 0.78rem 0.85rem 0.95rem;
    }

    .gb-mini-map-wrap {
        height: 132px;
    }

    .gb-panel-footer {
        padding: 0.65rem 0.85rem calc(0.85rem + env(safe-area-inset-bottom));
    }

    .gb-submit-btn {
        padding: 0.72rem;
        font-size: 0.84rem;
    }

    .gb-title-block h2 {
        font-size: 0.84rem;
        line-height: 1.2;
        max-width: 140px;
    }

    .gb-title-block p {
        display: none;
    }
}

/* =========================================================
   AJUSTES GLOBALES MOVIL
   ========================================================= */
@media (max-width: 768px) {
    #main-content {
        padding: 0.75rem;
        padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.7rem;
    }

    .section-header .header-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .card,
    .dashboard-wrapper {
        padding: 0.85rem;
    }

    .form-grid,
    .equipment-form-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: calc(100% - 1rem);
        max-height: 92vh;
        border-radius: 0.95rem;
    }

    .equipment-view-header {
        padding: 0.85rem;
        gap: 0.75rem;
    }

    .equipment-view-title {
        width: 100%;
        flex-wrap: wrap;
    }

    .equipment-view-actions {
        width: 100%;
    }

    .equipment-search-wrapper {
        width: 100%;
        min-width: 0;
    }

    .equipment-submenu-wrapper {
        flex: 1 1 calc(50% - 0.4rem);
    }

    .equipment-submenu-toggle {
        width: 100%;
        min-width: 0;
    }

    .equipment-submenu-panel {
        right: auto;
        left: 0;
        width: 100%;
    }

    .equipment-view-actions .btn {
        flex: 1 1 calc(50% - 0.4rem);
    }

    .equipment-plant-map-layout {
        grid-template-columns: 1fr;
    }

    .equipment-plant-map-canvas {
        min-height: 340px;
    }

    .equipment-plant-map-sidebar {
        min-height: 0;
    }

    .equipment-context-card-header {
        flex-direction: column;
    }

    .profiles-table-wrapper,
    .table-wrapper {
        overflow-x: auto;
    }
}

/* =========================================================
   GESTION PANEL
   ========================================================= */
.pg-wrap {
    background: linear-gradient(180deg, #171e2d 0%, #141b28 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 1rem;
    padding: 1.1rem 1.2rem 1.2rem;
    margin-bottom: 1.25rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.pg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.pg-header-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.pg-header-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.75rem;
    background: rgba(232, 98, 42, 0.16);
    color: #e8622a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pg-header-icon svg {
    width: 1.05rem;
    height: 1.05rem;
    fill: currentColor;
}

.pg-title {
    font-size: 1rem;
    font-weight: 700;
    color: #eef2ff;
    letter-spacing: -0.01em;
}

.pg-subtitle {
    margin-top: 0.12rem;
    font-size: 0.82rem;
    color: #93a0ba;
}

.pg-count {
    font-size: 0.72rem;
    color: #63718d;
    white-space: nowrap;
}

.pg-grid {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 0.55rem;
}

.pg-card {
    background: #1b2333;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0.95rem;
    padding: 0.78rem 0.38rem 0.7rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.48rem;
    min-height: 5.6rem;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
    user-select: none;
}

.pg-card:hover {
    background: #202a3c;
    border-color: rgba(232, 98, 42, 0.4);
    transform: translateY(-2px);
}

.pg-card:active {
    transform: translateY(0);
}

.pg-card.gestion-tab-btn.active {
    background: linear-gradient(180deg, #222d3f 0%, #1d2636 100%);
    border-color: rgba(232, 98, 42, 0.55);
    box-shadow: 0 0 0 1px rgba(232, 98, 42, 0.18) inset;
}

.pg-card-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.72rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pg-card-icon svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

.pg-card-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.12rem;
    font-size: 0.74rem;
    font-weight: 700;
    color: #edf2ff;
    text-align: center;
    line-height: 1.18;
}

.pg-card-label small {
    font-size: 0.58rem;
    font-weight: 500;
    color: #7e8aa6;
}

.pg-icon-orange {
    background: rgba(232, 98, 42, 0.15);
    color: #e8622a;
}

.pg-icon-blue {
    background: rgba(79, 124, 255, 0.15);
    color: #4f7cff;
}

.pg-icon-green {
    background: rgba(46, 196, 107, 0.15);
    color: #2ec46b;
}

.pg-icon-purple {
    background: rgba(199, 125, 255, 0.15);
    color: #c77dff;
}

.pg-icon-amber {
    background: rgba(255, 180, 0, 0.15);
    color: #ffb400;
}

.pg-icon-teal {
    background: rgba(46, 196, 180, 0.15);
    color: #2ec4b6;
}

.pg-icon-red {
    background: rgba(255, 92, 92, 0.15);
    color: #ff5c5c;
}

@media (max-width: 1180px) {
    .pg-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .pg-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .pg-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .pg-wrap {
        padding: 0.95rem;
    }

    .pg-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .pg-card {
        min-height: 6.4rem;
        padding: 0.85rem 0.55rem 0.75rem;
    }

    .pg-card-icon {
        width: 2.7rem;
        height: 2.7rem;
    }

    .pg-card-label {
        font-size: 0.8rem;
    }
}
