/*
 * AssetInvent Premium Design System - OVERHAUL
 * Styled specifically to match futuristic, rich dark-teal glassmorphic UI patterns.
 */

:root {
    --bg: #051f26;
    --bg-darker: #020e11;
    --panel: rgba(8, 40, 48, 0.75);
    --panel-solid: #082830;
    --panel-2: rgba(13, 58, 68, 0.5);
    --panel-2-solid: #0d3a44;
    --line: rgba(30, 168, 199, 0.2);
    --line-soft: rgba(30, 168, 199, 0.09);
    --line-focus: rgba(30, 168, 199, 0.5);
    --text: #f8fafc;
    --muted: #6d8c90;
    --faint: #4e6f73;
    --cyan: #1ea8c7;
    --cyan-glow: rgba(30, 168, 199, 0.35);
    --gold: #f1b24a;
    --gold-glow: rgba(241, 178, 74, 0.35);
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.2);
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.2);
    --shadow: rgba(0, 0, 0, 0.6);
    --font: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

.hidden {
    display: none !important;
}

.locale-control {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.locale-control select {
    min-width: 132px;
    border: 1px solid rgba(30, 168, 199, 0.18);
    border-radius: 8px;
    padding: 7px 9px;
    background: rgba(5, 31, 38, 0.6);
    color: var(--text);
    font: inherit;
    cursor: pointer;
}

body.light-theme .locale-control select {
    border-color: rgba(0, 0, 0, 0.1);
    background: #ffffff;
}

body {
    min-height: 100vh;
    color: var(--text);
    background: var(--bg);
    font-family: var(--font);
    font-size: 15px;
    letter-spacing: 0.015em;
    overflow-x: hidden;
    position: relative;
    scroll-behavior: smooth;
}

/* --- Animated Glowing Grid Background --- */
.grid-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -2;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center center;
    perspective: 1000px;
}

.grid-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(circle at 50% 20%, rgba(13, 50, 61, 0.6) 0%, transparent 60%),
        radial-gradient(circle at 10% 80%, rgba(99, 102, 241, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 90% 70%, rgba(255, 179, 0, 0.04) 0%, transparent 40%),
        var(--bg);
    animation: pulse-glow 12s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
    0% { opacity: 0.85; }
    100% { opacity: 1; }
}

/* --- High-Tech Metallic Scanner Logo --- */
.brand-mark {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: radial-gradient(circle at center, #102e37, #06151a);
    border: 1.5px solid var(--line);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 0 10px rgba(99, 102, 241, 0.15),
        0 0 15px rgba(99, 102, 241, 0.08);
    overflow: hidden;
    flex-shrink: 0;
    transition: var(--transition);
}

.brand-mark::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 11px;
    border: 1px dashed rgba(99, 102, 241, 0.3);
    pointer-events: none;
}

.scanner-ring {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent);
    box-shadow:
        0 0 6px rgba(0, 0, 0, 0.5),
        inset 0 0 4px rgba(255, 255, 255, 0.1);
}

.scanner-lens {
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, var(--cyan) 0%, #312e81 35%, #1e1b4b 100%);
    box-shadow:
        inset 0 0 6px rgba(0,0,0,0.8),
        0 0 8px rgba(99, 102, 241, 0.4);
}

/* Glass shine on lens */
.scanner-lens::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    filter: blur(0.5px);
}

.scanner-laser {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    box-shadow: 0 0 6px var(--cyan);
    animation: laser-scan 2.4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes laser-scan {
    0%, 100% { top: 15%; opacity: 0.3; }
    50% { top: 80%; opacity: 1; }
}

/* --- Brand Typography --- */
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 20px;
}

.brand h1 {
    font-size: 21px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
}

.brand-asset {
    color: var(--text);
    background: linear-gradient(135deg, #ffffff 30%, var(--cyan) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-invent {
    color: var(--gold);
    text-shadow: 0 0 10px rgba(255, 179, 0, 0.25);
}

.brand p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.sidebar-account-bar {
    display: none;
}

/* --- Login Screen Overhaul --- */
.login-screen {
    display: grid;
    place-items: center;
    padding: 24px;
    /* Overlay flotante sobre la landing — posición fija en el viewport */
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.login-card {
    width: min(100%, 410px);
    padding: 36px 32px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(99, 102, 241, 0.05),
        inset 0 0 15px rgba(99, 102, 241, 0.05);
    backdrop-filter: blur(20px);
    transition: var(--transition);
    animation: fade-in-up 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-brand {
    justify-content: center;
    padding: 0 0 32px;
}

.login-brand .brand-mark {
    width: 56px;
    height: 56px;
    border-radius: 16px;
}

.login-brand .brand-mark .scanner-ring {
    width: 38px;
    height: 38px;
}

.login-brand .brand-mark .scanner-lens {
    width: 26px;
    height: 26px;
}

.login-brand h1 {
    font-size: 26px;
}

.login-card label {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.login-card input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    color: var(--text);
    background: var(--panel-2-solid);
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: 0;
    font-family: var(--font);
    font-size: 14px;
    transition: var(--transition);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.login-card input::placeholder {
    color: rgba(143, 174, 188, 0.35);
}

.login-card input:focus {
    border-color: var(--cyan);
    box-shadow:
        0 0 12px rgba(99, 102, 241, 0.25),
        inset 0 2px 4px rgba(0,0,0,0.1);
    background: var(--bg-darker);
}

.login-button {
    width: 100%;
    height: 48px;
    margin-top: 10px;
    color: #03080a;
    background: linear-gradient(135deg, var(--cyan) 0%, #4338ca 100%);
    border: 0;
    border-radius: 12px;
    font-weight: 800;
    font-family: var(--font);
    font-size: 14px;
    letter-spacing: 0.05em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: var(--transition);
}

.login-button svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
    background: linear-gradient(135deg, #818cf8 0%, var(--cyan) 100%);
}

.login-button:hover svg {
    transform: translateX(4px);
}

.login-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.25);
}

.login-error {
    min-height: 20px;
    margin: 16px 0 0;
    color: var(--danger);
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
    font-weight: 600;
}

.login-success {
    min-height: 20px;
    margin: 16px 0 0;
    color: var(--success);
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
    font-weight: 600;
}

.auth-link-button {
    align-self: center;
    border: 0;
    background: transparent;
    color: var(--cyan);
    cursor: pointer;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 700;
    margin-top: 10px;
    padding: 2px 4px;
}

.auth-link-button:hover {
    text-decoration: underline;
}

/* --- Shell Layout Overhaul --- */
.shell {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr) 420px;
    height: 100vh;
    overflow: hidden;
    position: relative;
    z-index: 2;
    max-width: 1600px;
    margin: 0 auto;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    background: var(--panel-solid);
}

.sidebar,
.detail-panel {
    background: var(--panel);
    backdrop-filter: blur(20px);
    border-color: var(--line);
    transition: var(--transition);
}

.sidebar {
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
}

.detail-panel {
    border-left: 1px solid var(--line);
    overflow-y: auto;
    position: sticky;
    top: 0;
    height: 100vh;
}

@media (min-width: 992px) {
    .shell:not(.hidden) {
        height: 100vh;
        overflow: hidden;
    }

    .sidebar,
    .workspace,
    .detail-panel {
        min-height: 0;
    }

    .sidebar,
    .workspace {
        height: 100vh;
        overflow: hidden;
    }

    .inventory-list,
    .content,
    .detail-panel {
        min-height: 0;
        overflow-y: auto;
    }

    .content {
        flex: 1 1 auto;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.15);
    border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cyan);
}

/* --- Sidebar Controls & Search --- */
.sidebar-tools {
    display: flex;
    gap: 10px;
    padding: 0 18px 20px;
    border-bottom: 1px solid var(--line-soft);
}

.search-control {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    height: 42px;
    flex: 1;
    padding: 0 14px;
    color: var(--muted);
    background: var(--panel-2-solid);
    border: 1px solid var(--line);
    border-radius: 10px;
    transition: var(--transition);
}

.search-control svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--cyan);
}

.search-control input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    font-family: var(--font);
    font-size: 13.5px;
}

.search-control input::placeholder {
    color: rgba(143, 174, 188, 0.4);
}

.search-control:focus-within {
    border-color: var(--cyan);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
    background: var(--bg-darker);
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: var(--cyan);
    background: var(--panel-2-solid);
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.icon-button svg {
    width: 16px;
    height: 16px;
    transition: transform 0.4s ease;
}

.icon-button:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--cyan);
    color: #fff;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.icon-button:hover svg {
    transform: rotate(180deg);
}

/* --- Inventory List --- */
.inventory-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px 16px;
}

.folder-toolbar,
.selection-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 12px 0;
}

.selection-toolbar {
    grid-template-columns: 1fr minmax(0, 1fr) auto;
    align-items: center;
}

.selection-toolbar.hidden {
    display: none;
}

.selection-toolbar span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.selection-toolbar select {
    min-width: 0;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.folder-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
}

.folder-action:hover {
    color: #fff;
    border-color: rgba(99, 102, 241, 0.28);
    background: rgba(99, 102, 241, 0.08);
}

.folder-action.active {
    color: var(--bg-darker);
    border-color: var(--cyan);
    background: var(--cyan);
    box-shadow: 0 0 12px var(--cyan-glow);
}

.folder-block {
    margin-bottom: 10px;
}

.folder-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 8px 8px 10px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.035);
    transition: var(--transition);
}

.folder-title {
    display: grid;
    grid-template-columns: 16px 20px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    min-width: 0;
    width: 100%;
    border: 0;
    color: var(--text);
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.folder-title .folder-chevron {
    width: 14px;
    height: 14px;
    color: var(--muted);
    transition: transform 0.2s ease;
}

.folder-block.collapsed .folder-chevron {
    transform: rotate(-90deg);
}

.folder-block.collapsed .folder-inventory-list {
    display: none;
}

.folder-title svg {
    width: 20px;
    height: 20px;
    color: var(--cyan);
}

.folder-title em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder-title strong {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 800;
    max-width: 100%;
}

.folder-title strong .folder-name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 0 1 auto;
}

.folder-title em {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder-badge-line {
    display: block;
    margin-top: 4px;
    line-height: 1;
}

.folder-color-gold .folder-title svg:not(.folder-chevron) { color: var(--gold); }
.folder-color-green .folder-title svg:not(.folder-chevron) { color: #10b981; }
.folder-color-red .folder-title svg:not(.folder-chevron) { color: #ef4444; }
.folder-color-purple .folder-title svg:not(.folder-chevron) { color: #a78bfa; }
.folder-color-pink .folder-title svg:not(.folder-chevron) { color: #f472b6; }
.folder-color-blue .folder-title svg:not(.folder-chevron) { color: #60a5fa; }

.folder-icon-button {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
}

.folder-icon-button.danger:hover {
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.10);
}

.folder-inventory-list {
    min-height: 14px;
    padding: 6px 0 0 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    margin-left: 20px;
}

.folder-inventory-list.drag-over {
    border-color: var(--cyan);
    background: rgba(99, 102, 241, 0.04);
}

.folder-block.drag-over .folder-row {
    border-color: var(--cyan);
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.15);
}

.folder-block.drag-over-folder .folder-row {
    border-color: var(--gold);
    background: rgba(255, 179, 0, 0.08);
    box-shadow: 0 0 12px rgba(255, 179, 0, 0.15);
}

.inventory-row-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.inventory-row-wrap .inventory-select {
    flex-shrink: 0;
}

.inventory-row-wrap.selected .inventory-row {
    border-color: rgba(99, 102, 241, 0.38);
}

.inventory-select {
    width: 16px;
    height: 16px;
    accent-color: var(--cyan);
}

.inventory-row {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
    padding: 14px 16px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid transparent;
    border-radius: 12px;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

/* .folder-modal-content relocated below .inventory-modal-content for precedence */

.inventory-row:hover {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.15);
    transform: translateX(3px);
}

.inventory-row.active {
    background: radial-gradient(circle at 10% 10%, rgba(99, 102, 241, 0.1) 0%, rgba(13, 27, 33, 0.9) 100%);
    border-color: var(--cyan);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 0 8px rgba(99, 102, 241, 0.1);
}

.inventory-row.shared {
    border-color: rgba(255, 179, 0, 0.18);
}

.inventory-main {
    min-width: 0;
}

.inventory-row strong {
    display: block;
    overflow: hidden;
    font-size: 14.5px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inventory-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin-bottom: 2px;
}

.inventory-title-row strong {
    flex: 0 1 auto;
    min-width: 0;
}

.inventory-badges {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: max-content;
}

.shared-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: none;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 9px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    line-height: 1;
}

.shared-pill svg {
    width: 10px !important;
    height: 10px !important;
}

.shared-pill.incoming {
    border: 1px solid rgba(0, 229, 255, 0.25);
    color: var(--cyan);
    background: rgba(0, 229, 255, 0.10);
}

.shared-pill.incoming svg {
    color: var(--cyan) !important;
}

.shared-pill.outgoing {
    border: 1px solid rgba(255, 179, 0, 0.25);
    color: var(--gold);
    background: rgba(255, 179, 0, 0.10);
}

.shared-pill.outgoing svg {
    color: var(--gold) !important;
}

.shared-credit-coin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 13px;
    height: 13px;
    margin-left: 2px;
    border: 1px solid rgba(255, 179, 0, 0.75);
    border-radius: 50%;
    color: transparent;
    background: radial-gradient(circle at 35% 30%, #fff3a8 0 18%, #ffd24a 45%, #f59e0b 100%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
    flex: none;
}

.shared-credit-notice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    margin-top: 6px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 179, 0, 0.24);
    border-radius: 8px;
    color: var(--gold);
    background: rgba(255, 179, 0, 0.08);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.shared-credit-notice.hidden {
    display: none;
}

.inventory-row.shared.outgoing {
    border-color: rgba(255, 179, 0, 0.18);
}

.inventory-row.shared.incoming {
    border-color: rgba(0, 229, 255, 0.18);
}

.inventory-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.inventory-row.active strong {
    color: #fff;
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.inventory-row.active .inventory-meta {
    color: rgba(99, 102, 241, 0.7);
}

.count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 20px;
    padding: 0 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(255, 179, 0, 0.12);
    color: var(--gold);
    border: 1px solid rgba(255, 179, 0, 0.25);
    transition: var(--transition);
}

.inventory-row.active .count-pill {
    background: rgba(99, 102, 241, 0.15);
    color: var(--cyan);
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.25);
}

/* --- Workspace Structure --- */
.workspace {
    min-width: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
}

/* --- Topbar Overhaul --- */
.topbar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 32px;
    border-bottom: 1px solid var(--line);
    background: rgba(6, 17, 21, 0.4);
    backdrop-filter: blur(8px);
    position: relative;
    z-index: 10;
}

.topbar-row-1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
    width: 100%;
    overflow: visible !important;
    padding-bottom: 4px;
}

.topbar-row-2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
    width: 100%;
    overflow: visible !important;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
    padding-bottom: 4px;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.topbar-row-2 .topbar-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.topbar-row-1::-webkit-scrollbar,
.topbar-row-2::-webkit-scrollbar {
    height: 4px;
}

.topbar-row-1::-webkit-scrollbar-track,
.topbar-row-2::-webkit-scrollbar-track {
    background: transparent;
}

.topbar-row-1::-webkit-scrollbar-thumb,
.topbar-row-2::-webkit-scrollbar-thumb {
    background: var(--line-soft);
    border-radius: 99px;
}

.topbar-row-1:hover::-webkit-scrollbar-thumb,
.topbar-row-2:hover::-webkit-scrollbar-thumb {
    background: var(--line);
}

.eyebrow {
    color: var(--cyan);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin: 0;
    white-space: nowrap;
}

.topbar h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.session-user {
    color: inherit;
    font-size: 12.5px;
    font-weight: 700;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

.legacy-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 38px;
    padding: 0 14px;
    color: var(--text);
    background: var(--panel-2-solid);
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.legacy-link svg {
    width: 14px;
    height: 14px;
    color: var(--cyan);
}

.legacy-link:hover:not(:disabled) {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--cyan);
    color: #fff;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.15);
}

.legacy-link:disabled {
    cursor: not-allowed;
    opacity: 0.35;
}

#logout-button {
    border-color: rgba(255, 23, 68, 0.3);
    background: rgba(255, 23, 68, 0.05);
    width: 38px;
    padding: 0;
}

#logout-button svg {
    color: var(--danger);
}

#logout-button:hover {
    background: rgba(255, 23, 68, 0.12);
    border-color: var(--danger);
    box-shadow: 0 0 12px rgba(255, 23, 68, 0.15);
}

#theme-toggle-button {
    width: 38px;
    padding: 0;
}

.export-status {
    color: var(--success);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

/* --- Metrics Grid Overhaul --- */
.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 20px 32px;
    border-bottom: 1px solid var(--line-soft);
}

.metric {
    padding: 16px 20px;
    background: rgba(10, 25, 31, 0.5);
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 10px rgba(0,229,255,0.02);
    transition: var(--transition);
}

.metric::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--cyan);
    opacity: 0.3;
}

.metric:nth-child(2)::after { background: var(--gold); }
.metric:nth-child(3)::after { background: var(--success); }
.metric:nth-child(4)::after { background: #ab47bc; }

.metric:hover {
    transform: translateY(-2px);
    border-color: var(--line);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.metric span {
    font-size: 26px;
    font-weight: 900;
    display: block;
    color: #fff;
    letter-spacing: -0.02em;
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.1);
}

.metric:nth-child(2) span { text-shadow: 0 0 10px rgba(255, 179, 0, 0.1); }
.metric:nth-child(3) span { text-shadow: 0 0 10px rgba(0, 230, 118, 0.1); }

.metric p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Filter Toolbar --- */
.toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px 32px;
    border-bottom: 1px solid var(--line);
    background: rgba(6, 17, 21, 0.2);
}

.toolbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.toolbar-row-filters {
    justify-content: flex-start;
}

.asset-search {
    max-width: 460px;
}

select {
    height: 40px;
    min-width: 180px;
    padding: 0 16px 0 12px;
    color: var(--text);
    background: var(--panel-2-solid);
    border: 1px solid var(--line);
    border-radius: 10px;
    font-family: var(--font);
    font-size: 13.5px;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
    background: var(--bg-darker);
}

/* --- Content / Table Area --- */
.content {
    flex: 1;
    overflow-y: auto;
    background: rgba(3, 8, 10, 0.2);
    scroll-behavior: smooth;
}

.table-wrap {
    padding: 24px 32px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

th {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 8px 18px;
    border-bottom: 0;
}

td {
    padding: 14px 18px;
    background: rgba(13, 27, 33, 0.45);
    border-top: 1.5px solid var(--line-soft);
    border-bottom: 1.5px solid var(--line-soft);
    vertical-align: middle;
    transition: var(--transition);
}

td:first-child {
    border-left: 1.5px solid var(--line-soft);
    border-radius: 12px 0 0 12px;
}

td:last-child {
    border-right: 1.5px solid var(--line-soft);
    border-radius: 0 12px 12px 0;
}

tbody tr {
    cursor: pointer;
    transition: var(--transition);
}

tbody tr:hover td {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.25);
}

tbody tr.selected td {
    border-color: var(--cyan);
}

.asset-name strong {
    display: block;
    font-size: 14.5px;
    font-weight: 700;
    color: #fff;
}

.asset-name span {
    display: block;
    margin-top: 3px;
    color: var(--cyan);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.muted-cell {
    color: var(--muted);
    font-size: 13px;
}

.thumb-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.mini-thumb {
    width: 38px;
    height: 38px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg-darker);
    transition: var(--transition);
}

tbody tr:hover .mini-thumb {
    transform: scale(1.1);
    border-color: var(--cyan);
}

/* --- Status Pills Overhaul --- */
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border: 1px solid transparent;
}

.status-pill.draft {
    color: var(--muted);
    background: rgba(143, 174, 188, 0.1);
    border-color: rgba(143, 174, 188, 0.2);
}

.status-pill.pending_review {
    color: var(--cyan);
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.15);
}

.status-pill.reviewed {
    color: var(--gold);
    background: rgba(255, 179, 0, 0.1);
    border-color: rgba(255, 179, 0, 0.25);
}

.status-pill.approved {
    color: var(--success);
    background: rgba(0, 230, 118, 0.1);
    border-color: rgba(0, 230, 118, 0.25);
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.15);
}

.status-pill.hidden-state {
    color: var(--danger);
    background: rgba(255, 23, 68, 0.1);
    border-color: rgba(255, 23, 68, 0.25);
}

.status-pill.discarded {
    color: rgba(255,255,255,0.3);
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

/* --- Empty / Initial States --- */
.empty-state,
.detail-empty {
    display: grid;
    place-items: center;
    align-content: center;
    min-height: 400px;
    padding: 36px;
    color: var(--muted);
    text-align: center;
}

.empty-state svg,
.detail-empty svg {
    width: 46px;
    height: 46px;
    margin-bottom: 16px;
    color: var(--cyan);
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.3));
    animation: bounce-float 3s ease-in-out infinite alternate;
}

@keyframes bounce-float {
    0% { transform: translateY(0); }
    100% { transform: translateY(-8px); }
}

.empty-state h3 {
    color: #fff;
    font-size: 19px;
    font-weight: 800;
}

.empty-state p {
    margin-top: 10px;
    max-width: 380px;
    line-height: 1.6;
    font-size: 13.5px;
}

.detail-empty p {
    max-width: 260px;
    line-height: 1.5;
    font-size: 13.5px;
}

/* --- Detail Panel Overhaul --- */
.detail-header {
    padding: 24px;
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,0.01);
}

.detail-header .status-pill {
    margin-bottom: 12px;
}

.detail-header h3 {
    font-size: 21px;
    font-weight: 800;
    line-height: 1.25;
    color: #fff;
    margin-bottom: 6px;
}

.detail-header p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.detail-media {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 20px;
    border-bottom: 1px solid var(--line);
}

.detail-media a {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid var(--line-soft);
    aspect-ratio: 4 / 3;
    background: var(--bg-darker);
    transition: var(--transition);
}

.detail-media a:hover {
    border-color: var(--cyan);
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.detail-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-section {
    padding: 24px;
    border-bottom: 1px solid var(--line);
}

.detail-section h4 {
    margin-bottom: 16px;
    color: var(--cyan);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* --- Advanced Edit Form --- */
.edit-form {
    display: grid;
    gap: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.field {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.field input,
.field textarea,
.field select {
    width: 100%;
    min-width: 0;
    color: var(--text);
    background: var(--panel-2-solid);
    border: 1px solid var(--line);
    border-radius: 10px;
    font-family: var(--font);
    font-size: 13.5px;
    outline: 0;
    transition: var(--transition);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
}

.field input,
.field select {
    height: 40px;
    padding: 0 12px;
}

.field textarea {
    min-height: 84px;
    padding: 12px;
    resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    border-color: var(--cyan);
    box-shadow:
        0 0 10px rgba(99, 102, 241, 0.2),
        inset 0 1px 3px rgba(0,0,0,0.1);
    background: var(--bg-darker);
}

/* Neutralizar fondo amarillo del autofill del navegador */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px var(--panel-2-solid) inset !important;
    -webkit-text-fill-color: var(--text) !important;
    caret-color: var(--text);
    transition: background-color 5000s ease-in-out 0s;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.save-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 42px;
    padding: 0 20px;
    color: #03080a;
    background: linear-gradient(135deg, var(--cyan) 0%, #4338ca 100%);
    border: 0;
    border-radius: 10px;
    font-weight: 800;
    font-family: var(--font);
    font-size: 13.5px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
    transition: var(--transition);
}

.save-button svg {
    width: 15px;
    height: 15px;
}

.save-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
    background: linear-gradient(135deg, #818cf8 0%, var(--cyan) 100%);
}

.save-button:disabled {
    cursor: wait;
    opacity: 0.6;
}

.form-note {
    color: var(--success);
    font-size: 13px;
    font-weight: 700;
    text-shadow: 0 0 6px rgba(0, 230, 118, 0.2);
}

/* --- Specifications Grid --- */
.spec-list {
    display: grid;
    gap: 10px;
}

.spec-row {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 16px;
    font-size: 13.5px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.01);
    border-radius: 8px;
    border: 1px solid var(--line-soft);
}

.spec-row dt {
    overflow-wrap: anywhere;
    color: var(--muted);
    font-weight: 600;
}

.spec-row dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: #fff;
}

/* --- System Loading Animation --- */
.loading {
    opacity: 0.75;
    pointer-events: none;
    position: relative;
}

.loading::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, var(--cyan), var(--gold), var(--cyan));
    background-size: 200% auto;
    z-index: 9999;
    animation: loading-bar 1.5s linear infinite;
}

@keyframes loading-bar {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* --- Responsive Adaptations --- */
@media (max-width: 1260px) {
    .shell {
        grid-template-columns: 290px minmax(0, 1fr);
    }

    .detail-panel {
        grid-column: 1 / -1;
        min-height: auto;
        max-height: 550px;
        height: auto;
        border-left: 0;
        border-top: 1px solid var(--line);
        position: relative;
    }
}

/* 820px: tablet landscape — solo se aplica en resoluciones ≥ 500px
   para no colisionar con la lógica de panel móvil del 991px */
@media (min-width: 500px) and (max-width: 820px) {
    .shell {
        display: block;
    }

    .sidebar,
    .detail-panel {
        min-height: auto;
        height: auto;
    }

    .inventory-list {
        height: 240px;
    }

    .topbar {
        padding: 16px 20px;
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    .topbar-row-1,
    .topbar-row-2 {
        gap: 8px;
    }

    .metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 16px 20px;
        gap: 10px;
    }

    .toolbar {
        padding: 16px 20px;
        gap: 10px;
    }

    .toolbar-row {
        flex-wrap: wrap;
        gap: 10px;
    }

    .asset-search {
        max-width: none;
        width: 100%;
    }

    select {
        flex: 1;
        min-width: 130px;
    }

    .table-wrap {
        padding: 16px 20px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .share-form {
        grid-template-columns: 1fr;
    }

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

    .sharing-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .sharing-row .role-pill {
        grid-column: 1 / 2;
    }
}

/* PRINT STYLES */
#print-report-container {
    display: none;
}

@page {
    margin: 0;
    size: A4;
}

@media print {

    body,
    html {
        visibility: hidden;
        height: auto !important;
        overflow: visible !important;
        background: white !important;
    }

    #print-report-container {
        visibility: visible;
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: white !important;
        color: black !important;
    }

    /* =========================================
       COVER PAGE
    ========================================= */
    .print-cover {
        height: 297mm;
        width: 210mm;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: stretch;
        page-break-after: always;
        background: #ffffff !important;
        box-sizing: border-box;
        overflow: hidden;
        position: relative;
    }

    .print-cover-top-bar {
        background: #003087;
        height: 12mm;
        width: 100%;
        flex-shrink: 0;
    }

    .print-cover-accent {
        background: #E30613;
        height: 3mm;
        width: 100%;
        flex-shrink: 0;
    }

    .print-cover-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 15mm 20mm 8mm 20mm;
        text-align: center;
    }

    .print-cover-logo-wrap {
        margin-bottom: 14mm;
    }

    .print-cover-logo-wrap img {
        max-width: 55mm;
        height: auto;
    }

    .print-cover-title-block {
        border-top: 0.5pt solid #003087;
        border-bottom: 0.5pt solid #003087;
        padding: 5mm 0;
        margin-bottom: 6mm;
        width: 100%;
    }

    .print-cover-title-block h1 {
        font-size: 22pt;
        font-weight: 900;
        color: #003087;
        letter-spacing: -0.5px;
        margin: 0 0 3mm 0;
        text-transform: uppercase;
    }

    .print-cover-title-block h2 {
        font-size: 16pt;
        font-weight: 600;
        color: #1e293b;
        margin: 0;
    }

    .print-cover-meta {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 3mm 10mm;
        background: #f8fafc;
        border: 0.5pt solid #e2e8f0;
        border-radius: 3mm;
        padding: 4mm 8mm;
        width: 100%;
        box-sizing: border-box;
        text-align: left;
        margin-bottom: 5mm;
    }

    .print-cover-meta-item strong {
        display: block;
        font-size: 7pt;
        color: #64748b;
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-bottom: 1mm;
    }

    .print-cover-meta-item span {
        font-size: 11pt;
        font-weight: 700;
        color: #0f172a;
    }

    .print-cover-confidential {
        font-size: 7.5pt;
        color: #94a3b8;
        text-align: center;
        margin-top: 5mm;
    }

    .print-cover-bottom {
        background: #003087;
        padding: 5mm 20mm;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-shrink: 0;
    }

    .print-cover-bottom span {
        font-size: 8pt;
        color: rgba(255,255,255,0.8);
    }

    .print-cover-bottom strong {
        font-size: 9pt;
        color: #ffffff;
    }

    /* =========================================
       ASSET PAGES
    ========================================= */
    .print-page {
        height: 297mm;
        width: 210mm;
        page-break-after: always;
        display: flex;
        flex-direction: column;
        background: white !important;
        position: relative;
        box-sizing: border-box;
        overflow: hidden;
    }

    .print-page-header {
        background: #ffffff !important;
        border-bottom: 0.3pt solid #e2e8f0;
        padding: 3mm 8mm;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-shrink: 0;
    }

    .print-page-header-left {
        display: flex;
        align-items: center;
        gap: 4mm;
    }

    .print-page-header-logo {
        height: 7mm;
        width: auto;
    }

    .print-page-header-divider {
        width: 0.3mm;
        height: 6mm;
        background: #cbd5e1;
    }

    .print-page-header-text {
        font-size: 8pt;
        color: #475569 !important;
        font-weight: 500;
    }

    .print-page-header-right {
        font-size: 8pt;
        color: #64748b !important;
        text-align: right;
    }

    .print-page-accent {
        background: #E30613;
        height: 1.5mm;
        flex-shrink: 0;
    }

    .print-content-wrapper {
        flex: 1;
        display: flex;
        flex-direction: column;
        padding: 3mm 8mm 2mm 8mm;
        overflow: hidden;
    }

    /* Asset identity block */
    .print-asset-identity {
        display: flex;
        align-items: flex-start;
        gap: 5mm;
        margin-bottom: 2mm;
        padding-bottom: 2mm;
        border-bottom: 0.3pt solid #e2e8f0;
        flex-shrink: 0;
    }

    .print-asset-number {
        background: #003087;
        color: white;
        font-size: 9pt;
        font-weight: 800;
        padding: 1.5mm 3mm;
        border-radius: 1.5mm;
        white-space: nowrap;
        flex-shrink: 0;
        min-width: 14mm;
        text-align: center;
    }

    .print-asset-title-block {
        flex: 1;
        min-width: 0;
    }

    .print-asset-type-badge {
        display: inline-block;
        background: #eff6ff;
        color: #2563eb;
        border: 0.3pt solid #bfdbfe;
        padding: 0.8mm 2.5mm;
        border-radius: 1mm;
        font-size: 7.5pt;
        font-weight: 700;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        margin-bottom: 1mm;
    }

    .print-asset-name {
        font-size: 14pt;
        font-weight: 800;
        color: #0f172a;
        letter-spacing: -0.3px;
        line-height: 1.1;
        margin: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    /* ── NEW LAYOUT: photos row (top) + data tables (below) ── */

    /* Photos strip: horizontal row at the top, fixed height */
    .print-photos-strip {
        display: flex;
        flex-direction: row;
        gap: 3mm;
        height: 55mm;
        flex-shrink: 0;
        margin-bottom: 3mm;
    }

    .print-photo-item {
        flex: 1;
        min-width: 0;
        border-radius: 2mm;
        overflow: hidden;
        border: 0.3pt solid #e2e8f0;
        background: #f8fafc;
    }

    .print-photo-item img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
    }

    .print-no-photo-box {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: #f8fafc;
        color: #94a3b8;
        border: 0.5pt dashed #cbd5e1;
        border-radius: 2mm;
        gap: 2mm;
        font-size: 8pt;
        height: 55mm;
        flex-shrink: 0;
        margin-bottom: 3mm;
    }

    /* Data area: ficha + specs side by side */
    .print-data-area {
        display: flex;
        gap: 4mm;
        flex: 1;
        overflow: hidden;
        align-items: flex-start;
    }

    .print-ficha-col {
        width: 88mm;
        flex-shrink: 0;
    }

    .print-specs-col {
        flex: 1;
        min-width: 0;
    }

    /* Ficha técnica table */
    .print-ficha {
        border-collapse: collapse;
        width: 100%;
        font-size: 8.5pt;
        margin-bottom: 0;
    }

    .print-ficha-header {
        background: #003087;
        color: white;
    }

    .print-ficha-header td {
        padding: 1.3mm 3mm;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        font-size: 8pt;
    }

    .print-ficha-header td.accent-line {
        width: 1.5mm;
        background: #E30613;
        padding: 0;
    }

    .print-ficha td.field-label {
        padding: 1.3mm 3mm;
        font-weight: 700;
        color: #334155;
        background: #f8fafc;
        border-right: 0.3pt solid #e2e8f0;
        border-bottom: 0.3pt solid #e2e8f0;
        width: 30%;
        white-space: nowrap;
        font-size: 8pt;
    }

    .print-ficha td.field-value {
        padding: 1.3mm 3mm;
        color: #0f172a;
        font-weight: 600;
        background: #ffffff;
        border-bottom: 0.3pt solid #e2e8f0;
        font-size: 8.5pt;
    }

    /* Specs table */
    .print-specs-table {
        border-collapse: collapse;
        width: 100%;
        font-size: 8pt;
    }

    .print-specs-header {
        background: #1e3a5f;
        color: white;
    }

    .print-specs-header td {
        padding: 1.3mm 3mm;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        font-size: 7.5pt;
    }

    .print-specs-header td.accent-line {
        width: 1.5mm;
        background: #E30613;
        padding: 0;
    }

    .print-specs-table td.spec-key {
        padding: 1mm 3mm;
        font-weight: 600;
        color: #475569;
        background: #f8fafc;
        border-right: 0.3pt solid #e2e8f0;
        border-bottom: 0.3pt solid #f1f5f9;
        width: 35%;
        font-size: 7.5pt;
        vertical-align: top;
        height: auto;
    }

    .print-specs-table td.spec-val {
        padding: 1mm 3mm;
        color: #0f172a;
        font-weight: 500;
        background: #ffffff;
        border-bottom: 0.3pt solid #f1f5f9;
        font-size: 7.5pt;
        vertical-align: top;
        height: auto;
    }

    .print-specs-table td.spec-val .spec-sub-block {
        margin-top: 1mm;
        padding: 0.8mm 2mm;
        background: #f8fafc;
        border: 0.3pt solid #e2e8f0;
        border-radius: 1mm;
        font-size: 7pt;
    }

    .print-specs-table td.spec-val .spec-sub-row {
        display: flex;
        justify-content: space-between;
        padding: 0.5mm 0;
        border-bottom: 0.3pt dashed #e2e8f0;
    }

    .print-specs-table td.spec-val .spec-sub-row:last-child {
        border-bottom: none;
    }

    .print-specs-table td.spec-val .spec-sub-key {
        color: #64748b;
        font-weight: 600;
    }

    .print-specs-table td.spec-val .spec-sub-val {
        font-weight: 700;
        color: #0f172a;
        text-align: right;
        margin-left: 2mm;
    }

    .print-specs-more {
        text-align: center;
        font-size: 7pt;
        color: #94a3b8;
        padding: 1.5mm;
        font-style: italic;
        background: #f8fafc;
        border-top: 0.3pt solid #e2e8f0;
    }

    /* Page footer */
    .print-page-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 2mm 8mm;
        border-top: 0.3pt solid #e2e8f0;
        flex-shrink: 0;
    }

    .print-page-footer-left {
        font-size: 7pt;
        color: #94a3b8;
    }

    .print-page-footer-center {
        font-size: 7pt;
        color: #64748b;
        font-weight: 600;
    }

    .print-page-footer-right {
        font-size: 7pt;
        color: #94a3b8;
    }
}


/* --- Credits & Pricing Styles --- */
.credit-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 4px 0 14px;
    background: rgba(255, 179, 0, 0.08);
    border: 1px solid rgba(255, 179, 0, 0.25);
    border-radius: 10px;
    color: var(--gold);
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(255, 179, 0, 0.05);
    transition: var(--transition);
    cursor: pointer;
}

.credit-chip:hover {
    background: rgba(255, 179, 0, 0.15);
    border-color: rgba(255, 179, 0, 0.4);
    box-shadow: 0 0 12px rgba(255, 179, 0, 0.15);
}

.credit-chip svg {
    width: 16px;
    height: 16px;
    color: var(--gold);
}

.credit-chip #credit-count {
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 179, 0, 0.3);
}

.credit-chip .credits-label {
    opacity: 0.8;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.plan-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    background: rgba(30, 168, 199, 0.08);
    border: 1px solid rgba(30, 168, 199, 0.20);
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.plan-chip svg {
    width: 15px;
    height: 15px;
    color: var(--cyan);
}

#buy-credits-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-left: 6px;
    background: var(--gold);
    border: 0;
    border-radius: 6px;
    color: #03080a;
    cursor: pointer;
    transition: var(--transition);
}

#buy-credits-button svg {
    width: 14px;
    height: 14px;
    color: #03080a;
}

#buy-credits-button:hover {
    background: #fff;
    box-shadow: 0 0 8px #fff;
    transform: scale(1.05);
}

/* Modals */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 8, 10, 0.85);
    backdrop-filter: blur(12px);
}

.modal-content {
    position: relative;
    z-index: 1001;
    width: 100%;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(99, 102, 241, 0.05);
    overflow: hidden;
    animation: fade-in-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.credits-modal-content {
    max-width: 980px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.inventory-modal-content {
    max-width: 780px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.folder-modal-content {
    max-width: 460px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.pdf-config-modal-content {
    max-width: 580px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.language-notice-content {
    max-width: 440px;
    width: 100%;
}

.language-notice-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.language-notice-icon {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.24);
}

.language-notice-icon svg {
    width: 18px;
    height: 18px;
}

.language-notice-copy {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--line-soft);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.01em;
}

.modal-close-btn {
    background: transparent;
    border: 0;
    color: var(--muted);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close-btn:hover {
    color: #fff;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.inventory-modal-body {
    display: grid;
    gap: 24px;
}

.modal-section {
    display: grid;
    gap: 16px;
}

.modal-section h4,
.section-heading-row h4 {
    color: var(--cyan);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.section-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.subtle-note {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-align: right;
}

.share-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px auto;
    align-items: end;
    gap: 12px;
}

.share-form .checkbox-field {
    grid-column: 1 / -1;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-height: 24px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.share-form .checkbox-field input {
    width: 16px;
    height: 16px;
    accent-color: var(--cyan);
}

.share-form .save-button {
    height: 40px;
}

.inventory-locations-editor {
    display: grid;
    gap: 12px;
}

.location-add-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.location-add-row .save-button {
    height: 40px;
}

.location-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.location-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 4px 8px 4px 10px;
    color: var(--text);
    background: rgba(99, 102, 241, 0.07);
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.location-chip button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.05);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}

.location-chip button:hover:not(:disabled) {
    color: #fff;
    background: rgba(255, 23, 68, 0.22);
}

.location-chip button svg {
    width: 12px;
    height: 12px;
}

.sharing-list {
    display: grid;
    gap: 8px;
}

.sharing-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--line-soft);
    border-radius: 10px;
}

.sharing-row strong,
.sharing-row span {
    display: block;
    min-width: 0;
}

.sharing-row strong {
    overflow: hidden;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sharing-row span {
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.role-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 9px;
    color: var(--cyan);
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.danger-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: var(--danger);
    background: rgba(255, 23, 68, 0.06);
    border: 1px solid rgba(255, 23, 68, 0.25);
    border-radius: 9px;
    cursor: pointer;
    transition: var(--transition);
}

.danger-icon-button svg {
    width: 15px;
    height: 15px;
}

.danger-icon-button:hover:not(:disabled) {
    background: rgba(255, 23, 68, 0.14);
    border-color: var(--danger);
}

.danger-icon-button:disabled {
    cursor: wait;
    opacity: 0.6;
}

.empty-state.compact {
    min-height: auto;
    padding: 14px;
    border: 1px dashed var(--line-soft);
    border-radius: 10px;
}

.empty-state.compact p {
    margin: 0;
}

.modal-intro {
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.6;
    margin-bottom: 24px;
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.credits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 850px) {
    .credits-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.credits-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.credits-section h4 {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--cyan);
    border-bottom: 1px dashed var(--line-soft);
    padding-bottom: 8px;
}

.pricing-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 550px) {
    .pricing-cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

.pricing-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: rgba(20, 42, 51, 0.3);
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    transition: var(--transition);
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-2px);
    border-color: var(--line);
    background: rgba(20, 42, 51, 0.45);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.pricing-card.professional {
    border-color: var(--cyan);
    background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.08) 0%, rgba(20, 42, 51, 0.3) 100%);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.1);
}

.pricing-card.best-value {
    border-color: var(--gold);
    background: radial-gradient(circle at 50% 0%, rgba(255, 179, 0, 0.08) 0%, rgba(20, 42, 51, 0.3) 100%);
    box-shadow: 0 0 15px rgba(255, 179, 0, 0.1);
}

.badge-new {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--cyan);
    color: #03080a;
}

.pricing-card.best-value .badge-new {
    background: var(--gold);
}

.pricing-card h5 {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.pricing-card .price {
    font-size: 26px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 4px;
}

.pricing-card .price span {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}

.pricing-card .credits-amount {
    font-size: 13px;
    font-weight: 700;
    color: var(--cyan);
    margin-bottom: 16px;
}

.pricing-card.best-value .credits-amount {
    color: var(--gold);
}

.pricing-card .features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    flex: 1;
}

.pricing-card .features li {
    font-size: 12.5px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-card .features li svg {
    width: 14px;
    height: 14px;
    color: var(--success);
}

.pricing-card .features li svg.not-included {
    color: var(--danger);
}

.pricing-card .info-text {
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--muted);
    margin-bottom: 20px;
    flex: 1;
}

.btn-checkout {
    width: 100%;
    height: 38px;
    background: var(--panel-2-solid);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    font-weight: 700;
    font-family: var(--font);
    font-size: 12.5px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-checkout:hover:not(:disabled) {
    background: var(--cyan);
    border-color: var(--cyan);
    color: #03080a;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.pricing-card.best-value .btn-checkout:hover:not(:disabled) {
    background: var(--gold);
    border-color: var(--gold);
    color: #03080a;
    box-shadow: 0 4px 12px rgba(255, 179, 0, 0.2);
}

.btn-checkout:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Billing Toggle Switch */
.billing-toggle-container {
    display: inline-flex;
    background: rgba(3, 8, 10, 0.5);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    padding: 4px;
    gap: 4px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.billing-toggle-btn {
    background: transparent;
    border: 0;
    padding: 6px 16px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.billing-toggle-btn.active {
    background: var(--cyan);
    color: #03080a;
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.3);
}

.billing-toggle-btn:not(.active):hover {
    color: #fff;
}

.badge-saving {
    font-size: 10px;
    padding: 2px 6px;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid var(--success);
    color: var(--success);
    border-radius: 999px;
    font-weight: 800;
    text-transform: uppercase;
}

.billing-toggle-btn.active .badge-saving {
    background: #03080a;
    color: var(--success);
    border-color: transparent;
}

/* Equivalent and savings texts */
.equivalent-monthly {
    font-size: 12px;
    color: var(--cyan);
    font-weight: 700;
    margin-top: -6px;
    margin-bottom: 6px;
}

.savings-amount {
    font-size: 11px;
    color: var(--success);
    font-weight: 700;
    margin-top: 4px;
    margin-bottom: 12px;
}

.price-per-credit {
    font-size: 11px;
    color: var(--muted);
    margin-top: -6px;
    margin-bottom: 12px;
}

/* Pack Grid Adjustments */
.pack-cards-grid, .pack-cards {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
}

/* Color and Icon Visual Selectors in Folder Modal */
.color-selector-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.color-dot {
    position: relative;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--dot-color);
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    padding: 0;
}

.color-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--dot-color);
    opacity: 0;
    transition: var(--transition);
}

.color-dot.active::after {
    opacity: 1;
}

.color-dot:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px var(--dot-color);
}

.icon-selector-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 8px;
}

.icon-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--panel-2-solid);
    color: var(--muted);
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.icon-option svg {
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.icon-option:hover {
    border-color: var(--cyan);
    color: #fff;
    background: rgba(99, 102, 241, 0.08);
}

.icon-option.active {
    border-color: var(--cyan);
    color: #fff;
    background: rgba(99, 102, 241, 0.15);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.field-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 2px;
}

/* --- Premium Light Mode Overrides --- */
body.light-theme {
    --bg: #f8fafc;
    --bg-darker: #f1f5f9;
    --panel: rgba(255, 255, 255, 0.85);
    --panel-solid: #ffffff;
    --panel-2: rgba(241, 245, 249, 0.6);
    --panel-2-solid: #f1f5f9;
    --line: rgba(13, 148, 136, 0.14);
    --line-soft: rgba(13, 148, 136, 0.06);
    --line-focus: rgba(13, 148, 136, 0.45);
    --text: #0f172a;
    --muted: #475569;
    --faint: #64748b;
    --cyan: #0d9488;
    --cyan-glow: rgba(13, 148, 136, 0.12);
    --gold: #b25d00;
    --gold-glow: rgba(178, 93, 0, 0.1);
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.1);
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.1);
    --shadow: rgba(15, 23, 42, 0.05);
}

body.light-theme .grid-overlay {
    background-image:
        linear-gradient(rgba(79, 70, 229, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 70, 229, 0.03) 1px, transparent 1px);
}

body.light-theme .grid-glow {
    background:
        radial-gradient(circle at 20% 15%, rgba(99, 102, 241, 0.15) 0%, transparent 55%),
        radial-gradient(circle at 80% 35%, rgba(139, 92, 246, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 10% 75%, rgba(20, 184, 166, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 90% 85%, rgba(251, 191, 36, 0.06) 0%, transparent 40%),
        var(--bg);
}

body.light-theme .sidebar {
    background: rgba(240, 246, 247, 0.82);
    backdrop-filter: blur(25px);
    border-right-color: rgba(79, 70, 229, 0.15);
}

body.light-theme .topbar {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(20px);
    border-bottom-color: rgba(79, 70, 229, 0.12);
    box-shadow: 0 4px 20px rgba(0, 54, 61, 0.02);
}

body.light-theme .credit-chip,
body.light-theme .plan-chip,
body.light-theme .legacy-link {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(79, 70, 229, 0.15);
    box-shadow: 0 2px 6px rgba(0, 54, 61, 0.02);
}

body.light-theme .credit-chip:hover {
    background: rgba(255, 179, 0, 0.12);
    border-color: rgba(255, 179, 0, 0.5);
}

body.light-theme .legacy-link:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

body.light-theme .folder-action {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(79, 70, 229, 0.15);
    color: var(--text);
    box-shadow: 0 2px 4px rgba(0, 54, 61, 0.02);
}

body.light-theme .folder-action:hover {
    color: var(--cyan);
    border-color: var(--cyan);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.08);
}

body.light-theme .folder-action.active {
    color: #ffffff;
    background: var(--cyan);
    border-color: var(--cyan);
    box-shadow: 0 3px 10px var(--cyan-glow);
}

body.light-theme .icon-button {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(79, 70, 229, 0.15);
    color: var(--cyan);
}

body.light-theme .icon-button:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.1);
}

body.light-theme .icon-button:hover svg {
    color: var(--cyan);
}

body.light-theme #logout-button {
    border-color: rgba(220, 38, 38, 0.2);
    background: rgba(220, 38, 38, 0.04);
    color: var(--danger);
}

body.light-theme #logout-button:hover {
    background: rgba(220, 38, 38, 0.08);
    border-color: var(--danger);
    color: var(--danger);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.1);
}

body.light-theme #logout-button svg {
    color: var(--danger);
}

body.light-theme .metric {
    background: rgba(255, 255, 255, 0.65);
    border-color: rgba(79, 70, 229, 0.1);
    box-shadow:
        0 4px 16px rgba(0, 54, 61, 0.02),
        inset 0 0 8px rgba(255, 255, 255, 0.5);
}

body.light-theme .metric::after {
    opacity: 0.8;
}

body.light-theme .topbar h2,
body.light-theme .empty-state h3,
body.light-theme .detail-header h3,
body.light-theme .modal-header h3,
body.light-theme .sharing-row strong,
body.light-theme .pricing-card h5,
body.light-theme .pricing-card .price,
body.light-theme .spec-row dd,
body.light-theme .asset-name strong,
body.light-theme .credit-chip #credit-count,
body.light-theme .metric span {
    color: var(--text);
    text-shadow: none;
}

body.light-theme .brand-mark {
    background: radial-gradient(circle at center, #ffffff, #edf4f5);
    box-shadow:
        0 4px 12px rgba(0, 54, 61, 0.04),
        inset 0 0 10px rgba(79, 70, 229, 0.08),
        0 0 15px rgba(79, 70, 229, 0.03);
    border-color: rgba(79, 70, 229, 0.15);
}

body.light-theme .scanner-ring {
    border-color: rgba(79, 70, 229, 0.12);
    background: linear-gradient(135deg, rgba(255,255,255,0.7), transparent);
}

body.light-theme .brand-asset {
    background: linear-gradient(135deg, #0b2226 30%, var(--cyan) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

body.light-theme .brand-invent {
    color: var(--gold);
    text-shadow: 0 1px 2px rgba(217, 119, 6, 0.1);
}

body.light-theme .content {
    background: rgba(255, 255, 255, 0.15);
}

body.light-theme .toolbar {
    background: rgba(255, 255, 255, 0.45);
    border-bottom-color: rgba(79, 70, 229, 0.12);
}

body.light-theme td {
    background: rgba(255, 255, 255, 0.6);
    border-top: 1.5px solid rgba(79, 70, 229, 0.06);
    border-bottom: 1.5px solid rgba(79, 70, 229, 0.06);
}

body.light-theme td:first-child {
    border-left: 1.5px solid rgba(79, 70, 229, 0.06);
}

body.light-theme td:last-child {
    border-right: 1.5px solid rgba(79, 70, 229, 0.06);
}

body.light-theme tbody tr:hover td {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(79, 70, 229, 0.15);
}

body.light-theme tbody tr.selected td {
    border-color: var(--cyan);
}

body.light-theme .inventory-row {
    background: rgba(255, 255, 255, 0.45);
    border-color: rgba(79, 70, 229, 0.1);
}

body.light-theme .inventory-row:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(79, 70, 229, 0.2);
}

body.light-theme .inventory-row.active {
    background: radial-gradient(circle at 10% 10%, rgba(79, 70, 229, 0.08) 0%, #ffffff 100%);
    border-color: var(--cyan);
    box-shadow: 0 4px 15px rgba(0, 54, 61, 0.04), inset 0 0 8px rgba(79, 70, 229, 0.05);
}

body.light-theme .inventory-row.active strong {
    color: var(--cyan);
    text-shadow: none;
}

body.light-theme .inventory-row.active .inventory-meta {
    color: var(--muted);
}

body.light-theme .login-button,
body.light-theme .save-button {
    color: #ffffff;
    background: linear-gradient(135deg, #0093ab 0%, #00768a 100%);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

body.light-theme .login-button:hover,
body.light-theme .save-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #00acc7 0%, #008ba3 100%);
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.3);
}

body.light-theme #buy-credits-button {
    color: #ffffff;
    background: var(--gold);
}

body.light-theme #buy-credits-button svg {
    color: #ffffff;
}

body.light-theme .modal-backdrop {
    background: rgba(12, 34, 38, 0.3);
    backdrop-filter: blur(8px);
}

body.light-theme .modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(79, 70, 229, 0.15);
    box-shadow:
        0 20px 50px rgba(0, 54, 61, 0.12),
        0 0 30px rgba(79, 70, 229, 0.04);
}

body.light-theme .login-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-color: rgba(79, 70, 229, 0.15);
    box-shadow:
        0 20px 45px rgba(0, 54, 61, 0.08),
        0 0 25px rgba(79, 70, 229, 0.04),
        inset 0 0 15px rgba(255, 255, 255, 0.5);
}

body.light-theme .shell {
    box-shadow: 0 0 40px rgba(0, 54, 61, 0.05);
    border-left-color: rgba(79, 70, 229, 0.12);
    border-right-color: rgba(79, 70, 229, 0.12);
}

body.light-theme ::-webkit-scrollbar-thumb {
    background: rgba(79, 70, 229, 0.12);
}

body.light-theme ::-webkit-scrollbar-thumb:hover {
    background: var(--cyan);
}

body.light-theme .login-card input::placeholder,
body.light-theme .search-control input::placeholder {
    color: rgba(78, 111, 117, 0.4);
}

body.light-theme .login-card input,
body.light-theme .search-control,
body.light-theme .field input,
body.light-theme .field textarea,
body.light-theme .field select,
body.light-theme select {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(79, 70, 229, 0.15);
    color: var(--text);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.02);
}

body.light-theme .login-card input:focus,
body.light-theme .search-control:focus-within,
body.light-theme .field input:focus,
body.light-theme .field textarea:focus,
body.light-theme .field select:focus,
body.light-theme select:focus {
    background: #ffffff;
    box-shadow: 0 0 8px rgba(79, 70, 229, 0.12), inset 0 1px 3px rgba(0,0,0,0.02);
    border-color: var(--cyan);
}

/* Neutralizar fondo amarillo del autofill — tema claro */
body.light-theme .field input:-webkit-autofill,
body.light-theme .field input:-webkit-autofill:hover,
body.light-theme .field input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px #ffffff inset !important;
    -webkit-text-fill-color: #0f172a !important;
    caret-color: #0f172a;
    transition: background-color 5000s ease-in-out 0s;
}

body.light-theme .folder-row {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(79, 70, 229, 0.15);
    box-shadow: 0 3px 10px rgba(0, 54, 61, 0.02);
}

body.light-theme .folder-chevron {
    color: var(--muted);
}

body.light-theme .folder-title {
    color: var(--text);
}

body.light-theme .folder-inventory-list {
    border-left-color: rgba(79, 70, 229, 0.1);
}

body.light-theme .folder-icon-button {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(79, 70, 229, 0.15);
    color: var(--muted);
}

body.light-theme .folder-icon-button:hover {
    color: var(--cyan);
    border-color: var(--cyan);
    background: rgba(255, 255, 255, 0.95);
}

body.light-theme .folder-icon-button.danger:hover {
    color: var(--danger);
    border-color: rgba(220, 38, 38, 0.3);
    background: rgba(220, 38, 38, 0.05);
}

body.light-theme .selection-toolbar span {
    color: var(--text);
}

body.light-theme .selection-toolbar select {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(79, 70, 229, 0.15);
    color: var(--text);
}

body.light-theme .pricing-card {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(79, 70, 229, 0.12);
    box-shadow: 0 8px 24px rgba(0, 54, 61, 0.03);
}

body.light-theme .pricing-card:hover {
    background: #ffffff;
    border-color: var(--cyan);
    box-shadow: 0 12px 28px rgba(0, 54, 61, 0.07);
}

body.light-theme .pricing-card.professional {
    background: radial-gradient(circle at 50% 0%, rgba(79, 70, 229, 0.04) 0%, rgba(255, 255, 255, 0.8) 100%);
    border-color: var(--cyan);
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.08);
}

body.light-theme .pricing-card.professional:hover {
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.15);
    background: radial-gradient(circle at 50% 0%, rgba(79, 70, 229, 0.06) 0%, #ffffff 100%);
}

body.light-theme .pricing-card.best-value {
    background: radial-gradient(circle at 50% 0%, rgba(217, 119, 6, 0.04) 0%, rgba(255, 255, 255, 0.8) 100%);
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(217, 119, 6, 0.08);
}

body.light-theme .pricing-card.best-value:hover {
    box-shadow: 0 8px 25px rgba(217, 119, 6, 0.15);
    background: radial-gradient(circle at 50% 0%, rgba(217, 119, 6, 0.06) 0%, #ffffff 100%);
}

body.light-theme .btn-checkout {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(79, 70, 229, 0.15);
    color: var(--text);
}

body.light-theme .btn-checkout:hover:not(:disabled) {
    background: var(--cyan);
    border-color: var(--cyan);
    color: #ffffff;
    box-shadow: 0 4px 10px var(--cyan-glow);
}

body.light-theme .pricing-card.best-value .btn-checkout:hover:not(:disabled) {
    background: var(--gold);
    border-color: var(--gold);
    color: #ffffff;
    box-shadow: 0 4px 10px var(--gold-glow);
}

body.light-theme .detail-panel {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    border-left-color: rgba(79, 70, 229, 0.12);
}

body.light-theme .spec-row {
    background: rgba(79, 70, 229, 0.02);
    border-color: rgba(79, 70, 229, 0.08);
}

body.light-theme .spec-row dd {
    color: var(--text);
}

body.light-theme .color-dot {
    box-shadow: 0 2px 6px rgba(0, 54, 61, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .folder-block.drag-over .folder-row {
    border-color: var(--cyan);
    background: rgba(79, 70, 229, 0.06);
}

body.light-theme .status-pill.draft {
    color: var(--muted);
    background: rgba(78, 111, 117, 0.08);
    border-color: rgba(78, 111, 117, 0.2);
}

body.light-theme .status-pill.pending_review {
    color: var(--cyan);
    background: rgba(79, 70, 229, 0.08);
    border-color: rgba(79, 70, 229, 0.25);
    box-shadow: none;
}

body.light-theme .status-pill.reviewed {
    color: var(--gold);
    background: rgba(217, 119, 6, 0.08);
    border-color: rgba(217, 119, 6, 0.25);
}

body.light-theme .status-pill.approved {
    color: var(--success);
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.25);
    box-shadow: none;
}

body.light-theme .status-pill.hidden-state {
    color: var(--danger);
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.25);
}

/* Premium Light Theme Polish Overrides */
body.light-theme #buy-credits-button:hover {
    background: #c27a00;
    box-shadow: 0 0 8px rgba(178, 93, 0, 0.4);
    color: #ffffff;
}

body.light-theme #buy-credits-button:hover svg {
    color: #ffffff;
}

body.light-theme .modal-close-btn:hover {
    color: var(--cyan);
}

body.light-theme .metric:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: var(--cyan);
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.08);
}

body.light-theme .location-chip {
    background: rgba(79, 70, 229, 0.08);
    border-color: rgba(79, 70, 229, 0.2);
}

/* --- Drag and Drop Inventory Reordering --- */
.inventory-row-wrap.drag-over-above {
    border-top: 2px solid var(--cyan);
    margin-top: -2px;
}
.inventory-row-wrap.drag-over-below {
    border-bottom: 2px solid var(--cyan);
    margin-bottom: -2px;
}

/* --- Map Button and Modal Styles --- */
.inventory-map-btn {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line-soft);
    cursor: pointer;
    transition: var(--transition);
    margin-right: 4px;
    flex-shrink: 0;
}
.inventory-map-btn:hover {
    color: var(--cyan);
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--cyan);
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.2);
}
.inventory-map-btn svg {
    width: 13px;
    height: 13px;
}

.map-modal-content {
    width: min(100%, 700px) !important;
}
.map-container {
    width: 100%;
    height: 380px;
    border-radius: 12px;
    border: 1px solid var(--line);
    overflow: hidden;
    position: relative;
    background: var(--bg-darker);
    margin-bottom: 20px;
}
.map-container iframe {
    border: 0;
    background: transparent;
    display: block;
}
.map-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    background: rgba(10, 22, 28, 0.95);
    color: var(--muted);
    gap: 12px;
    z-index: 2;
}
.map-placeholder svg {
    width: 48px;
    height: 48px;
    color: var(--danger);
}
.map-placeholder p {
    font-size: 15px;
    font-weight: 600;
    max-width: 400px;
    margin: 0;
}
.map-placeholder .sub-text {
    font-size: 12px;
    color: var(--faint);
    margin: 0;
}
.map-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line-soft);
    border-radius: 10px;
}
.map-info-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
}
.map-info-item svg {
    width: 16px;
    height: 16px;
    color: var(--cyan);
    margin-top: 2px;
    flex-shrink: 0;
}
.map-info-item strong {
    display: block;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}
.map-info-item span {
    color: var(--text);
    word-break: break-word;
}

/* --- Scroll Indicator in Inventory Modal --- */
.modal-scroll-indicator {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--panel-2-solid);
    border: 1px solid var(--line);
    color: var(--cyan);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 0 12px rgba(99, 102, 241, 0.1);
    animation: bounce-arrow 2s infinite;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.modal-scroll-indicator:hover {
    color: #fff;
    border-color: var(--cyan);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(99, 102, 241, 0.35);
}
.modal-scroll-indicator.hidden {
    display: none !important;
}
.modal-scroll-indicator.fade-out {
    opacity: 0;
    pointer-events: none;
}

@keyframes bounce-arrow {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-6px);
    }
    60% {
        transform: translateX(-50%) translateY(-3px);
    }
}

/* --- Premium Light Theme Equivalents --- */
body.light-theme .inventory-row-wrap.drag-over-above {
    border-top-color: var(--cyan);
}
body.light-theme .inventory-row-wrap.drag-over-below {
    border-bottom-color: var(--cyan);
}
body.light-theme .inventory-map-btn {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(79, 70, 229, 0.12);
    color: var(--muted);
}
body.light-theme .inventory-map-btn:hover {
    color: var(--cyan);
    background: rgba(79, 70, 229, 0.08);
    border-color: var(--cyan);
}
body.light-theme .map-container {
    border-color: rgba(79, 70, 229, 0.15);
    background: #edf3f5;
}
body.light-theme .map-placeholder {
    background: rgba(240, 246, 247, 0.95);
    color: var(--muted);
}
body.light-theme .map-info {
    background: rgba(79, 70, 229, 0.02);
    border-color: rgba(79, 70, 229, 0.12);
}
body.light-theme .modal-scroll-indicator {
    background: var(--bg);
    border-color: rgba(79, 70, 229, 0.2);
    color: var(--cyan);
    box-shadow:
        0 8px 24px rgba(0, 54, 61, 0.15),
        0 0 10px rgba(79, 70, 229, 0.1);
}


/* ============================================================
 * MEJORAS SAAS PROFESIONALES — AssetInvent v2026.05.22j
 * Toast, Skeleton, Leaflet, Animaciones, Atajos teclado
 * ============================================================ */

/* ---- SISTEMA TOAST ---- */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    width: 340px;
    max-width: calc(100vw - 32px);
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: var(--font);
    pointer-events: all;
    border: 1px solid transparent;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3);
    backdrop-filter: blur(20px);
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
    min-width: 0;
}

.toast.toast-visible {
    transform: translateX(0);
    opacity: 1;
}

.toast-success {
    background: rgba(0, 28, 18, 0.92);
    border-color: rgba(0, 230, 118, 0.35);
    color: var(--success);
}
.toast-error {
    background: rgba(28, 0, 8, 0.92);
    border-color: rgba(255, 23, 68, 0.35);
    color: #ff6b8a;
}
.toast-info {
    background: rgba(0, 18, 28, 0.92);
    border-color: rgba(99, 102, 241, 0.35);
    color: var(--cyan);
}
.toast-warning {
    background: rgba(28, 18, 0, 0.92);
    border-color: rgba(255, 179, 0, 0.35);
    color: var(--gold);
}

.toast-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.toast span {
    flex: 1;
    min-width: 0;
    line-height: 1.4;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.6;
    font-size: 18px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    transition: opacity 0.2s;
}
.toast-close:hover { opacity: 1; }

/* Modo claro: toasts */
.light-theme .toast-success { background: rgba(240, 255, 248, 0.96); color: #00875a; border-color: rgba(0,135,90,0.25); }
.light-theme .toast-error   { background: rgba(255, 240, 243, 0.96); color: #c01048; border-color: rgba(192,16,72,0.25); }
.light-theme .toast-info    { background: rgba(240, 251, 255, 0.96); color: #0070a8; border-color: rgba(0,112,168,0.25); }
.light-theme .toast-warning { background: rgba(255, 252, 235, 0.96); color: #b45309; border-color: rgba(180,83,9,0.25); }

/* ---- SKELETON LOADERS ---- */
.skeleton-row {
    cursor: default !important;
    pointer-events: none;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    background: rgba(255,255,255,0.03) !important;
    border-color: rgba(255,255,255,0.06) !important;
}

.skeleton-line {
    display: block;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.06) 75%);
    background-size: 400% 100%;
    animation: skeleton-shimmer 1.6s ease infinite;
}

.skeleton-pill {
    display: inline-block;
    width: 34px;
    height: 20px;
    border-radius: 20px;
    background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.06) 75%);
    background-size: 400% 100%;
    animation: skeleton-shimmer 1.6s ease infinite;
}

@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
@keyframes skeleton-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.light-theme .skeleton-line,
.light-theme .skeleton-pill {
    background: linear-gradient(90deg, rgba(0,0,0,0.06) 25%, rgba(0,0,0,0.10) 50%, rgba(0,0,0,0.06) 75%);
    background-size: 400% 100%;
    animation: skeleton-shimmer 1.6s ease infinite;
}

/* ---- ANIMACIÓN FILAS DE ACTIVOS (staggered) ---- */
@keyframes row-fade-in-up {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

tbody tr.row-fade-in {
    animation: row-fade-in-up 0.35s ease both;
}

/* ---- MAPA LEAFLET ---- */
#leaflet-map {
    width: 100%;
    height: 100%;
    min-height: 320px;
    border-radius: 12px;
    overflow: hidden;
    z-index: 1;
}

#leaflet-map.hidden { display: none !important; }

/* Estilos Leaflet oscuros para el tema */
.leaflet-container {
    background: #0c1f26 !important;
    font-family: var(--font) !important;
}

/* Saturar tiles en tema oscuro para mejor legibilidad */
.leaflet-tile-pane {
    filter: invert(1) hue-rotate(180deg) saturate(1.3) brightness(0.85);
}

.light-theme .leaflet-tile-pane {
    filter: none;
}

/* Pin personalizado */
.leaflet-custom-marker {
    background: none !important;
    border: none !important;
}
.lf-pin {
    filter: drop-shadow(0 4px 8px rgba(0,229,255,0.5));
    transition: transform 0.2s ease;
}
.lf-pin:hover { transform: scale(1.15); }

/* Popup Leaflet */
.leaflet-popup-content-wrapper {
    background: rgba(9, 22, 26, 0.95) !important;
    border: 1px solid var(--line) !important;
    border-radius: 10px !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.5) !important;
    color: var(--text) !important;
    font-family: var(--font) !important;
    font-size: 13px !important;
}
.leaflet-popup-tip {
    background: rgba(9, 22, 26, 0.95) !important;
}
.leaflet-popup-content strong { color: var(--cyan); }
.leaflet-control-zoom a {
    background: rgba(9, 22, 26, 0.9) !important;
    border-color: var(--line) !important;
    color: var(--text) !important;
}
.leaflet-control-zoom a:hover {
    background: rgba(99, 102, 241, 0.15) !important;
    color: var(--cyan) !important;
}
.leaflet-attribution-flag { display: none !important; }
.leaflet-control-attribution {
    background: rgba(9, 22, 26, 0.7) !important;
    color: var(--muted) !important;
    font-size: 10px !important;
    border-radius: 6px 0 0 0 !important;
}
.leaflet-control-attribution a { color: var(--cyan) !important; }

.light-theme .leaflet-popup-content-wrapper {
    background: rgba(255,255,255,0.97) !important;
    border-color: rgba(0,0,0,0.1) !important;
    color: #1a1a1a !important;
}
.light-theme .leaflet-popup-tip { background: rgba(255,255,255,0.97) !important; }
.light-theme .leaflet-control-zoom a {
    background: rgba(255,255,255,0.95) !important;
    border-color: rgba(0,0,0,0.15) !important;
    color: #333 !important;
}
.light-theme .leaflet-control-attribution {
    background: rgba(255,255,255,0.8) !important;
    color: #555 !important;
}

/* ---- HINT ATAJO DE TECLADO en buscador de inventarios ---- */
.search-control .kbd-hint {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    padding: 2px 6px;
    border-radius: 5px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--cyan);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
    user-select: none;
    opacity: 0.7;
}
.light-theme .search-control .kbd-hint {
    background: rgba(0,80,200,0.06);
    border-color: rgba(0,80,200,0.2);
    color: #0059b2;
}

/* ---- BOTÓN DE EXPORTACIÓN CON ESTADO DE PROGRESO ---- */
.export-progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--cyan), #4338ca, var(--gold));
    background-size: 200% 100%;
    animation: export-progress-slide 1.5s linear infinite;
    z-index: 9998;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.export-progress-bar.visible {
    opacity: 1;
}

@keyframes export-progress-slide {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Notificación de exportación en curso */
.export-toast-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: rgba(9, 22, 26, 0.95);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 24px 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--cyan);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    z-index: 9998;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.export-toast-bar.visible {
    transform: translateX(-50%) translateY(0);
}

.export-toast-bar .etb-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0,229,255,0.3);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.light-theme .export-toast-bar {
    background: rgba(255,255,255,0.97);
    border-color: rgba(0,0,0,0.1);
    color: #0059b2;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

/* ---- MEJORA EMPTY STATE DASHBOARD ---- */
.empty-state-dashboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 48px 36px;
    text-align: center;
    color: var(--muted);
}

.empty-state-dashboard .esd-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 20px;
    color: var(--cyan);
    filter: drop-shadow(0 0 12px rgba(0,229,255,0.35));
    animation: bounce-float 3s ease-in-out infinite alternate;
}

.empty-state-dashboard h3 {
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 10px;
}

.empty-state-dashboard p {
    max-width: 380px;
    line-height: 1.6;
    font-size: 13.5px;
    margin-bottom: 8px;
}

.empty-state-dashboard .esd-shortcut {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 10px 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(0,229,255,0.05);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: var(--transition);
}

.empty-state-dashboard .esd-shortcut:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    background: rgba(0,229,255,0.08);
}

.empty-state-dashboard .esd-shortcut kbd {
    padding: 2px 7px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 5px;
    font-family: monospace;
    font-size: 11px;
    color: var(--text);
}

.light-theme .empty-state-dashboard .esd-shortcut {
    border-color: rgba(0,0,0,0.12);
    color: #667788;
}
.light-theme .empty-state-dashboard .esd-shortcut:hover {
    border-color: #0059b2;
    color: #0059b2;
}
.light-theme .empty-state-dashboard .esd-shortcut kbd {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.15);
    color: #333;
}

/* ---- ESTADO DEL INVENTARIO MAP-BTN MEJORADO ---- */
.inventory-map-btn {
    flex-shrink: 0;
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}
.inventory-map-btn svg {
    width: 13px;
    height: 13px;
}
.inventory-map-btn:hover,
.inventory-row.active .inventory-map-btn {
    background: rgba(99, 102, 241, 0.15);
    color: var(--cyan);
    box-shadow: 0 0 8px rgba(0,229,255,0.2);
}

/* ---- DRAG INDICATORS ---- */
.inventory-row-wrap.drag-over-above .inventory-row {
    border-top: 2px solid var(--cyan) !important;
    box-shadow: 0 -2px 8px rgba(0,229,255,0.25);
}
.inventory-row-wrap.drag-over-below .inventory-row {
    border-bottom: 2px solid var(--cyan) !important;
    box-shadow: 0 2px 8px rgba(0,229,255,0.25);
}
.light-theme .inventory-row-wrap.drag-over-above .inventory-row {
    border-top: 2px solid #0059b2 !important;
}
.light-theme .inventory-row-wrap.drag-over-below .inventory-row {
    border-bottom: 2px solid #0059b2 !important;
}

/* ============================================================
   SAAS LANDING PAGE & ONBOARDING STYLING - AssetInvent
   ============================================================ */

/* Logo Sizing Constraints */
.nav-logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
}

.login-logo-img {
    height: 56px;
    width: 56px;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
    background: radial-gradient(circle at center, #102e37, #06151a);
    border: 1px solid var(--line);
    padding: 4px;
    margin-right: 4px;
}

.sidebar-logo-img {
    height: 42px;
    width: 42px;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 0 10px rgba(99, 102, 241, 0.15);
    background: radial-gradient(circle at center, #102e37, #06151a);
    border: 1px solid var(--line);
    padding: 3px;
}

/* Landing Container */
.landing-container {
    width: 100%;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
    z-index: 2;
    overflow-y: auto;
}

/* Navigation Bar */
.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 4%;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(6, 17, 21, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 4px 30px rgba(0,0,0,0.4);
    transition: var(--transition);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-brand-text {
    font-family: var(--font);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--cyan);
    text-shadow: 0 0 8px var(--cyan-glow);
}

.nav-cta-btn {
    background: transparent;
    border: 1.5px solid var(--cyan);
    border-radius: 10px;
    color: var(--cyan);
    font-weight: 700;
    font-family: var(--font);
    font-size: 13.5px;
    padding: 8px 18px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.1);
}

.nav-cta-btn:hover {
    background: var(--cyan);
    color: var(--bg-darker);
    box-shadow: 0 0 15px var(--cyan-glow);
    transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 4% 60px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-badge {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 99px;
    color: var(--cyan);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 6px 14px;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.hero-title {
    font-family: var(--font);
    font-size: clamp(32px, 4.5vw, 54px);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 40%, var(--cyan) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    color: var(--muted);
    font-size: clamp(15px, 1.8vw, 17px);
    line-height: 1.6;
    margin-bottom: 32px;
    max-width: 580px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--cyan) 0%, #4338ca 100%);
    color: var(--bg-darker);
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-family: var(--font);
    font-size: 14.5px;
    padding: 14px 28px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, #818cf8 0%, var(--cyan) 100%);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    font-weight: 700;
    font-family: var(--font);
    font-size: 14.5px;
    padding: 14px 28px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
    color: #fff;
    transform: translateY(-2px);
}

/* Phone Mockup Frame */
.hero-mockup {
    display: flex;
    justify-content: center;
    position: relative;
}

.phone-frame {
    width: 280px;
    height: 570px;
    border: 12px solid #142830;
    border-radius: 36px;
    background: #09161a;
    box-shadow:
        0 25px 60px rgba(0,0,0,0.8),
        0 0 35px rgba(99, 102, 241, 0.15),
        inset 0 0 20px rgba(0,0,0,0.9);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.phone-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 22px;
    background: #142830;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    border-radius: 24px;
}

.mockup-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.phone-frame:hover .mockup-img {
    transform: scale(1.04);
}

/* Features Grid */
.features-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 4%;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-family: var(--font);
    font-size: clamp(26px, 3.5vw, 38px);
    font-weight: 800;
    margin-bottom: 16px;
    color: #fff;
}

.section-header p {
    color: var(--muted);
    font-size: 15.5px;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 32px 24px;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.08), 0 5px 15px rgba(0,0,0,0.5);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--cyan);
    display: grid;
    place-items: center;
    margin-bottom: 24px;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.1);
}

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

.feature-card h3 {
    font-family: var(--font);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}

.feature-card p {
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.6;
}

/* App Showcase Section */
.app-showcase-section {
    background: radial-gradient(circle at 50% 50%, rgba(13, 35, 43, 0.4) 0%, var(--bg) 100%);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 90px 4%;
}

.app-showcase-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    gap: 50px;
    align-items: center;
}

.app-showcase-image {
    display: flex;
    justify-content: center;
}

.app-screenshot-flat {
    max-width: min(100%, 320px);
    border-radius: 20px;
    border: 6px solid #142830;
    box-shadow:
        0 20px 45px rgba(0,0,0,0.7),
        0 0 25px rgba(99, 102, 241, 0.1);
}

.section-tag {
    color: var(--gold);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 16px;
    display: inline-block;
}

.app-showcase-content h2 {
    font-family: var(--font);
    font-size: clamp(24px, 3.2vw, 36px);
    font-weight: 800;
    margin-bottom: 20px;
    color: #fff;
}

.app-showcase-content p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 28px;
}

.app-features-list {
    list-style: none;
    margin-bottom: 32px;
}

.app-features-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: 500;
}

.app-features-list li svg {
    width: 18px;
    height: 18px;
    color: var(--cyan);
    flex-shrink: 0;
}

.download-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    font-weight: 700;
    font-family: var(--font);
    font-size: 13.5px;
    padding: 10px 20px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.download-btn svg {
    width: 16px;
    height: 16px;
}

.download-btn:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--cyan);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.1);
}

/* Pricing Section */
.pricing-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 90px 4%;
}

.pricing-container {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.pricing-block h3 {
    font-family: var(--font);
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 28px;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}

.pricing-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    align-items: stretch;
}

.pricing-card-landing {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 36px 28px;
    display: flex;
    flex-direction: column;
    position: relative;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: var(--transition);
}

.pricing-card-landing:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.08), 0 5px 15px rgba(0,0,0,0.5);
}

.pricing-card-landing.professional {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(10, 22, 28, 0.85) 0%, rgba(20, 36, 44, 0.85) 100%);
    box-shadow: 0 15px 35px rgba(255, 179, 0, 0.08);
}

.pricing-card-landing.popular {
    border-color: var(--cyan);
}

.badge-featured {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: #03080a;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 99px;
    box-shadow: 0 4px 10px rgba(255, 179, 0, 0.35);
}

.pricing-card-landing.popular .badge-featured {
    background: var(--cyan);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.35);
}

.pricing-card-landing h4 {
    font-family: var(--font);
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #fff;
}

.pricing-card-landing .price {
    font-family: var(--font);
    font-size: 40px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    display: flex;
    align-items: baseline;
}

.pricing-card-landing .price span {
    font-size: 15px;
    color: var(--muted);
    font-weight: 500;
    margin-left: 4px;
}

.credits-amount {
    color: var(--cyan);
    font-weight: 700;
    font-size: 14.5px;
    margin-bottom: 24px;
}

.pricing-card-landing.professional .credits-amount {
    color: var(--gold);
}

.pricing-card-landing .features {
    list-style: none;
    margin-bottom: 32px;
    flex-grow: 1;
}

.pricing-card-landing .features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text);
    margin-bottom: 12px;
}

.pricing-card-landing .features li svg {
    width: 15px;
    height: 15px;
    color: var(--cyan);
    flex-shrink: 0;
}

.pricing-card-landing .features li svg.not-included {
    color: var(--danger);
}

.pricing-card-landing .features li.not-included {
    color: var(--faint);
    text-decoration: line-through;
}

.info-text {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 24px;
    flex-grow: 1;
}

.btn-checkout-landing {
    width: 100%;
    height: 44px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    font-weight: 700;
    font-family: var(--font);
    font-size: 13.5px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-checkout-landing:hover {
    background: var(--cyan);
    border-color: var(--cyan);
    color: var(--bg-darker);
    box-shadow: 0 4px 15px var(--cyan-glow);
}

.professional .btn-checkout-landing {
    background: linear-gradient(135deg, var(--gold) 0%, #d97706 100%);
    color: #03080a;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 179, 0, 0.25);
}

.professional .btn-checkout-landing:hover {
    background: linear-gradient(135deg, #ffc107 0%, var(--gold) 100%);
    box-shadow: 0 6px 20px rgba(255, 179, 0, 0.4);
}

/* Footer Section */
.landing-footer {
    border-top: 1px solid var(--line);
    background: #03080a;
    padding: 60px 4% 30px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-info {
    max-width: 360px;
}

.footer-info .nav-brand {
    margin-bottom: 16px;
}

.footer-info p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.footer-links-col h4 {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-links-col a {
    display: block;
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
    margin-bottom: 10px;
    transition: var(--transition);
}

.footer-links-col a:hover {
    color: var(--cyan);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 24px;
    display: flex;
    justify-content: center;
}

.footer-bottom p {
    color: var(--faint);
    font-size: 12px;
}

/* Auth Cards Tabs & Backdrop */
.auth-card {
    position: relative;
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 18px;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close-btn:hover {
    color: #fff;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--line);
    margin-bottom: 28px;
}

.auth-tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--muted);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    padding: 10px 0;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.auth-tab-btn.active {
    color: var(--cyan);
}

.auth-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--cyan);
}

.auth-form {
    display: flex;
    flex-direction: column;
}

.auth-form.hidden {
    display: none !important;
}

/* Onboarding Wizard Modal Styles */
.onboarding-modal-content {
    width: min(100%, 540px);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 30px rgba(0,229,255,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.onboarding-step {
    display: none;
    padding: 10px 0;
}

.onboarding-step.active {
    display: block;
    animation: fade-in-up 0.4s ease;
}

.onboarding-graphic {
    display: grid;
    place-items: center;
    margin: 20px 0;
}

.graphic-icon {
    font-size: 48px;
    width: 64px;
    height: 64px;
}

.glow-cyan {
    color: var(--cyan);
    filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.4));
}

.onboarding-text {
    font-size: 14.5px;
    color: var(--text);
    line-height: 1.6;
    text-align: center;
    margin-bottom: 12px;
}

.onboarding-subtext {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
    text-align: center;
}

.onboarding-graphic-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 20px;
    align-items: center;
    margin-bottom: 24px;
}

.onboarding-qr-box {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #09161a;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.onboarding-qr-box span {
    font-size: 9px;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
    text-align: center;
}

.qr-icon {
    width: 100px;
    height: 100px;
    color: var(--cyan);
}

.onboarding-instructions h4 {
    font-family: var(--font);
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.onboarding-instructions p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 14px;
}

.app-links-row {
    display: flex;
    gap: 10px;
}

.app-link-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.app-link-badge:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--cyan);
}

.token-sync-box {
    background: rgba(255, 255, 255, 0.01);
    border: 1px dashed var(--line);
    border-radius: 12px;
    padding: 16px;
}

.token-sync-box p {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.token-copy-row {
    display: flex;
    gap: 12px;
}

.token-copy-row code {
    flex-grow: 1;
    background: #03080a;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--cyan);
    font-family: monospace;
    font-size: 16px;
    font-weight: 700;
    display: grid;
    place-items: center;
    letter-spacing: 0.05em;
}

.onboarding-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--line);
    padding-top: 20px;
    margin-top: 24px;
}

.onboarding-dots {
    display: flex;
    gap: 8px;
}

.onboarding-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: var(--transition);
}

.onboarding-dots .dot.active {
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan-glow);
    transform: scale(1.2);
}

/* Responsiveness adjustments for Landing */
@media (max-width: 900px) {
    .hero-section {
        grid-template-columns: 1fr;
        padding-top: 50px;
        text-align: center;
        gap: 30px;
    }

    .hero-content {
        align-items: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .app-showcase-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .app-showcase-content {
        text-align: center;
    }

    .app-features-list li {
        justify-content: center;
    }

    .download-buttons {
        justify-content: center;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-info {
        max-width: 100%;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

/* --- Workspace Tabs --- */
.workspace-tabs {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    border-bottom: 1px solid var(--line-soft);
    padding-bottom: 0px;
}

.workspace-tab {
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.workspace-tab:hover {
    color: var(--text);
}

.workspace-tab.active {
    color: var(--cyan);
    border-bottom-color: var(--cyan);
}

/* --- Column Customizer --- */
.customizer-container {
    position: relative;
    display: inline-block;
}

.customizer-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 100;
    width: 220px;
    background: var(--panel-solid);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 25px var(--shadow);
    padding: 12px;
    display: none;
    flex-direction: column;
    gap: 8px;
}

.customizer-dropdown.show {
    display: flex;
}

.customizer-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 4px;
}

.customizer-option {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 4px;
    transition: var(--transition);
}

.customizer-option:hover {
    background: var(--panel-2-solid);
}

.customizer-option input[type="checkbox"] {
    accent-color: var(--cyan);
    cursor: pointer;
}

.col-hidden {
    display: none !important;
}

/* --- Activity Logs Timeline --- */
.activity-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.activity-title-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.activity-title-area h2 {
    font-size: 20px;
    font-weight: 700;
}

.activity-timeline {
    position: relative;
    padding-left: 32px;
    border-left: 2px solid var(--line-soft);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.activity-item {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 4px 15px var(--shadow);
    transition: var(--transition);
}

.activity-item:hover {
    border-color: var(--line);
    transform: translateY(-2px);
}

.activity-dot {
    position: absolute;
    left: -42px;
    top: 20px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--panel-solid);
    border: 3px solid var(--muted);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-dot.action-create {
    border-color: var(--success);
    box-shadow: 0 0 8px var(--success-glow);
}

.activity-dot.action-update {
    border-color: var(--cyan);
    box-shadow: 0 0 8px var(--cyan-glow);
}

.activity-dot.action-delete {
    border-color: var(--danger);
    box-shadow: 0 0 8px var(--danger-glow);
}

.activity-dot.action-share {
    border-color: var(--gold);
    box-shadow: 0 0 8px var(--gold-glow);
}

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

.activity-user {
    font-weight: 600;
    color: var(--text);
}

.activity-time {
    font-size: 12px;
    color: var(--faint);
}

.activity-body {
    font-size: 14px;
    line-height: 1.5;
    color: var(--muted);
}

.activity-body strong {
    color: var(--text);
}

.activity-details {
    margin-top: 10px;
    padding: 10px 14px;
    background: var(--panel-2-solid);
    border-left: 3px solid var(--line);
    border-radius: 4px;
    font-size: 13px;
    color: var(--muted);
}

.activity-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

.activity-empty i {
    font-size: 40px;
    margin-bottom: 16px;
    color: var(--faint);
}

/* --- Table Pagination --- */
.table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0 8px 0;
    margin-top: 12px;
    border-top: 1px solid var(--line-soft);
}

.pagination-info {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}

.pagination-buttons {
    display: flex;
    gap: 8px;
}

.btn-page {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    background: var(--panel-solid);
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-page:hover:not(:disabled) {
    border-color: var(--cyan);
    color: var(--cyan);
}

.btn-page:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: var(--muted);
}

/* --- Top Pagination (Toolbar) --- */
.table-pagination-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.pagination-info-top {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}

.btn-page-mini {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--panel-solid);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}

.btn-page-mini:hover:not(:disabled) {
    border-color: var(--cyan);
    color: var(--cyan);
}

.btn-page-mini:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: var(--muted);
}

/* --- Floating Draggable Image Viewer --- */
.floating-viewer {
    position: fixed;
    top: 120px;
    left: calc(50vw - 175px);
    width: 380px;
    height: 450px;
    min-width: 250px;
    min-height: 250px;
    background: var(--panel-solid);
    border: 1px solid var(--line-focus);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: zoom-fade-in 0.25s ease-out;
    resize: both;
}

@keyframes zoom-fade-in {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.floating-viewer-header {
    background: var(--panel-2-solid);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    cursor: move;
    user-select: none;
}

.floating-viewer-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.floating-viewer-body {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-viewer-body img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform-origin: center center;
    cursor: grab;
    transition: transform 0.05s ease-out;
}

.zoom-controls {
    display: flex;
    gap: 12px;
    padding: 8px 16px;
    background: var(--panel-solid);
    border-top: 1px solid var(--line);
    justify-content: center;
}

.zoom-controls button {
    background: transparent;
    border: none;
    color: var(--text);
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.zoom-controls button:hover {
    color: var(--cyan);
    background: var(--panel-2-solid);
}

.zoom-controls button:hover {
    color: var(--cyan);
    background: var(--bg-hover);
}

/* --- Premium Loading Overlay --- */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(6, 17, 21, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.5px;
}

.premium-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(99, 102, 241, 0.1);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

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

/* --- Specs Editor Row --- */
.spec-edit-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}

.edit-form textarea.field-input,
.spec-edit-row textarea {
    flex: 1;
    min-width: 0;
    min-height: 36px;
    height: auto;
    resize: none;
    font-family: inherit;
    font-size: 13px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel-solid);
    color: var(--text);
    transition: var(--transition);
    overflow-y: hidden;
    line-height: 1.4;
}

.edit-form textarea.field-input:focus,
.spec-edit-row textarea:focus {
    border-color: var(--cyan);
    outline: none;
}

.btn-remove-spec {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    color: var(--danger);
    cursor: pointer;
    transition: var(--transition);
}

.btn-remove-spec:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: var(--danger);
}

.btn-subtle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--cyan);
    background: transparent;
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 4px;
}

.btn-subtle:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--cyan);
}

.confirm-modal-content {
    max-width: 420px;
}

.folder-shared-badge-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    padding: 1px 4px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    gap: 3px;
    line-height: 1;
    flex-shrink: 0;
}

.folder-shared-badge-pill svg {
    width: 10px !important;
    height: 10px !important;
    stroke-width: 2.5px;
}

.folder-shared-badge-pill.incoming {
    background: rgba(0, 229, 255, 0.12);
    color: var(--cyan) !important;
    border: 1px solid rgba(0, 229, 255, 0.25);
}

.folder-shared-badge-pill.incoming svg {
    color: var(--cyan) !important;
}

.folder-shared-badge-pill.outgoing {
    background: rgba(255, 179, 0, 0.12);
    color: var(--gold) !important;
    border: 1px solid rgba(255, 179, 0, 0.25);
}

.folder-shared-badge-pill.outgoing svg {
    color: var(--gold) !important;
}


/* ============================================================
   ZONA DE PELIGRO — Eliminación Permanente de Inventario
   ============================================================ */

.danger-zone {
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 20px 24px;
    background: rgba(239, 68, 68, 0.04);
    margin-top: 8px;
}

.danger-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ef4444;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}

.danger-heading svg {
    width: 16px;
    height: 16px;
    color: #ef4444;
}

.danger-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 10px 0 16px;
    line-height: 1.55;
}

.btn-danger-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1.5px solid rgba(239, 68, 68, 0.5);
    background: transparent;
    color: #ef4444;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    font-family: inherit;
}

.btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: #ef4444;
}

.btn-danger-outline svg {
    width: 15px;
    height: 15px;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    font-family: inherit;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
}

.btn-danger:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-danger svg {
    width: 15px;
    height: 15px;
}

/* Delete confirmation modal */
.delete-confirm-content {
    max-width: 500px;
}

.delete-warning-block {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: rgba(239, 68, 68, 0.07);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 20px;
}

.delete-warning-block p {
    margin: 6px 0 0;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.delete-warning-block strong {
    font-size: 0.93rem;
    color: var(--text);
}

.delete-warning-icon {
    width: 28px !important;
    height: 28px !important;
    flex-shrink: 0;
    color: #ef4444;
    margin-top: 2px;
}

.delete-confirm-input-block {
    margin-bottom: 12px;
}

.delete-confirm-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid rgba(239, 68, 68, 0.4);
    background: var(--panel-2-solid);
    color: var(--text);
    border-radius: 8px;
    font-size: 1rem;
    font-family: monospace;
    letter-spacing: 0.05em;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.delete-confirm-input:focus {
    outline: none;
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.delete-confirm-input.valid {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.readonly-field {
    background: rgba(255, 255, 255, 0.02) !important;
    color: var(--muted) !important;
    cursor: not-allowed !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}
.readonly-field:focus {
    outline: none !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    box-shadow: none !important;
}

/* --- Asset Details Panel Form Actions Layout --- */
.detail-panel .form-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
    align-items: stretch;
}

.detail-panel .form-actions .save-button {
    grid-column: span 2;
    width: 100%;
    height: 42px;
    margin: 0;
    box-sizing: border-box;
}

.detail-panel .form-actions .btn-subtle,
.detail-panel .form-actions .btn-danger-outline {
    width: 100%;
    height: 42px;
    margin: 0;
    padding: 0 10px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 13.5px;
    font-family: var(--font);
}

.detail-panel .form-actions .form-note {
    grid-column: span 2;
    text-align: center;
}

/* --- Notification Center Bell & Dropdown --- */
.notification-container {
    position: relative;
    display: inline-block;
}

.notification-bell-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
}

.notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--danger);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    min-width: 15px;
    height: 15px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 6px var(--danger);
    border: 1px solid var(--bg);
}

.notification-dropdown {
    position: absolute;
    top: 48px;
    right: 0;
    z-index: 100;
    width: 360px;
    max-height: 480px;
    background: var(--panel-solid);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.03);
    backdrop-filter: blur(20px);
    padding: 16px;
    display: flex;
    flex-direction: column;
    animation: fade-in-up 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.notification-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line-soft);
}

.notification-dropdown-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
}

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

body.light-theme .notification-dropdown-header h4 {
    color: var(--text);
}

.notification-refresh-btn {
    background: transparent;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition);
}

.notification-close-btn {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.22);
    color: #fecaca;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 7px;
    transition: var(--transition);
}

.notification-close-btn:hover {
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.42);
    color: #fff;
}

.notification-close-btn svg {
    width: 16px;
    height: 16px;
}

.notification-refresh-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

body.light-theme .notification-refresh-btn:hover {
    color: var(--cyan);
    background: rgba(0,0,0,0.04);
}

.notification-list {
    flex: 1;
    overflow-y: auto;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 350px;
    padding-right: 4px;
}

/* Scrollbar styling for notification list */
.notification-list::-webkit-scrollbar {
    width: 4px;
}
.notification-list::-webkit-scrollbar-track {
    background: transparent;
}
.notification-list::-webkit-scrollbar-thumb {
    background: var(--line-soft);
    border-radius: 4px;
}
.notification-list::-webkit-scrollbar-thumb:hover {
    background: var(--line);
}

.notification-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    transition: var(--transition);
    cursor: pointer;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--line-focus);
}

body.light-theme .notification-item {
    background: rgba(0, 0, 0, 0.015);
}
body.light-theme .notification-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.notification-item.unread {
    border-left: 3px solid var(--cyan);
    background: rgba(99, 102, 241, 0.04);
}

body.light-theme .notification-item.unread {
    background: rgba(13, 148, 136, 0.04);
}

.notification-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.notification-item-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
    line-height: 1.3;
}

body.light-theme .notification-item-title {
    color: var(--text);
}

.notification-item-desc {
    font-size: 12.5px;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 6px;
    word-break: break-word;
}

.notification-item-meta {
    font-size: 11px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-item-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
    border-top: 1px dashed var(--line-soft);
    padding-top: 8px;
}

.btn-notification-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--line);
    background: var(--panel-2-solid);
    color: var(--text);
}

.btn-notification-action:hover {
    background: var(--cyan);
    border-color: var(--cyan);
    color: #03080a;
}

.btn-notification-action.corrected {
    border-color: rgba(16, 185, 129, 0.25);
    background: rgba(16, 185, 129, 0.05);
    color: var(--success);
    cursor: default;
    pointer-events: none;
}

.notification-empty {
    text-align: center;
    padding: 30px 10px;
    color: var(--muted);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.notification-empty svg {
    width: 32px;
    height: 32px;
    opacity: 0.5;
}

.notification-bell-btn.has-alerts {
    color: var(--danger) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    background: rgba(239, 68, 68, 0.06) !important;
}

.notification-bell-btn.has-alerts svg {
    color: var(--danger) !important;
    animation: pulse-bell 2s infinite;
}

@keyframes pulse-bell {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 3px var(--danger)); }
    100% { transform: scale(1); }
}

/* Incident Priority Badges */
.priority-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    white-space: nowrap;
}

.priority-badge.leve {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
}

.priority-badge.grave {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.priority-badge.critica {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

/* Alert Notification Asset Thumbnails */
.notification-item-body {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 6px;
}

.alert-asset-thumbnail {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--line-soft);
}

.notification-item-body-content {
    flex: 1;
    min-width: 0;
}

.incident-photo {
    max-height: 80px;
    max-width: 100%;
    object-fit: cover;
    align-self: flex-start;
    border-radius: 6px;
    margin-top: 8px;
    cursor: zoom-in;
    display: block;
    border: 1px solid var(--line-soft);
}

/* ── Actions dropdown menu ─────────────────────────────────── */

.actions-dropdown {
    position: relative;
    display: inline-flex;
}

.actions-dropdown .dropdown-arrow {
    width: 12px;
    height: 12px;
    transition: transform 0.2s ease;
}

.actions-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: var(--panel-solid);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    z-index: 100;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    animation: dropdownFadeIn 0.15s ease;
}

.actions-dropdown-menu.hidden {
    display: none;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 38px;
    padding: 0 14px;
    color: var(--text);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
    width: 100%;
    text-align: left;
}

.dropdown-item svg {
    width: 14px;
    height: 14px;
    color: var(--cyan);
    flex-shrink: 0;
}

.dropdown-item:hover:not(:disabled) {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.2);
    color: #fff;
}

.dropdown-item:disabled {
    cursor: not-allowed;
    opacity: 0.35;
}

body.light-theme .actions-dropdown-menu {
    background: #fff;
    border-color: #d1d5db;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.10), 0 0 0 1px rgba(0, 0, 0, 0.04) inset;
}

body.light-theme .dropdown-item {
    color: #1e293b;
}

body.light-theme .dropdown-item:hover:not(:disabled) {
    background: rgba(99, 102, 241, 0.06);
    border-color: rgba(99, 102, 241, 0.25);
    color: #0f172a;
}

/* --- Premium Settings Modal Styles --- */

.settings-modal-content {
    max-width: 800px;
    width: 100%;
    height: 620px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.settings-modal-form {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 90vh;
    overflow: hidden;
}

.settings-modal-body {
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    overflow: hidden;
    flex: 1;
}

/* --- Layout de Pestañas --- */
.settings-container {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: transparent;
}

.settings-sidebar {
    width: 220px;
    padding: 20px 16px;
    border-right: 1px solid var(--line-soft);
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(2, 14, 17, 0.15);
    flex-shrink: 0;
}

.settings-tab-btn {
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 8px;
    font-family: var(--font);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--muted);
    transition: var(--transition);
}

.settings-tab-btn svg {
    width: 16px;
    height: 16px;
    transition: var(--transition);
}

.settings-tab-btn:hover {
    color: var(--text);
    background: rgba(30, 168, 199, 0.05);
}

.settings-tab-btn.active {
    color: var(--cyan);
    background: rgba(30, 168, 199, 0.08);
    border-color: rgba(30, 168, 199, 0.25);
    box-shadow: 0 4px 12px rgba(30, 168, 199, 0.03);
}

.settings-tab-btn.active svg {
    color: var(--cyan);
}

.settings-content-wrapper {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.settings-tab-panel {
    display: none;
    flex-direction: column;
    gap: 20px;
}

.settings-tab-panel.active {
    display: flex;
}

/* --- Tabla de Facturas --- */
.invoices-table-container {
    overflow-x: auto;
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--line-soft);
    background: rgba(8, 40, 48, 0.2);
}

.invoices-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    text-align: left;
}

.invoices-table th {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(2, 14, 17, 0.3);
}

.invoices-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line-soft);
    color: var(--text);
    vertical-align: middle;
}

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

.invoices-table tbody tr:hover td {
    background: rgba(30, 168, 199, 0.03);
}

.invoices-empty {
    text-align: center;
    padding: 48px 16px !important;
    color: var(--muted);
}

.invoices-empty svg {
    width: 28px;
    height: 28px;
    margin-bottom: 12px;
    color: var(--faint);
}

.invoices-empty p {
    font-size: 14px;
    margin: 0;
}

.btn-download-invoice {
    border: 1px solid rgba(30, 168, 199, 0.2);
    background: rgba(30, 168, 199, 0.05);
    color: var(--cyan);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font);
    font-size: 12.5px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 6px;
    transition: var(--transition);
}

.btn-download-invoice:hover {
    background: rgba(30, 168, 199, 0.15);
    border-color: var(--cyan);
    box-shadow: 0 0 10px rgba(30, 168, 199, 0.2);
}

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

.app-store-info-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--faint);
    border-radius: 6px;
    font-family: var(--font);
    font-size: 12.5px;
    font-weight: 500;
    cursor: help;
    transition: var(--transition);
}

.app-store-info-badge:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text);
}

/* --- Adaptabilidad Móvil --- */
@media (max-width: 680px) {
    .settings-modal-content {
        max-height: 95vh;
    }
    
    .settings-container {
        flex-direction: column;
        min-height: auto;
    }
    
    .settings-sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid var(--line-soft);
        padding: 12px 16px;
        gap: 8px;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    .settings-sidebar::-webkit-scrollbar {
        display: none; /* Ocultar barra scroll en móviles */
    }
    
    .settings-tab-btn {
        padding: 8px 12px;
        font-size: 13px;
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .settings-content-wrapper {
        padding: 16px;
        overflow-y: auto;
    }
}

/* Settings Form Group Card */
.settings-section-card {
    background: rgba(13, 58, 68, 0.3);
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: var(--transition);
}

.settings-section-card:hover {
    border-color: rgba(30, 168, 199, 0.25);
    background: rgba(13, 58, 68, 0.45);
}

.settings-section-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--cyan);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-section-title svg {
    width: 14px;
    height: 14px;
}

.settings-account-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.settings-account-summary > div,
.settings-plan-card {
    background: rgba(8, 40, 48, 0.4);
    border: 1px solid rgba(30, 168, 199, 0.1);
    border-radius: 10px;
    padding: 12px;
}

.settings-summary-label {
    display: block;
    font-size: 10.5px;
    color: var(--muted);
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.settings-account-summary strong,
.settings-plan-card strong {
    display: block;
    color: var(--text);
    font-size: 13.5px;
    line-height: 1.25;
}

.settings-plan-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.settings-plan-card small,
.settings-plan-credits small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 4px;
}

.settings-plan-credits {
    min-width: 112px;
    text-align: right;
}

.settings-plan-credits span {
    display: block;
    color: var(--gold);
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1;
}

.settings-help-text {
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.5;
    margin: 0;
}

.settings-full-width-button {
    width: 100%;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Custom row item styling for Toggle / Trigger options */
.settings-row-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(8, 40, 48, 0.4);
    border: 1px solid rgba(30, 168, 199, 0.1);
    border-radius: 10px;
    transition: var(--transition);
}

.settings-row-item:hover {
    border-color: rgba(30, 168, 199, 0.2);
    background: rgba(8, 40, 48, 0.6);
}

.settings-row-label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-row-label svg {
    width: 16px;
    height: 16px;
    color: var(--muted);
}

/* Stylized Theme Toggle Pill Control */
.theme-selector-pill {
    display: flex;
    background: rgba(5, 31, 38, 0.6);
    border: 1px solid rgba(30, 168, 199, 0.15);
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}

#user-settings-modal .theme-selector-pill button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12.5px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    margin: 0;
}

/* Light active theme tab */
#user-settings-modal .theme-selector-pill button.btn-primary {
    background: var(--cyan);
    color: var(--bg-darker);
    box-shadow: 0 0 10px var(--cyan-glow);
}

/* Light inactive theme tab */
#user-settings-modal .theme-selector-pill button.btn-subtle {
    background: transparent;
    color: var(--muted);
}

#user-settings-modal .theme-selector-pill button.btn-subtle:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

/* Recharge button custom styles */
#menu-buy-credits-button.btn-subtle {
    margin: 0;
    padding: 6px 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--gold);
    border: 1px solid rgba(241, 178, 74, 0.3);
    background: rgba(241, 178, 74, 0.04);
    border-radius: 8px;
    transition: var(--transition);
}

#menu-buy-credits-button.btn-subtle:hover {
    background: rgba(241, 178, 74, 0.12);
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(241, 178, 74, 0.15);
}

/* Settings footer alignment */
.settings-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-top: 1px solid var(--line-soft);
    background: var(--panel-solid);
    flex-shrink: 0;
}

/* Clean Cancel / Save actions */
.settings-actions {
    display: flex;
    gap: 12px;
}

#settings-logout-button.btn-danger-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1.5px solid rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.02);
    color: #ef4444;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    width: auto !important; /* bypass main stylesheet overrides */
}

#settings-logout-button.btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: #ef4444;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.2);
}

/* --- LIGHT THEME ADAPTATION FOR SETTINGS --- */
body.light-theme .settings-section-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .settings-section-card:hover {
    background: rgba(0, 0, 0, 0.035);
    border-color: rgba(99, 102, 241, 0.25);
}

body.light-theme .settings-row-item {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .settings-account-summary > div,
body.light-theme .settings-plan-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .settings-row-item:hover {
    border-color: rgba(99, 102, 241, 0.2);
    background: rgba(0, 0, 0, 0.01);
}

body.light-theme .theme-selector-pill {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme #user-settings-modal .theme-selector-pill button.btn-primary {
    background: var(--cyan);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(30, 168, 199, 0.2);
}

body.light-theme #user-settings-modal .theme-selector-pill button.btn-subtle {
    color: #64748b;
}

body.light-theme #user-settings-modal .theme-selector-pill button.btn-subtle:hover {
    color: #0f172a;
    background: rgba(0, 0, 0, 0.03);
}

body.light-theme #menu-buy-credits-button.btn-subtle {
    background: rgba(241, 178, 74, 0.08);
    border-color: rgba(241, 178, 74, 0.4);
    color: #d97706;
}

body.light-theme #menu-buy-credits-button.btn-subtle:hover {
    background: rgba(241, 178, 74, 0.16);
    border-color: var(--gold);
}

body.light-theme #settings-logout-button.btn-danger-outline {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.02);
}

body.light-theme #settings-logout-button.btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: #ef4444;
}

body.light-theme .settings-footer {
    background: #ffffff;
    border-top-color: rgba(0, 0, 0, 0.08);
}

/* ============================================================
   RESPONSIVE DESIGN SYSTEM OVERRIDES (MOBILE FIRST DRAWERS)
   ============================================================ */

/* Force horizontal layout constraint on html and body for iOS Safari */
html, body {
    max-width: 100% !important;
    overflow-x: hidden !important;
    width: 100% !important;
}

/* --- Responsive Table Wrap --- */
.table-wrap {
    width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}
/* Prevent columns from wrapping too tight in horizontal scrolling */
table th, table td {
    white-space: nowrap;
}
/* Asset Name (column 1) and Brand/Model (column 2) contain descriptive texts. 
   Allow wrapping and set min-width to avoid truncation and make names legible. */
.asset-name, 
table td:nth-child(2) {
    white-space: normal !important;
    min-width: 150px !important;
    word-break: break-word !important;
}
.asset-name strong {
    white-space: normal !important;
    display: block !important;
    word-break: break-word !important;
}

/* --- Back/Close Buttons in Dashboard --- */
.btn-back-to-inventories {
    display: none; /* Hidden by default on desktop */
    background: transparent;
    border: 1px solid var(--line);
    color: var(--cyan);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
    flex-shrink: 0;
}
.btn-back-to-inventories:hover {
    background: rgba(30, 168, 199, 0.1);
    border-color: var(--cyan);
}
.btn-back-to-inventories svg {
    width: 18px;
    height: 18px;
}

.btn-close-detail {
    display: none; /* Hidden on desktop */
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    position: absolute;
    top: 18px;
    right: 18px;
    padding: 0;
    z-index: 10;
}
.btn-close-detail:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}
.btn-close-detail svg {
    width: 18px;
    height: 18px;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE MÓVIL — < 991px
   Estrategia: una pantalla a la vez (sidebar | workspace | detail-panel).
   El scroll vertical ocurre únicamente en .content y .inventory-list.
   dvh = dynamic viewport height, correcto en iOS Safari.
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 991px) {

    /* ── Shell: contenedor raíz ── */
    .shell:not(.hidden) {
        display: block !important;
        border-left: none !important;
        border-right: none !important;
        max-width: 100vw !important;
        width: 100% !important;
        /* Sin overflow en el shell — el scroll ocurre en los hijos */
        overflow: visible !important;
        /* Altura exacta del viewport visible en iOS Safari */
        height: auto !important;
        min-height: 100dvh;
        box-sizing: border-box;
    }

    /* ── Sidebar: visible por defecto, oculta con inventory-selected ── */
    .sidebar {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100vw !important;
        min-height: 100dvh;
        height: 100dvh;
        border-right: none !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    /* La lista de inventarios ocupa el espacio restante y es scrolleable */
    .inventory-list {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        height: auto !important;
        max-height: none !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
    }

    /* ── Workspace: oculta por defecto, visible con inventory-selected ── */
    .workspace {
        display: none !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100vw !important;
        min-width: 0 !important;
        height: 100dvh !important;
        min-height: 0 !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    /* ── El topbar NO scrollea, es sticky en la parte superior ── */
    .topbar {
        flex-shrink: 0 !important;
        padding: 12px 16px !important;
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    /* ── Content: el ÚNICO contenedor scrolleable vertical ── */
    .content {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        height: auto !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        /* Quitar min-height fijo heredado */
        background: transparent !important;
    }

    /* ── Table wrap: permite scroll horizontal de la tabla ── */
    .table-wrap {
        padding: 12px 12px 24px !important;
        box-sizing: border-box !important;
        width: 100% !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
    }

    /* ── Tabla: ancho mínimo para que las columnas no colapsen ── */
    table {
        min-width: 560px !important;
        width: max-content !important;
        max-width: none !important;
    }

    /* ── Detail panel: overlay flotante desde la derecha ── */
    .detail-panel {
        display: none !important;
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: auto !important;
        width: 100% !important;
        height: 100dvh !important;
        z-index: 1000 !important;
        border-left: none !important;
        background: var(--panel-solid) !important;
        backdrop-filter: blur(24px);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.8) !important;
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
        transform: translateX(100%) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box !important;
    }

    /* ── Estados: qué vista es visible ── */
    /* Sin inventario seleccionado: sidebar visible */
    body:not(.inventory-selected) .sidebar { display: flex !important; }
    body:not(.inventory-selected) .workspace { display: none !important; }

    /* Con inventario seleccionado: workspace visible, sidebar oculta */
    body.inventory-selected .sidebar { display: none !important; }
    body.inventory-selected .workspace { display: flex !important; }
    body.inventory-selected .btn-back-to-inventories { display: inline-flex !important; }

    /* Con activo seleccionado: detail-panel visible como overlay */
    body.asset-selected .detail-panel {
        display: flex !important;
        flex-direction: column !important;
        transform: translateX(0) !important;
    }
    body.asset-selected .btn-close-detail { display: inline-flex !important; }

    /* ── Topbar interno: filas que envuelven en móvil ── */
    .topbar-row-1, .topbar-row-2 {
        flex-wrap: wrap !important;
        gap: 8px !important;
        max-width: 100% !important;
        width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
    .topbar-left {
        flex-shrink: 1 !important;
        min-width: 0 !important;
        gap: 8px !important;
    }
    .topbar-right {
        flex-shrink: 1 !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        min-width: 0 !important;
        justify-content: flex-start !important;
    }
    .credit-chip, .plan-chip {
        flex-grow: 1;
        justify-content: center;
    }

    /* ── Botón volver: ancho auto para que quepa el texto ── */
    .btn-back-to-inventories {
        width: auto !important;
        height: 40px !important;
        padding: 0 12px !important;
        gap: 6px !important;
        font-size: 13px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }
    .btn-back-label {
        display: inline !important;
    }

    /* ── Notificaciones ── */
    .notification-dropdown {
        width: calc(100vw - 32px) !important;
        max-width: 360px !important;
        right: -8px !important;
    }

    /* ── Métricas en 2 columnas ── */
    .metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    /* ── Toolbar filters ── */
    .toolbar-row {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    .asset-search {
        max-width: none !important;
        width: 100% !important;
    }
}

@media (max-width: 500px) {
    /* Fullscreen detail panel on small phones */
    .detail-panel {
        width: 100% !important;
        border-left: none;
    }
    
    /* Filters occupy 100% on phones */
    .toolbar-row-filters select, 
    .toolbar-row-filters .customizer-container, 
    .toolbar-row-filters .customizer-container button {
        width: 100% !important;
        min-width: 0 !important;
    }
    .toolbar-row-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    /* Adjust header layout of landing page */
    .landing-nav {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
        text-align: center;
    }
    .nav-links {
        width: 100%;
        justify-content: center;
        gap: 16px;
        flex-wrap: wrap;
    }
    
    /* Pricing Block wrapping */
    .billing-toggle-container {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Stack bottom pagination vertically to prevent clipping */
    .table-pagination {
        flex-direction: column !important;
        gap: 12px !important;
        align-items: center !important;
        text-align: center !important;
    }

    /* Floating Scroll Arrow for Detail Panel */
    .scroll-indicator-arrow {
        display: flex !important;
        position: sticky;
        bottom: 24px;
        left: 50%;
        transform: translateX(-50%);
        width: 44px;
        height: 44px;
        background: rgba(30, 168, 199, 0.9);
        color: #fff !important;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 12px rgba(30, 168, 199, 0.5);
        z-index: 999;
        pointer-events: none;
        margin: 0 auto -44px;
        animation: bounce-arrow 1.5s infinite;
        transition: opacity 0.35s ease, visibility 0.35s ease;
    }
    
    .scroll-indicator-arrow.hidden {
        opacity: 0;
        visibility: hidden;
    }
    
    .scroll-indicator-arrow svg {
        width: 20px;
        height: 20px;
        color: #fff !important;
    }
}

/* Scroll Indicator Arrow Desktop Hide */
.scroll-indicator-arrow {
    display: none;
}

@keyframes bounce-arrow {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(6px);
    }
}

/* Production hotfix 20260606o: make the asset list visible on iPhone after inventory selection. */
@media (max-width: 991px) {
    body.inventory-selected .workspace {
        height: auto !important;
        min-height: 100dvh !important;
        overflow: visible !important;
    }

    body.inventory-selected .metrics {
        display: none !important;
    }

    body.inventory-selected .topbar {
        padding: 12px 16px !important;
        gap: 10px !important;
    }

    body.inventory-selected .toolbar {
        padding: 12px 16px !important;
        gap: 10px !important;
    }

    body.inventory-selected .content {
        flex: 0 0 auto !important;
        height: auto !important;
        min-height: 320px !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
    }

    body.inventory-selected #asset-table-wrap {
        display: block !important;
        height: auto !important;
        max-height: none !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
    }
}

/* Production hotfix 20260606p: render asset rows as mobile cards instead of a wide table. */
@media (max-width: 991px) {
    body.inventory-selected #asset-table-wrap {
        padding: 12px 16px !important;
        overflow-x: hidden !important;
    }

    body.inventory-selected #asset-table-wrap table {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        border-spacing: 0 !important;
    }

    body.inventory-selected #asset-table-wrap thead {
        display: none !important;
    }

    body.inventory-selected #asset-table {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    body.inventory-selected #asset-table tr {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 10px !important;
        padding: 12px !important;
        border: 1px solid var(--line-soft) !important;
        border-radius: 8px !important;
        background: rgba(13, 27, 33, 0.58) !important;
    }

    body.inventory-selected #asset-table td {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 4px 0 !important;
        border: 0 !important;
        background: transparent !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
    }

    body.inventory-selected #asset-table td.asset-name strong,
    body.inventory-selected #asset-table td.asset-name span {
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
    }

    body.inventory-selected #asset-table td:nth-child(n+4):not(:nth-child(5)):not(:nth-child(6)):not(:nth-child(7)) {
        display: none !important;
    }

    body.inventory-selected #asset-table td:nth-child(2),
    body.inventory-selected #asset-table td:nth-child(3),
    body.inventory-selected #asset-table td:nth-child(5) {
        color: var(--muted);
        font-size: 12.5px;
    }

    body.inventory-selected #asset-table td:nth-child(6) {
        padding-top: 8px !important;
    }
}

/* Production hotfix 20260607a: unified workspace scroll, polished mobile asset cards, mobile notifications panel. */
@media (min-width: 992px) {
    .shell:not(.hidden) {
        height: 100vh !important;
        overflow: hidden !important;
    }

    .workspace {
        height: 100vh !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
    }

    .content {
        flex: 0 0 auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }
}

@media (max-width: 991px) {
    body.inventory-selected .workspace {
        height: auto !important;
        min-height: 100dvh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
    }

    body.inventory-selected .topbar {
        overflow: visible !important;
    }

    body.inventory-selected .content {
        flex: 0 0 auto !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        background: transparent !important;
    }

    body.inventory-selected #asset-table-wrap {
        padding: 12px !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
    }

    body.inventory-selected #asset-table-wrap table,
    body.inventory-selected #asset-table-wrap tbody {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    body.inventory-selected #asset-table-wrap thead {
        display: none !important;
    }

    body.inventory-selected #asset-table tr {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 12px;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 10px !important;
        padding: 12px !important;
        border: 1px solid rgba(30, 168, 199, 0.16) !important;
        border-radius: 8px !important;
        background: rgba(8, 40, 48, 0.72) !important;
        box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
    }

    body.inventory-selected #asset-table tr.selected {
        border-color: rgba(30, 168, 199, 0.55) !important;
        background: rgba(13, 58, 68, 0.82) !important;
    }

    body.inventory-selected #asset-table td {
        display: block !important;
        width: auto !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
    }

    body.inventory-selected #asset-table td::before {
        display: inline-block;
        margin-right: 6px;
        color: var(--faint);
        font-size: 10px;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    body.inventory-selected #asset-table td.asset-name {
        grid-column: 1 / -1;
    }

    body.inventory-selected #asset-table td.asset-name strong {
        display: block !important;
        color: var(--text);
        font-size: 14.5px;
        font-weight: 800;
        line-height: 1.25;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
    }

    body.inventory-selected #asset-table td.asset-name span {
        display: block !important;
        margin-top: 3px;
        color: var(--muted);
        font-size: 12px;
        line-height: 1.3;
        white-space: normal !important;
    }

    body.inventory-selected #asset-table td:nth-child(2)::before { content: "Marca"; }
    body.inventory-selected #asset-table td:nth-child(3)::before { content: "Serie"; }
    body.inventory-selected #asset-table td:nth-child(5)::before { content: "Ubicacion"; }

    body.inventory-selected #asset-table td:nth-child(2),
    body.inventory-selected #asset-table td:nth-child(3),
    body.inventory-selected #asset-table td:nth-child(5) {
        color: var(--muted);
        font-size: 12px;
        line-height: 1.35;
    }

    body.inventory-selected #asset-table td:nth-child(6) {
        grid-column: 1;
        min-height: 28px !important;
    }

    body.inventory-selected #asset-table td:nth-child(7) {
        grid-column: 2;
        align-self: end;
        justify-self: end;
    }

    body.inventory-selected #asset-table td:nth-child(4),
    body.inventory-selected #asset-table td:nth-child(8),
    body.inventory-selected #asset-table td:nth-child(9) {
        display: none !important;
    }

    body.inventory-selected #asset-table .thumb-row {
        justify-content: flex-start;
    }

    body.inventory-selected #asset-table .status-pill {
        white-space: nowrap !important;
    }

    .notification-container {
        position: static !important;
    }

    .notification-dropdown {
        position: fixed !important;
        top: max(12px, env(safe-area-inset-top)) !important;
        right: 12px !important;
        left: 12px !important;
        width: auto !important;
        max-width: none !important;
        max-height: min(680px, calc(100dvh - 24px)) !important;
        z-index: 10050 !important;
        border-radius: 8px !important;
        overflow: hidden !important;
    }

    .notification-list {
        max-height: calc(100dvh - 98px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
}

/* Production hotfix 20260607c: account controls are also available in the responsive inventory list. */
@media (max-width: 991px) {
    body:not(.inventory-selected) .sidebar {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto auto auto minmax(0, 1fr);
        align-items: start;
        height: 100dvh !important;
        min-height: 0 !important;
    }

    body:not(.inventory-selected) .sidebar .brand {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
        padding: 18px 8px 14px 16px;
    }

    body:not(.inventory-selected) .sidebar-account-bar {
        display: grid;
        grid-column: 2;
        grid-row: 1;
        grid-template-columns: minmax(0, auto) auto auto;
        grid-template-rows: auto auto;
        gap: 8px;
        align-items: center;
        justify-items: end;
        padding: 18px 12px 10px 4px;
    }

    body:not(.inventory-selected) .sidebar-tools,
    body:not(.inventory-selected) .folder-toolbar,
    body:not(.inventory-selected) .selection-toolbar,
    body:not(.inventory-selected) .inventory-list {
        grid-column: 1 / -1;
    }

    body:not(.inventory-selected) .sidebar-tools {
        grid-row: 2;
        border-top: 1px solid var(--line-soft);
    }

    body:not(.inventory-selected) .folder-toolbar {
        grid-row: 3;
    }

    body:not(.inventory-selected) .selection-toolbar:not(.hidden) {
        grid-row: 4;
    }

    body:not(.inventory-selected) .inventory-list {
        grid-row: 5;
        min-height: 0 !important;
        height: auto !important;
        padding-bottom: max(28px, calc(env(safe-area-inset-bottom) + 20px)) !important;
        scroll-padding-bottom: max(28px, calc(env(safe-area-inset-bottom) + 20px));
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar-account-chip,
    .sidebar-icon-button {
        min-width: 0;
        height: 36px;
        border: 1px solid var(--line);
        border-radius: 8px;
        color: var(--text);
        background: rgba(255, 255, 255, 0.04);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 0 9px;
        font: inherit;
        font-size: 12px;
        font-weight: 800;
    }

    .sidebar-account-chip svg,
    .sidebar-icon-button svg {
        width: 15px;
        height: 15px;
        color: var(--cyan);
        flex: none;
    }

    .sidebar-credit-chip {
        grid-column: 1 / -1;
        grid-row: 1;
        justify-self: end;
        min-width: 78px;
        color: var(--gold);
        border-color: rgba(241, 178, 74, 0.28);
        background: rgba(241, 178, 74, 0.08);
    }

    .sidebar-plan-chip span,
    .sidebar-session-user {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sidebar-plan-chip {
        grid-column: 1;
        grid-row: 2;
        max-width: 118px;
    }

    .sidebar-notification-container {
        grid-column: 2;
        grid-row: 2;
        position: static !important;
    }

    .sidebar-icon-button {
        width: 36px;
        padding: 0;
        position: relative;
    }

    #sidebar-user-settings-button {
        grid-column: 3;
        grid-row: 2;
        width: 36px;
        max-width: 36px;
    }

    #sidebar-user-settings-button .sidebar-session-user {
        display: none;
    }
}

/* Production hotfix 20260607e: compact one-row account controls in responsive asset list. */
@media (max-width: 991px) {
    body.inventory-selected .topbar-row-1 {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center !important;
        gap: 8px !important;
    }

    body.inventory-selected .topbar-row-1 .topbar-left {
        min-width: 0 !important;
        gap: 8px !important;
    }

    body.inventory-selected .topbar-row-1 .eyebrow {
        display: none !important;
    }

    body.inventory-selected .topbar-row-1 .topbar-right {
        display: grid !important;
        grid-template-columns: auto minmax(0, 90px) auto auto;
        align-items: center !important;
        gap: 7px !important;
        width: auto !important;
        min-width: 0 !important;
        justify-content: end !important;
        flex-wrap: nowrap !important;
    }

    body.inventory-selected .credit-chip,
    body.inventory-selected .plan-chip,
    body.inventory-selected #user-settings-button,
    body.inventory-selected #notification-bell-btn {
        height: 36px !important;
        min-width: 0 !important;
        border-radius: 8px !important;
    }

    body.inventory-selected .credit-chip {
        padding: 0 9px !important;
        gap: 5px !important;
        flex-grow: 0 !important;
    }

    body.inventory-selected .credit-chip .credits-label,
    body.inventory-selected #buy-credits-button {
        display: none !important;
    }

    body.inventory-selected .plan-chip {
        max-width: 90px !important;
        padding: 0 8px !important;
        gap: 5px !important;
        flex-grow: 0 !important;
    }

    body.inventory-selected .plan-chip span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.inventory-selected #notification-bell-btn,
    body.inventory-selected #user-settings-button {
        width: 36px !important;
        padding: 0 !important;
    }

    body.inventory-selected #user-settings-button .session-user {
        display: none !important;
    }
}

/* Production hotfix 20260607g: scroll the full responsive inventory sidebar so the last row is never clipped. */
@media (max-width: 991px) {
    body:not(.inventory-selected) .sidebar {
        height: 100dvh !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: max(36px, calc(env(safe-area-inset-bottom) + 28px)) !important;
        scroll-padding-bottom: max(36px, calc(env(safe-area-inset-bottom) + 28px));
    }

    body:not(.inventory-selected) .inventory-list {
        flex: none !important;
        min-height: 0 !important;
        height: auto !important;
        overflow: visible !important;
        padding-bottom: max(44px, calc(env(safe-area-inset-bottom) + 36px)) !important;
    }
}

/* Specific overrides to fix radio and checkbox inputs distorted by global field styles */
.field input[type="radio"],
.field input[type="checkbox"] {
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    accent-color: #0d3a44 !important;
    cursor: pointer;
}

/* Visual highlights for invalid settings/billing fields */
.field-input-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.3) !important;
}

/* Disabled checkout buttons styling */
.btn-checkout:disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    background-color: var(--line) !important;
    border-color: var(--line) !important;
    color: var(--text-muted) !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Legal notice and contact styling */
.legal-pill-btn.active {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15) 0%, rgba(0, 240, 255, 0.05) 100%) !important;
    border-color: var(--cyan) !important;
    color: var(--cyan) !important;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}
.legal-pill-btn:hover:not(.active) {
    background: var(--panel-2-solid) !important;
    color: var(--text) !important;
}
.legal-content-viewport h4 {
    margin-top: 16px;
    margin-bottom: 8px;
    color: var(--cyan);
    font-size: 14px;
    font-weight: 600;
}
.legal-content-viewport h4:first-child {
    margin-top: 0;
}
.legal-content-viewport p {
    margin-bottom: 12px;
    color: var(--text-muted);
}
.legal-content-viewport p:last-child {
    margin-bottom: 0;
}

