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

:root {

    --bg: #0b1929;

    --surface: #0f2035;

    --card: #122540;

    --border: rgba(40, 114, 196, 0.2);

    --accent: #2872c4;

    --accent2: #3db843;

    --green: #3db843;

    --danger: #e74c3c;

    --text: #e8edf5;

    --muted: #7a8fa6;

    --navy: #1a3461;

}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', sans-serif;
    min-height: 100vh;
}


/* TOPBAR */

.topbar {

    position: sticky;
    top: 0;
    z-index: 100;

    display: flex;
    align-items: center;
    gap: 16px;

    padding: 0 24px;

    background: rgba(10, 22, 40, 0.98);

    border-bottom: 1px solid rgba(40, 114, 196, 0.25);

    backdrop-filter: blur(12px);

    box-shadow: 0 1px 20px rgba(0, 0, 0, .35);

}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    text-decoration: none;
}
.topbar-brand:hover { color: #fff; text-decoration: none; opacity: .85; }

.topbar-docs-link {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,.55);
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,.12);
    transition: color .15s, border-color .15s, background .15s;
    white-space: nowrap;
}
.topbar-docs-link svg { stroke: currentColor; }
.topbar-docs-link:hover {
    color: #00d4ff;
    border-color: rgba(0,212,255,.4);
    background: rgba(0,212,255,.07);
    text-decoration: none;
}

.topbar-brand svg {
    stroke: var(--accent2);
}

.topbar-search {

    flex: 1;
    max-width: 380px;

    display: flex;
    align-items: center;
    gap: 8px;

    background: rgba(255, 255, 255, 0.04);

    border: 1px solid var(--border);
    border-radius: 8px;

    padding: 0 14px;
    height: 36px;

}

.topbar-search input {

    background: none;
    border: none;
    outline: none;

    color: var(--text);
    font-size: 13px;
    width: 100%;

}

.topbar-search svg {
    width: 16px;
    height: 16px;
    stroke: var(--muted);
    flex-shrink: 0;
}

/* NOTIFICATIONS */
.topbar-notif {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.topbar-notif:hover {
    background: rgba(0, 212, 255, .08);
    border-color: rgba(0, 212, 255, .3);
}

.topbar-notif svg {
    width: 20px;
    height: 20px;
    stroke: var(--text);
    fill: none;
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff9800; /* Naranja/Orange per user request */
    color: #000;
    font-size: 10px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid #0a1628;
    box-sizing: border-box;
}

.notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    background: #0d1b2a;
    border: 1px solid rgba(0, 212, 255, .2);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .6);
    overflow: hidden;
    z-index: 600;
    flex-direction: column;
}

.notif-dropdown.open {
    display: flex;
}

.notif-header {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(0, 212, 255, .1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notif-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: white;
    margin: 0;
}

.notif-view-all {
    font-size: 12px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.notif-view-all:hover {
    text-decoration: underline;
}

.notif-body {
    max-height: 380px;
    overflow-y: auto;
}

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

.notif-item {
    display: flex;
    flex-direction: column;
    padding: 12px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .04);
    cursor: pointer;
    transition: background .15s;
    text-decoration: none;
}

.notif-item:hover {
    background: rgba(0, 212, 255, .05);
}

.notif-item-title {
    font-size: 13px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.notif-item-body {
    font-size: 12px;
    color: #c8d8e8;
    line-height: 1.4;
    margin-bottom: 6px;
}

.notif-item-meta {
    font-size: 11px;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
}

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.project-count {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}

.btn-new {

    display: flex;
    align-items: center;
    gap: 8px;

    background: var(--accent);
    color: #000;

    border: none;
    border-radius: 8px;

    padding: 9px 18px;
    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
    letter-spacing: .5px;
    white-space: nowrap;

    transition: background .2s, transform .15s;

}

.btn-new:hover {
    background: #fff;
    transform: translateY(-1px);
}

.btn-new svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}


/* USER DROPDOWN */

.user-menu {
    position: relative;
}

.user-btn {

    display: flex;
    align-items: center;
    gap: 8px;

    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--border);

    border-radius: 8px;
    padding: 5px 12px 5px 6px;

    cursor: pointer;
    transition: background .15s, border-color .15s;

}

.user-btn:hover {
    background: rgba(0, 212, 255, .08);
    border-color: rgba(0, 212, 255, .3);
}

.user-btn img {

    width: 28px;
    height: 28px;
    border-radius: 50%;

    object-fit: cover;
    border: 1px solid rgba(0, 212, 255, .25);
    flex-shrink: 0;

}

.user-btn-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    max-width: 130px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-btn-arrow {
    font-size: 9px;
    color: var(--muted);
    margin-left: 2px;
}

.user-dropdown {

    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;

    min-width: 180px;
    background: #0d1b2a;

    border: 1px solid rgba(0, 212, 255, .2);
    border-radius: 10px;

    box-shadow: 0 8px 30px rgba(0, 0, 0, .6);
    overflow: hidden;
    z-index: 500;

}

.user-dropdown.open {
    display: block;
}

.user-dd-item {

    display: flex;
    align-items: center;
    gap: 9px;

    padding: 10px 16px;
    font-size: 13px;
    color: #c8d8e8;

    cursor: pointer;
    transition: background .12s;

    text-decoration: none;

}

.user-dd-item:hover {
    background: rgba(0, 212, 255, .1);
    color: var(--accent);
}

.user-dd-item.danger:hover {
    background: rgba(255, 77, 77, .12);
    color: var(--danger);
}

.user-dd-sep {
    height: 1px;
    background: rgba(0, 212, 255, .08);
    margin: 3px 0;
}


/* AUTH topbar buttons */

.btn-signin {

    padding: 7px 18px;
    background: transparent;
    color: var(--accent);

    border: 1px solid rgba(0, 212, 255, .35);
    border-radius: 8px;

    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;

    white-space: nowrap;

}

.btn-signin:hover {
    background: rgba(0, 212, 255, .1);
}

.btn-signup {

    padding: 7px 18px;
    background: var(--accent);
    color: #000;

    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;

}

.btn-signup:hover {
    background: #fff;
}


/* password-toggle wrapper */

.pw-wrap {
    position: relative;
}

.pw-wrap input {
    padding-right: 40px;
}

.pw-toggle {

    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);

    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;

    font-size: 15px;
    line-height: 1;
    padding: 0;

}


/* COLLABORATOR PENDING ORDERS ALERT */

.collab-wo-alert {
    background: linear-gradient(90deg, rgba(255, 140, 0, 0.13) 0%, rgba(255, 140, 0, 0.06) 100%);
    border-bottom: 1px solid rgba(255, 140, 0, 0.3);
    padding: 10px 24px;
}

.collab-wo-alert-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 0 auto;
}

.collab-wo-alert-icon {
    color: #ffa500;
    font-size: 15px;
    flex-shrink: 0;
}

.collab-wo-alert-msg {
    flex: 1;
    font-size: 13px;
    color: var(--text-muted, #a0b8d0);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.collab-wo-alert-msg strong {
    color: #ffd080;
}

.collab-wo-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 140, 0, 0.15);
    border: 1px solid rgba(255, 140, 0, 0.35);
    color: #ffbb55;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s;
}

.collab-wo-chip:hover {
    background: rgba(255, 140, 0, 0.28);
    border-color: rgba(255, 140, 0, 0.6);
}

.collab-wo-chip--progress {
    background: rgba(0, 180, 220, 0.12);
    border-color: rgba(0, 180, 220, 0.35);
    color: #5dd0f0;
}

.collab-wo-chip-title {
    font-weight: 700;
}

.collab-wo-chip-sep {
    opacity: 0.5;
    font-weight: 400;
}

.collab-wo-chip-project {
    font-weight: 400;
    opacity: 0.85;
}

.collab-wo-due {
    font-weight: 400;
    opacity: 0.65;
    font-size: 10px;
    margin-left: 2px;
}

.collab-wo-goto {
    flex-shrink: 0;
    background: rgba(255, 140, 0, 0.2);
    border: 1px solid rgba(255, 140, 0, 0.5);
    color: #ffa500;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.collab-wo-goto:hover {
    background: rgba(255, 140, 0, 0.35);
    color: #fff;
}

.collab-wo-dismiss {
    flex-shrink: 0;
    background: none;
    border: none;
    color: rgba(255, 140, 0, 0.5);
    font-size: 14px;
    cursor: pointer;
    padding: 2px 4px;
    line-height: 1;
    transition: color 0.2s;
}

.collab-wo-dismiss:hover {
    color: #ffa500;
}

/* GRID */

.main {
    padding: 28px 28px 60px;
}

.grid {

    display: grid;

    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));

    gap: 20px;

}


/* CARD */

.project-card {

    background: var(--card);
    border: 1px solid var(--border);

    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;

    transition: transform .18s, border-color .18s, box-shadow .18s;

    display: flex;
    flex-direction: column;

}

.project-card:hover {

    transform: translateY(-4px);

    border-color: var(--accent);

    box-shadow: 0 12px 40px rgba(0, 212, 255, 0.14);

}

.card-thumb {

    height: 160px;
    overflow: hidden;
    background: #0a1624;

    position: relative;

}

.card-thumb img {

    width: 100%;
    height: 100%;
    object-fit: cover;

    transition: transform .4s;

}

.project-card:hover .card-thumb img {
    transform: scale(1.05);
}

.card-thumb .no-img {

    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 8px;
    color: #2a3d55;

}

.card-thumb .no-img svg {
    width: 44px;
    height: 44px;
    stroke: currentColor;
    opacity: .4;
}

.card-thumb .no-img span {
    font-size: 11px;
}

.badge-new {

    position: absolute;
    top: 10px;
    right: 10px;

    background: var(--green);
    color: #000;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;

    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;

}

.badge-my-pending {
    position: absolute;
    bottom: 8px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 180, 220, 0.85);
    color: #001a22;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px 3px 6px;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 180, 220, 0.4);
    z-index: 10;
    user-select: none;
}

.badge-my-pending .fas {
    font-size: 10px;
}

.badge-unassigned {
    position: absolute;
    bottom: 8px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(220, 53, 69, 0.88);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px 3px 6px;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.45);
    z-index: 10;
    user-select: none;
    max-width: calc(100% - 20px);
    flex-wrap: wrap;
    line-height: 1.4;
}

.badge-unassigned .fas {
    font-size: 10px;
    flex-shrink: 0;
}

.badge-approval-bell {
    position: absolute;
    top: 8px;
    left: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 165, 0, 0.92);
    color: #1a0a00;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px 3px 6px;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.5);
    animation: bell-pulse 2.4s ease-in-out infinite;
    z-index: 10;
    user-select: none;
}

.badge-approval-bell .fas.fa-bell {
    font-size: 10px;
}

.badge-approval-count {
    font-size: 11px;
    line-height: 1;
}

@keyframes bell-pulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(255, 140, 0, 0.5); }
    50%       { box-shadow: 0 2px 16px rgba(255, 140, 0, 0.85); }
}

.card-body {
    padding: 14px 16px 10px;
    flex: 1;
}

.card-title {

    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;

    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;

}

.card-stats {

    display: flex;
    gap: 12px;
    flex-wrap: wrap;

    font-size: 11px;
    color: var(--muted);
    margin-bottom: 4px;

}

.card-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-stats svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
}

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


/* FOOTER */

.card-footer {

    display: flex;
    border-top: 1px solid var(--border);

    background: rgba(0, 0, 0, .2);

}

.card-action {

    flex: 1;
    border: none;
    background: none;

    color: var(--muted);
    font-size: 12px;
    font-weight: 600;

    padding: 10px 6px;
    cursor: pointer;
    letter-spacing: .5px;

    transition: color .15s, background .15s;

}

.card-action:hover {
    color: var(--accent);
    background: rgba(0, 212, 255, .06);
}

.card-action.danger:hover {
    color: var(--danger);
    background: rgba(255, 77, 77, .06);
}

.card-action + .card-action {
    border-left: 1px solid var(--border);
}


/* EMPTY STATE */

.empty-state {

    grid-column: 1 / -1;
    text-align: center;

    padding: 80px 20px;
    color: var(--muted);

}

.empty-state svg {
    width: 64px;
    height: 64px;
    stroke: #1e3a55;
    margin-bottom: 18px;
}

.empty-state h2 {
    font-size: 18px;
    color: #2a4a6a;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13px;
}


/* MODAL */

.modal-overlay {

    display: none;
    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, .75);
    z-index: 200;

    align-items: center;
    justify-content: center;

}

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

.modal {

    background: var(--surface);
    border: 1px solid var(--border);

    border-radius: 16px;
    padding: 28px 32px;
    width: 420px;

    max-width: 95vw;

}

.modal h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}

.form-group input, .form-group textarea {

    width: 100%;
    background: rgba(255, 255, 255, 0.05);

    border: 1px solid var(--border);
    border-radius: 8px;

    padding: 10px 12px;
    color: var(--text);
    font-size: 13px;
    outline: none;

}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--accent);
}

.modal-btns {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.btn-cancel {

    background: none;
    border: 1px solid var(--border);
    color: var(--muted);

    border-radius: 7px;
    padding: 9px 20px;
    font-size: 13px;
    cursor: pointer;

    transition: border-color .15s;

}

.btn-cancel:hover {
    border-color: var(--accent);
}

.btn-save {

    background: var(--accent);
    color: #000;
    border: none;

    border-radius: 7px;
    padding: 9px 22px;
    font-size: 13px;

    font-weight: 700;
    cursor: pointer;
    transition: background .2s;

}

.btn-save:hover {
    background: #fff;
}


/* RENAME inline */

.card-title-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-rename {

    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;

    padding: 2px;
    font-size: 13px;
    opacity: 0;
    transition: opacity .15s;

    flex-shrink: 0;

}

.project-card:hover .btn-rename {
    opacity: 1;
}

.btn-rename:hover {
    color: var(--accent);
}


/* OBS MODAL */

.obs-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 12px;
}

.obs-item {

    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--border);

    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    font-size: 12px;

}

.obs-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.obs-type {
    font-weight: 700;
    font-size: 11px;
    color: var(--accent);
}

.obs-date {
    font-size: 10px;
    color: var(--muted);
}

.obs-text {
    color: #c0d0e0;
    line-height: 1.5;
}

.obs-filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.obs-tab {

    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;

    border: 1px solid var(--border);
    background: none;
    color: var(--muted);

    transition: all .15s;

}

.obs-tab.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    font-weight: 700;
}

.obs-tif-header {

    display: flex;
    align-items: center;
    gap: 8px;

    padding: 6px 0 4px;

    margin: 10px 0 6px;

    border-bottom: 1px solid rgba(0, 212, 255, .18);

    font-size: 11px;
    font-weight: 700;

    color: var(--accent);
    letter-spacing: .5px;

    text-transform: uppercase;

}

.obs-tif-header:first-child {
    margin-top: 0;
}

.obs-tif-count {

    margin-left: auto;
    background: rgba(0, 212, 255, .12);

    border: 1px solid rgba(0, 212, 255, .25);

    border-radius: 10px;
    padding: 1px 8px;

    font-size: 10px;
    color: var(--accent);
    font-weight: 600;

}


/* ROLE BADGES */

.role-badge {

    display: inline-flex;
    align-items: center;
    gap: 4px;

    font-size: 10px;
    font-weight: 700;
    letter-spacing: .6px;

    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;

    margin-bottom: 5px;

}

.role-badge.owner {
    background: rgba(0, 212, 255, .12);
    color: var(--accent);
    border: 1px solid rgba(0, 212, 255, .3);
}

.role-badge.inspector {
    background: rgba(0, 255, 136, .12);
    color: var(--green);
    border: 1px solid rgba(0, 255, 136, .3);
}

.role-badge.colaborador {
    background: rgba(255, 193, 7, .12);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, .3);
}


/* ── SweetAlert above all modals ── */

.swal2-container {
    z-index: 99999 !important;
}


/* ═══ MODAL PARTIALS — shared member/user rows ════════════════════════════ */

.modal-member-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 4px;
    border-bottom: 1px solid rgba(0, 212, 255, .08);
}

.modal-member-row:last-child {
    border-bottom: none;
}

.modal-user-row {
    flex-wrap: wrap;
}

.modal-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(0, 212, 255, .2);
    flex-shrink: 0;
}

.modal-person-info {
    flex: 1;
    min-width: 0;
}

.modal-person-name {
    font-size: 13px;
    font-weight: 600;
    color: #e0eaf8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-person-sub {
    font-size: 11px;
    color: #4a6a8a;
}

.modal-role-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

.modal-role-badge--inspector {
    background: rgba(0, 255, 136, .12);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, .3);
}

.modal-role-badge--colaborador {
    background: rgba(255, 193, 7, .12);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, .3);
}

.modal-remove-btn {
    background: none;
    border: none;
    color: #ff5555;
    cursor: pointer;
    font-size: 13px;
    padding: 2px 5px;
    opacity: .7;
    transition: opacity .15s;
}

.modal-remove-btn:hover {
    opacity: 1;
}

.modal-list-empty {
    color: #4a6a8a;
    font-size: 12px;
    text-align: center;
    padding: 16px 0;
}

.modal-pw-btn {
    flex-shrink: 0;
    padding: 5px 12px;
    background: rgba(0, 212, 255, .1);
    color: #00d4ff;
    border: 1px solid rgba(0, 212, 255, .3);
    border-radius: 7px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.modal-pw-row {
    width: 100%;
    margin-top: 8px;
}

.modal-pw-inner {
    display: flex;
    gap: 8px;
    align-items: center;
}

.modal-pw-input-wrap {
    flex: 1;
}

.modal-pw-input {
    width: 100%;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px 36px 7px 10px;
    color: var(--text);
    font-size: 12px;
    outline: none;
}

.modal-pw-save {
    padding: 7px 14px;
    background: #00d4ff;
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.modal-pw-cancel {
    padding: 7px 10px;
    background: none;
    border: 1px solid rgba(0, 212, 255, .2);
    color: #6a8a9a;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
}

.modal-pw-err {
    font-size: 11px;
    color: #ff7070;
    margin-top: 5px;
}


/* ═══ MODAL PARTIALS — observation ════════════════════════════════════════ */

.obs-info-card {
    background: rgba(0, 212, 255, .05);
    border: 1px solid rgba(0, 212, 255, .2);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.obs-info-row {
    font-size: 12px;
    color: var(--text);
    margin-bottom: 6px;
}

.obs-info-row:last-child {
    margin-bottom: 0;
}

.obs-info-icon {
    width: 12px;
    height: 12px;
    margin-right: 2px;
    display: inline-block;
    vertical-align: text-bottom;
}

.obs-section-label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 8px;
}

.obs-tif-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.obs-tif-card {
    display: flex;
    align-items: center;
    background: #0f2035;
    border: 1px solid rgba(0, 82, 153, .6);
    border-radius: 8px;
    padding: 10px;
    color: #e0eaf8;
}

.obs-tif-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    margin-right: 12px;
    border: 1px solid rgba(0, 212, 255, .2);
    flex-shrink: 0;
}

.obs-tif-thumb--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .4);
    font-size: 16px;
}

.obs-tif-info {
    flex: 1;
    min-width: 0;
}

.obs-tif-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.obs-tif-meta {
    font-size: 10px;
    color: #8ab;
    margin-top: 4px;
}

.obs-tif-dl {
    padding: 6px;
    background: rgba(0, 212, 255, .1);
    border: 1px solid rgba(0, 212, 255, .3);
    color: #00d4ff;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    margin-left: 8px;
    flex-shrink: 0;
}

.obs-tif-group {
    margin-bottom: 4px;
}

.obs-type-icon {
    font-size: 13px;
}

.obs-type-icon--punto { color: #ff5555; }
.obs-type-icon--area  { color: #ffee44; }
.obs-type-icon--linea { color: #00d4ff; }
.obs-type-icon--forma { color: #ff8800; }

.obs-type-label {
    color: #5a7a9a;
    font-size: 10px;
    font-weight: 400;
    margin-left: 4px;
}

.obs-ann-meta {
    font-size: 10px;
    color: #4a8a9a;
    margin-top: 4px;
}

.obs-ann-notes {
    font-size: 10px;
    color: #4a8a6a;
    margin-top: 2px;
}

.obs-empty-msg {
    color: #4a6a8a;
    font-size: 12px;
    text-align: center;
    padding: 20px 0;
}

.obs-empty-msg--sm {
    font-size: 11px;
    padding: 8px 0;
    color: #4a6a8a;
}

.obs-tif-expand {
    border: 1px solid rgba(40,114,196,.18);
    border-radius: 8px;
    margin-bottom: 6px;
    background: rgba(15,32,53,.7);
    overflow: hidden;
}

.obs-tif-expand[open] .obs-tif-chevron i {
    transform: rotate(180deg);
}

.obs-tif-summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    cursor: pointer;
    user-select: none;
}

.obs-tif-summary::-webkit-details-marker {
    display: none;
}

.obs-tif-summary:hover {
    background: rgba(40,114,196,.08);
}

.obs-tif-thumb {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
}

.obs-tif-thumb--empty {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    background: rgba(40,114,196,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.obs-tif-info {
    flex: 1;
    min-width: 0;
}

.obs-tif-name {
    font-size: 12px;
    font-weight: 600;
    color: #c8d8e8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.obs-tif-meta {
    font-size: 10px;
    color: #4a6a8a;
    margin-top: 1px;
}

.obs-tif-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.obs-tif-pill {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

.obs-tif-pill--punto {
    background: rgba(255,183,77,.12);
    color: #ffb74d;
    border: 1px solid rgba(255,183,77,.25);
}

.obs-tif-pill--area {
    background: rgba(61,184,67,.12);
    color: #3db843;
    border: 1px solid rgba(61,184,67,.25);
}

.obs-tif-pill--linea {
    background: rgba(0,212,255,.10);
    color: #00d4ff;
    border: 1px solid rgba(0,212,255,.22);
}

.obs-tif-pill--forma {
    background: rgba(148,0,211,.12);
    color: #bb66ee;
    border: 1px solid rgba(148,0,211,.25);
}

.obs-tif-pill--order {
    background: rgba(40,114,196,.12);
    color: #6aacf8;
    border: 1px solid rgba(40,114,196,.25);
}

.obs-tif-pill--inv {
    background: rgba(155,89,182,.12);
    color: #bb88ee;
    border: 1px solid rgba(155,89,182,.25);
}

.obs-inv-row--sm {
    padding: 4px 6px;
    border-radius: 5px;
    margin-bottom: 3px;
}

.obs-inv-row--clickable {
    cursor: pointer;
    transition: background .15s;
}

.obs-inv-row--clickable:hover {
    background: rgba(40,114,196,.12);
}

.obs-inv-detail-arrow {
    font-size: 10px;
    color: #3a5a7a;
    flex-shrink: 0;
    margin-left: 2px;
}

.obs-inv-detail-panel {
    position: absolute;
    inset: 0;
    background: #0a1929;
    z-index: 10;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
}

.obs-inv-detail-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(40,114,196,.2);
    flex-shrink: 0;
}

.obs-inv-detail-back {
    background: none;
    border: none;
    color: #4a8aaa;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 6px;
    border-radius: 5px;
    transition: color .15s, background .15s;
}

.obs-inv-detail-back:hover {
    color: #00d4ff;
    background: rgba(0,212,255,.08);
}

.obs-inv-detail-title {
    font-size: 13px;
    font-weight: 700;
    color: #c8d8e8;
}

.obs-inv-detail-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
}

.oid-icon-wrap {
    text-align: center;
    margin-bottom: 14px;
}

.oid-icon {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(40,114,196,.1);
    padding: 4px;
}

.oid-section {
    background: rgba(15,32,53,.7);
    border: 1px solid rgba(40,114,196,.15);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.oid-row {
    margin-bottom: 7px;
}

.oid-row:last-child {
    margin-bottom: 0;
}

.oid-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #4a6a8a;
    margin-bottom: 2px;
}

.oid-val {
    font-size: 12px;
    color: #c0d8e8;
}

.oid-coords {
    font-size: 11px;
    font-family: monospace;
    color: #7ab8d8;
}

.oid-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 8px;
}

.oid-badge--condition {
    background: rgba(255,183,77,.12);
    color: #ffb74d;
}

.oid-badge--opstatus {
    background: rgba(61,184,67,.12);
    color: #3db843;
}

.oid-badge--out_of_service {
    background: rgba(231,76,60,.12);
    color: #e74c3c;
}

.oid-badge--maintenance {
    background: rgba(255,183,77,.12);
    color: #ffb74d;
}

.oid-badge--criticality {
    background: rgba(40,114,196,.12);
    color: #6aacf8;
}

.obs-tif-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.obs-tif-dl {
    color: #4a8aaa;
    font-size: 13px;
    text-decoration: none;
    padding: 4px 5px;
    border-radius: 5px;
    transition: color .15s, background .15s;
}

.obs-tif-dl:hover {
    color: #00d4ff;
    background: rgba(0,212,255,.08);
    text-decoration: none;
}

.obs-tif-chevron {
    color: #4a6a8a;
    font-size: 11px;
    transition: transform .2s;
}

.obs-tif-chevron i {
    transition: transform .2s;
}

.obs-tif-body {
    padding: 10px 12px 12px;
    border-top: 1px solid rgba(40,114,196,.12);
    background: rgba(9,20,36,.5);
}

.obs-tif-body-section {
    margin-bottom: 8px;
}

.obs-tif-body-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #4a6a8a;
    margin-bottom: 6px;
}

.obs-order-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(40,114,196,.08);
}

.obs-order-row:last-child {
    border-bottom: none;
}

.obs-order-info {
    flex: 1;
    min-width: 0;
}

.obs-order-title {
    font-size: 12px;
    font-weight: 600;
    color: #c8d8e8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.obs-order-collab {
    font-size: 10px;
    color: #4a6a8a;
    margin-top: 1px;
}

.obs-order-status {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.obs-order-status--pendiente {
    background: rgba(255,183,77,.12);
    color: #ffb74d;
}

.obs-order-status--en_proceso {
    background: rgba(0,212,255,.10);
    color: #00d4ff;
}

.obs-order-status--completada {
    background: rgba(61,184,67,.12);
    color: #3db843;
}

.obs-order-status--cerrada {
    background: rgba(120,120,120,.12);
    color: #7a8fa6;
}

.obs-inv-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.obs-inv-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 7px;
    background: rgba(15,32,53,.7);
    border: 1px solid rgba(40,114,196,.15);
}

.obs-inv-icon {
    width: 32px;
    height: 32px;
    border-radius: 5px;
    object-fit: contain;
    flex-shrink: 0;
}

.obs-inv-icon--empty {
    width: 32px;
    height: 32px;
    border-radius: 5px;
    background: rgba(40,114,196,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a6a8a;
    font-size: 14px;
    flex-shrink: 0;
}

.obs-inv-info {
    flex: 1;
    min-width: 0;
}

.obs-inv-name {
    font-size: 12px;
    font-weight: 600;
    color: #c8d8e8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.obs-inv-sub {
    font-size: 10px;
    color: #4a6a8a;
    margin-top: 1px;
}

.obs-inv-status {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.obs-inv-status--active {
    background: rgba(61,184,67,.12);
    color: #3db843;
}

.obs-inv-status--out_of_service {
    background: rgba(231,76,60,.12);
    color: #e74c3c;
}

.obs-inv-status--maintenance {
    background: rgba(255,183,77,.12);
    color: #ffb74d;
}


/* ═══ RESPONSIVE ══════════════════════════════════════ */


/* Tablet 641–1024 */

@media (max-width: 1024px) {

    .topbar {
        padding: 0 16px;
        gap: 10px;
    }

    .topbar-search {
        max-width: 260px;
    }

    .main {
        padding: 20px 16px 50px;
    }

    .grid {
        gap: 16px;
    }

}


/* Mobile ≤ 640 */

@media (max-width: 640px) {


    /* Topbar: 2-row layout */
    .topbar {

        flex-wrap: wrap;
        height: auto;

        padding: 10px 14px 8px;

        gap: 8px;
        position: sticky;
        top: 0;
        z-index: 100;

    }

    .topbar-brand {
        font-size: 15px;
    }

    .topbar-brand svg {
        width: 22px;
        height: 22px;
    }


    /* Search full-width on second row */
    .topbar-search {

        order: 3;
        flex: 1 1 100%;

        max-width: 100%;
        height: 38px;

        margin: 0;

    }


    /* Right section: compact */
    .topbar-right {

        margin-left: auto;
        gap: 8px;
        order: 2;

    }

    .project-count {
        display: none;
    }

    .btn-new .btn-new-text {
        display: none;
    }

    .btn-new {
        padding: 8px 10px;
        border-radius: 8px;
        gap: 0;
    }

    .user-btn-name {
        display: none;
    }

    /* Notification dropdown mobile fix */
    .notif-dropdown {
        position: fixed;
        top: 55px; /* right below the topbar */
        right: 14px;
        left: 14px; /* stretch almost full width */
        width: auto;
        max-width: none;
        max-height: 80vh;
    }


    /* Main grid */
    .main {
        padding: 14px 12px 60px;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }


    /* Card compact */
    .card-thumb {
        height: 140px;
    }

    .card-body {
        padding: 12px 14px 8px;
    }


    /* Modal full-screen on mobile */
    .modal-overlay {
        align-items: flex-end;
    }

    .modal {

        width: 100% !important;
        max-width: 100% !important;

        border-radius: 18px 18px 0 0;

        padding: 22px 18px 32px;

        max-height: 92vh;
        overflow-y: auto;

    }

    .modal::before {

        content: '';
        display: block;

        width: 44px;
        height: 4px;

        background: rgba(0, 212, 255, .25);
        border-radius: 2px;

        margin: 0 auto 18px;

    }


    /* Auth hero compact */
    .auth-hero {
        padding: 50px 16px;
    }

    .auth-hero h2 {
        font-size: 22px;
    }

}


/* Very small (≤ 380px) */

@media (max-width: 380px) {

    .topbar-brand span {
        display: none;
    }

    /* hide "SkyTech" text, keep icon */
    .btn-new {
        padding: 8px;
    }

    .grid {
        gap: 10px;
    }

}

@media (max-width: 480px) {

    .topbar-search {
        display: none;
    }

    .btn-signin,
    .btn-signup {
        padding: 6px 12px;
        font-size: 12px;
    }

    .btn-signup {
        max-width: 130px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

}

/* ── overlay / shell ── */
.summary-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .82);
    z-index: 13000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.summary-overlay.open {
    display: flex;
}

.summary-modal {
    background: #07111f;
    border: 1px solid rgba(0, 212, 255, .22);
    border-radius: 14px;
    width: 100%;
    max-width: 860px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .7);
}

/* header */
.sm-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(0, 51, 102, .5);
    flex-shrink: 0;
    background: rgba(0, 20, 45, .6);
}

.sm-header h3 {
    flex: 1;
    font-size: 15px;
    color: #00d4ff;
    margin: 0;
    font-weight: 700;
    letter-spacing: .3px;
}

.sm-header-close {
    background: none;
    border: none;
    color: #5a7a9a;
    font-size: 20px;
    cursor: pointer;
    transition: color .15s;
}

.sm-header-close:hover {
    color: #ff4d4d;
}

/* tabs */
.sm-tabs {
    display: flex;
    border-bottom: 1px solid rgba(0, 51, 102, .5);
    flex-shrink: 0;
    background: rgba(0, 15, 35, .4);
}

.sm-tab {
    padding: 10px 20px;
    font-size: 12px;
    color: #4a6a8a;
    cursor: pointer;
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    transition: all .2s;
    white-space: nowrap;
}

.sm-tab.active {
    color: #00d4ff;
    border-bottom-color: #00d4ff;
}

/* body */
.sm-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    scroll-behavior: smooth;
}

/* top stats bar */
.sm-stats-row {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.sm-stat {
    flex: 1;
    min-width: 80px;
    background: linear-gradient(135deg, rgba(0, 212, 255, .08), rgba(0, 51, 102, .2));
    border: 1px solid rgba(0, 212, 255, .18);
    border-radius: 10px;
    padding: 12px 10px;
    text-align: center;
}

.sm-stat-num {
    font-size: 24px;
    font-weight: 800;
    color: #00d4ff;
    line-height: 1;
}

.sm-stat-lbl {
    font-size: 9px;
    color: #4a7a9a;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-top: 4px;
}

/* TIF section */
.sm-tif-section {
    margin-bottom: 24px;
}

.sm-tif-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(0, 82, 153, .18);
    border: 1px solid rgba(0, 82, 153, .4);
    border-radius: 9px;
    cursor: pointer;
    transition: background .15s;
    margin-bottom: 10px;
}

.sm-tif-heading:hover {
    background: rgba(0, 82, 153, .28);
}

.sm-tif-title {
    flex: 1;
    font-size: 13px;
    color: #a0c4e0;
    font-weight: 700;
}

.sm-tif-pill {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(0, 212, 255, .1);
    color: #70a8cc;
    border: 1px solid rgba(0, 212, 255, .18);
}

.sm-tif-chevron {
    font-size: 11px;
    color: #3a5a7a;
    transition: transform .2s;
}

.sm-tif-heading.open .sm-tif-chevron {
    transform: rotate(180deg);
}

/* annotation card */
.sm-ann-card {
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(0, 60, 120, .4);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
    transition: border-color .2s;
}

.sm-ann-card:hover {
    border-color: rgba(0, 212, 255, .25);
}

.sm-ann-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.sm-ann-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.sm-ann-name {
    flex: 1;
    font-size: 13px;
    font-weight: 700;
    color: #d0e4f4;
}

.sm-ann-type-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 2px 8px;
    border-radius: 10px;
}

.sm-ann-type-area {
    background: rgba(0, 100, 255, .15);
    color: #5090e0;
    border: 1px solid rgba(0, 100, 255, .25);
}

.sm-ann-type-punto {
    background: rgba(255, 140, 0, .15);
    color: #ff9a20;
    border: 1px solid rgba(255, 140, 0, .25);
}

.sm-ann-coords {
    font-size: 10px;
    color: #3a6a8a;
    margin-bottom: 8px;
}

.sm-ann-desc {
    font-size: 11px;
    color: #7a9ab8;
    font-style: italic;
    margin-bottom: 10px;
    line-height: 1.5;
}

/* photos */
.sm-photos-label {
    font-size: 10px;
    color: #4a7a9a;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 6px;
    font-weight: 600;
}

.sm-photos-grid {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.sm-photo-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 7px;
    border: 2px solid rgba(0, 212, 255, .15);
    cursor: pointer;
    transition: transform .15s, border-color .15s;
}

.sm-photo-thumb:hover {
    transform: scale(1.06);
    border-color: rgba(0, 212, 255, .5);
}

/* observations */
.sm-obs-label {
    font-size: 10px;
    color: #4a7a9a;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 6px;
    font-weight: 600;
}

.sm-obs-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sm-obs-entry {
    background: rgba(0, 30, 60, .5);
    border-left: 3px solid rgba(0, 212, 255, .3);
    border-radius: 0 7px 7px 0;
    padding: 8px 10px;
}

.sm-obs-text {
    font-size: 12px;
    color: #b0c8e0;
    line-height: 1.5;
}

.sm-obs-date {
    font-size: 10px;
    color: #3a5a7a;
    margin-top: 3px;
}

.sm-ann-empty {
    font-size: 11px;
    color: #2a4a6a;
    font-style: italic;
}

/* work order cards */
.sm-wo-card {
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(0, 60, 120, .4);
    border-radius: 11px;
    padding: 16px;
    margin-bottom: 14px;
    cursor: pointer;
    transition: border-color .18s, background .18s;
}

.sm-wo-card:hover {
    border-color: rgba(0, 212, 255, .45);
    background: rgba(0, 212, 255, .04);
}

.sm-wo-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

/* WO detail sub-modal */
.wo-detail-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .7);
    z-index: 14000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.wo-detail-overlay.open {
    display: flex;
}

.wo-detail-modal {
    background: #07111f;
    border: 1px solid rgba(0, 212, 255, .25);
    border-radius: 14px;
    width: 100%;
    max-width: 620px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .8);
}

.wo-det-hdr {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 212, 255, .15);
    background: rgba(0, 30, 60, .4);
    flex-shrink: 0;
}

.wo-det-hdr h3 {
    flex: 1;
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #00d4ff;
}

.wo-det-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, .4);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color .15s;
}

.wo-det-close:hover {
    color: #ff5555;
}

.wo-det-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.wo-det-grid {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.wo-det-field {
    background: rgba(0, 20, 50, .5);
    border: 1px solid rgba(0, 60, 120, .4);
    border-radius: 8px;
    padding: 10px 13px;
}

.wo-det-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: rgba(0, 212, 255, .6);
    margin-bottom: 4px;
}

.wo-det-value {
    font-size: 13px;
    color: #e0eaf8;
    font-weight: 600;
}

.wo-det-anns-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: rgba(0, 212, 255, .6);
    margin-bottom: 8px;
}

.wo-det-ann-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    background: rgba(0, 20, 50, .4);
    border-radius: 7px;
    margin-bottom: 6px;
}

.wo-det-ann-name {
    flex: 1;
    font-size: 12px;
    color: #90b8d8;
    font-weight: 600;
}

.wo-det-ann-stat {
    font-size: 11px;
    color: #4a7a9a;
}

.wo-det-file-row {
    margin-top: 14px;
}

.wo-det-ann-full {
    background: rgba(0, 20, 48, .5);
    border: 1px solid rgba(0, 82, 153, .25);
    border-radius: 9px;
    margin-bottom: 10px;
    overflow: hidden;
}

.wo-det-ann-hdr {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    background: rgba(0, 51, 102, .2);
    cursor: pointer;
    user-select: none;
}

.wo-det-ann-body {
    padding: 10px 12px;
    display: none;
}

.wo-det-ann-full.exp .wo-det-ann-body {
    display: block;
}

.sm-wo-title {
    flex: 1;
    font-size: 14px;
    font-weight: 700;
    color: #e0eaf8;
}

.sm-wo-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.sm-wo-meta span {
    font-size: 11px;
    color: #5a8aaa;
}

.sm-wo-ann-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.sm-wo-ann-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: rgba(0, 20, 50, .4);
    border-radius: 7px;
}

.sm-wo-ann-name {
    flex: 1;
    font-size: 11px;
    color: #90b8d8;
}

.sm-wo-ann-stats {
    display: flex;
    gap: 6px;
}

.sm-wo-ann-stat {
    font-size: 10px;
    color: #4a7a9a;
}

.sm-wo-file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #00ff88;
    font-size: 11px;
    text-decoration: none;
    padding: 6px 12px;
    background: rgba(0, 255, 136, .08);
    border: 1px solid rgba(0, 255, 136, .25);
    border-radius: 7px;
    transition: background .15s;
}

.sm-wo-file:hover {
    background: rgba(0, 255, 136, .15);
}

.sm-no-data {
    text-align: center;
    padding: 30px;
    color: #2a4a6a;
    font-size: 12px;
    font-style: italic;
}

/* estado pills */
.smp-pendiente {
    background: rgba(220, 53, 69, .18);
    color: #ff4d5e;
    border: 1px solid rgba(220, 53, 69, .4);
}

.smp-en_proceso {
    background: rgba(255, 165, 0, .18);
    color: #ffaa00;
    border: 1px solid rgba(255, 165, 0, .4);
}

.smp-completada {
    background: rgba(40, 167, 69, .18);
    color: #28d164;
    border: 1px solid rgba(40, 167, 69, .4);
}

.smp-pill {
    border-radius: 10px;
    padding: 2px 9px;
    font-size: 10px;
    font-weight: 700;
}

/* scrollbar */
.sm-body::-webkit-scrollbar {
    width: 5px;
}

.sm-body::-webkit-scrollbar-track {
    background: transparent;
}

.sm-body::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, .2);
    border-radius: 3px;
}

@media (max-width: 600px) {
    .summary-modal {
        max-height: 96vh;
        border-radius: 10px;
    }

    .sm-photo-thumb {
        width: 56px;
        height: 56px;
    }

    .sm-stats-row {
        gap: 6px;
    }
}

.card-action-audit {
    background: rgba(167, 139, 250, .12);
    color: #a78bfa;
    border-color: rgba(167, 139, 250, .35);
}

.card-action-audit:hover {
    background: rgba(167, 139, 250, .25);
    color: #fff;
    border-color: #a78bfa;
}

.audit-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 10, 25, .82);
    z-index: 6000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(4px);
}

.audit-overlay.open {
    display: flex;
}

.audit-modal {
    width: 100%;
    max-width: 980px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    background: #0d1b2a;
    border: 1px solid rgba(167, 139, 250, .35);
    border-radius: 12px;
    color: #e0eaf8;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
    overflow: hidden;
}

.audit-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(167, 139, 250, .25);
    background: linear-gradient(135deg, #1a1230, #0d1b2a);
}

.audit-header-icon {
    color: #a78bfa;
    font-size: 18px;
}

.audit-header h3 {
    flex: 1;
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .5px;
}

.audit-header-close {
    background: transparent;
    border: 0;
    color: #a0b6c8;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
}

.audit-header-close:hover {
    background: rgba(255, 255, 255, .07);
    color: #fff;
}

.audit-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 18px;
    border-bottom: 1px solid rgba(167, 139, 250, .15);
    background: rgba(167, 139, 250, .04);
}

.audit-flt-lbl {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #b8c8d8;
    font-weight: 600;
}

.audit-flt-lbl input[type="date"],
.audit-flt-lbl select {
    background: #15243a;
    color: #e0eaf8;
    border: 1px solid rgba(167, 139, 250, .35);
    border-radius: 5px;
    padding: 5px 8px;
    font-size: 12px;
}

.audit-flt-lbl select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 26px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%23c4b5fd' d='M0 0l5 6 5-6z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
    cursor: pointer;
}

.audit-flt-lbl select:focus {
    outline: none;
    border-color: #a78bfa;
}

.audit-flt-lbl select option {
    background: #15243a;
    color: #e0eaf8;
}

.audit-flt-btn {
    padding: 6px 14px;
    background: rgba(167, 139, 250, .18);
    color: #c4b5fd;
    border: 1px solid rgba(167, 139, 250, .45);
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
}

.audit-flt-btn:hover {
    background: linear-gradient(135deg, #4c1d95, #6d28d9);
    color: #fff;
    border-color: #a78bfa;
}

.audit-flt-btn-clear {
    background: rgba(255, 255, 255, .04);
    color: #8aa;
    border-color: rgba(255, 255, 255, .12);
}

.audit-total {
    margin-left: auto;
    font-size: 11px;
    color: #8aa;
    font-weight: 600;
}

.audit-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.audit-empty {
    text-align: center;
    color: #788;
    padding: 36px 18px;
    font-size: 13px;
    font-style: italic;
}

.audit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.audit-table thead th {
    position: sticky;
    top: 0;
    background: #15243a;
    color: #c4b5fd;
    font-weight: 700;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(167, 139, 250, .25);
    text-transform: uppercase;
    letter-spacing: .6px;
    font-size: 10px;
}

.audit-table tbody td {
    padding: 9px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    vertical-align: top;
}

.audit-table tbody tr:hover {
    background: rgba(167, 139, 250, .06);
}

.audit-action-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.audit-action-add {
    background: rgba(0, 255, 136, .12);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, .35);
}

.audit-action-change {
    background: rgba(255, 193, 7, .12);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, .35);
}

.audit-action-delete {
    background: rgba(248, 113, 113, .14);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, .4);
}

.audit-obj-id {
    font-family: 'Courier New', monospace;
    color: #8aa;
    font-size: 11px;
}

.audit-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-top: 1px solid rgba(167, 139, 250, .15);
    background: rgba(167, 139, 250, .04);
    min-height: 18px;
}

.audit-pager button {
    padding: 5px 12px;
    background: rgba(167, 139, 250, .12);
    color: #c4b5fd;
    border: 1px solid rgba(167, 139, 250, .35);
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.audit-pager button:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.audit-pager-info {
    font-size: 11px;
    color: #8aa;
}

    