@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
    /* MODO OSCURO (PREDETERMINADO) */
    --bg-app: #080c16;
    --bg-card: rgba(15, 23, 42, 0.7);
    --bg-card-hover: rgba(15, 23, 42, 0.85);
    --bg-input: rgba(30, 41, 59, 0.5);
    --bg-sidebar: #0b0f19;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --border-focus: rgba(0, 156, 255, 0.5);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-placeholder: #64748b;
    --accent-blue: #009cff;
    --accent-blue-hover: #0080d0;
    --accent-blue-glow: rgba(0, 156, 255, 0.25);
    --accent-green: #10b981;
    --accent-green-glow: rgba(16, 185, 129, 0.2);
    --accent-red: #ef4444;
    --accent-red-glow: rgba(239, 68, 68, 0.2);
    --accent-orange: #f59e0b;
    --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
    --glass-blur: blur(12px);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* CONFIGS */
    --sidebar-width: 280px;
}

body.light-mode {
    /* MODO CLARO */
    --bg-app: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-input: #ffffff;
    --bg-sidebar: #0f172a; /* Mantiene la barra oscura en modo claro por elegancia corporativa */
    --border-color: rgba(15, 23, 42, 0.08);
    --border-hover: rgba(15, 23, 42, 0.15);
    --border-focus: rgba(24, 139, 246, 0.5);
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-placeholder: #94a3b8;
    --accent-blue: #188bf6;
    --accent-blue-hover: #1070c7;
    --accent-blue-glow: rgba(24, 139, 246, 0.25);
    --accent-green: #10b981;
    --accent-green-glow: rgba(16, 185, 129, 0.15);
    --accent-red: #dc2626;
    --accent-red-glow: rgba(220, 38, 38, 0.15);
    --accent-orange: #d97706;
    --shadow-premium: 0 10px 30px -10px rgba(15, 23, 42, 0.15);
}

.hidden {
    display: none !important;
}

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

body, html {
    width: 100%;
    height: 100%;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-app);
    color: var(--text-main);
    overflow: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* CUSTOM SCROLLBARS */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.3);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.5);
}

/* LOGIN ACCESS GATE OVERLAY */
#login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #0f172a 0%, #030712 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#login-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.login-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-color);
    backdrop-filter: var(--glass-blur);
    padding: 2.5rem;
    border-radius: 24px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    text-align: center;
    position: relative;
}

.login-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--accent-blue), transparent, var(--accent-green));
    border-radius: 25px;
    z-index: -1;
    opacity: 0.2;
    transition: opacity 0.3s;
}

.login-card:hover::before {
    opacity: 0.4;
}

.login-logo {
    font-size: 2.5rem;
    color: var(--accent-blue);
    margin-bottom: 1rem;
    display: inline-block;
    filter: drop-shadow(0 0 10px var(--accent-blue-glow));
}

.login-card h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-card p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

/* APP SHELL LAYOUT */
#app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    position: relative;
    opacity: 1;
    transition: opacity 0.3s ease;
}

#app-container.blur-bg {
    filter: blur(5px);
    pointer-events: none;
}

/* SIDEBAR SYSTEM */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 100;
    transition: var(--transition-smooth);
}

.sidebar-header {
    padding: 1.75rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-brand {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.sidebar-brand span {
    color: var(--accent-blue);
}

.sidebar-logo {
    color: var(--accent-blue);
    font-size: 1.5rem;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    list-style: none;
}

.menu-item {
    margin-bottom: 0.5rem;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.menu-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    transition: var(--transition-smooth);
}

.menu-link:hover {
    background-color: rgba(255, 255, 255, 0.03);
    color: #ffffff;
}

.menu-item.active .menu-link {
    background-color: rgba(0, 156, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(0, 156, 255, 0.15);
}

.menu-item.active .menu-link i {
    color: var(--accent-blue);
    filter: drop-shadow(0 0 5px var(--accent-blue-glow));
}

.sidebar-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

body.light-mode .sidebar-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* UTILITY TOGGLES */
.lang-toggle-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

body.light-mode .sidebar-footer .lang-toggle-container {
    border-color: rgba(255, 255, 255, 0.1);
}

.lang-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

body.light-mode .sidebar-footer .lang-label {
    color: rgba(255, 255, 255, 0.4);
}

.lang-label.active {
    color: #ffffff;
}

body.light-mode .sidebar-footer #logout-btn {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

body.light-mode .sidebar-footer #logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .3s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-blue);
}

input:checked + .slider:before {
    transform: translateX(18px);
}

body.light-mode .slider {
    background-color: rgba(15, 23, 42, 0.1) !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.12) !important;
}

body.light-mode .slider:before {
    background-color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

body.light-mode input:checked + .slider {
    background-color: var(--accent-blue) !important;
    box-shadow: none !important;
}

.btn-clear-settle {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: var(--transition-smooth);
    outline: none;
}

.btn-clear-settle:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--accent-red) !important;
    transform: translateY(-1px);
}

.btn-clear-settle:active {
    transform: translateY(0);
}

body.light-mode .btn-clear-settle {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.08);
}

body.light-mode .btn-clear-settle:hover {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.25);
    color: var(--accent-red) !important;
}

/* MAIN CONTENT AREA */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.top-bar {
    height: 70px;
    border-bottom: 1px solid var(--border-color);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(8, 12, 22, 0.5);
    backdrop-filter: var(--glass-blur);
    z-index: 90;
}

body.light-mode .top-bar {
    background-color: rgba(255, 255, 255, 0.5);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
}

/* WORKSPACE CONTAINERS */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-pane.active {
    display: block;
}

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

/* GENERAL SHAPES AND CARDS */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card-grid-asymmetric {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.premium-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow-premium);
    backdrop-filter: var(--glass-blur);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: visible;
}

.premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    transition: var(--transition-smooth);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.premium-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.3);
}

.premium-card.blue-accent::before {
    background: linear-gradient(to right, var(--accent-blue), transparent);
}
.premium-card.green-accent::before {
    background: linear-gradient(to right, var(--accent-green), transparent);
}
.premium-card.red-accent::before {
    background: linear-gradient(to right, var(--accent-red), transparent);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.card-title i {
    color: var(--accent-blue);
}

/* FORMS AND INPUTS */
.form-group {
    margin-bottom: 1.25rem;
    position: relative; /* Para autocompletado */
}

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

.form-group-full {
    grid-column: span 2;
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

/* Margin bottom utility classes */
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-5 { margin-bottom: 1.5rem !important; }

/* Form section headers padding & margin */
.form-group h4.form-label {
    margin-top: 0.75rem !important;
    margin-bottom: 0.75rem !important;
}

.input-style {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-input);
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-smooth);
    color-scheme: dark;
}

.input-style option {
    background-color: #1e293b;
    color: var(--text-main);
}

body.light-mode .input-style {
    color-scheme: light;
}

body.light-mode .input-style option {
    background-color: #ffffff;
    color: var(--text-main);
}

.input-style:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px var(--accent-blue-glow);
}

.input-style::placeholder {
    color: var(--text-placeholder);
}

input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
    -webkit-appearance: none; 
    margin: 0; 
}
input[type=number] {
    -moz-appearance: textfield;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    border: none;
    outline: none;
    transition: var(--transition-smooth);
    width: 100%;
}

.btn-primary {
    background-color: var(--accent-blue);
    color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--accent-blue-hover);
    box-shadow: 0 0 12px var(--accent-blue-glow);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
}

.btn-danger {
    background-color: var(--accent-red);
    color: #ffffff;
}

.btn-danger:hover:not(:disabled) {
    background-color: #d32f2f;
    box-shadow: 0 0 12px var(--accent-red-glow);
}

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

/* CALCULATOR SPECIFIC OUTPUTS */
.result-box-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1rem;
}

.result-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: var(--transition-smooth);
}

.result-box-title {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: ui-monospace, monospace;
}

.result-box.payout-success {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.25);
    color: var(--accent-green);
}

.result-box.payout-danger {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.25);
    color: var(--accent-red);
}

/* ALERTS */
.alert-banner {
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    border-left: 4px solid transparent;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.05);
    border-color: var(--accent-orange);
    color: #fca5a5;
    border-left-color: var(--accent-orange);
}

.alert-warning i {
    color: var(--accent-orange);
    font-size: 1rem;
    margin-top: 2px;
}

.alert-banner.hidden {
    display: none;
}

/* SWITCH LABELED LINE */
.labeled-switch {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
}

.labeled-switch-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-main);
}

/* DUAL PANEL DESIGN (INVOICE & WEEKLY) */
.dual-panel-container {
    display: flex;
    gap: 2rem;
    height: calc(100vh - 130px);
    overflow: hidden;
}

.editor-sidebar {
    width: 380px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: var(--shadow-premium);
    overflow: hidden;
}

.editor-header {
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editor-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.editor-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.editor-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.preview-workspace {
    flex: 1;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    padding: 2.5rem;
}

body.light-mode .preview-workspace {
    background: rgba(100, 116, 139, 0.1);
}

/* HIGH FIDELITY PAPER SHEET (PRINTABLE) */
.paper-sheet {
    width: 816px;
    min-width: 816px;
    min-height: 1056px;
    background-color: #ffffff !important;
    color: #0f172a !important;
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    position: relative;
    font-size: 14px;
    line-height: 1.5;
    font-family: 'Inter', sans-serif;
    transform-origin: top center;
}

/* STYLES FOR THE INVOICE INSIDE PAPER */
.paper-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.paper-header h1 {
    font-size: 1.85rem;
    font-weight: 900;
    color: #0f172a !important;
    text-transform: uppercase;
    line-height: 1.1;
}

.paper-header h2 {
    font-size: 2.5rem;
    font-weight: 900;
    color: #1e3a8a !important;
    text-transform: uppercase;
}

.paper-divider {
    border: 0;
    height: 3px;
    background-color: #1e3a8a;
    margin: 1.5rem 0;
}

.paper-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.paper-info-title {
    font-weight: 800;
    color: #1e3a8a;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.paper-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.paper-table th {
    background-color: #1e3a8a !important;
    color: #ffffff !important;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    text-align: left;
}

.paper-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
}

.paper-totals-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
}

.paper-totals-box {
    width: 280px;
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    padding: 1rem;
    border-radius: 6px;
}

.paper-total-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.paper-total-line.final {
    margin-bottom: 0;
    padding-top: 0.5rem;
    border-top: 2px solid #1e3a8a;
    font-weight: 950;
    color: #1e3a8a;
    font-size: 1.05rem;
}

.paper-instructions {
    margin-top: auto;
    font-size: 0.8rem;
    color: #475569;
}

.paper-footer {
    text-align: center;
    padding-top: 2rem;
    font-size: 0.75rem;
    color: #94a3b8;
    border-top: 1px solid #e2e8f0;
    margin-top: 2rem;
}

/* PROFILE SELECTOR LIST IN CARRIER TOOL */
.profile-card-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.profile-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.profile-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
}

.profile-card.active {
    background: rgba(0, 156, 255, 0.06);
    border-color: var(--accent-blue);
}

.profile-details h4 {
    font-size: 0.9rem;
    color: var(--text-main);
}

.profile-details p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.profile-delete-btn {
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: var(--transition-smooth);
}

.profile-delete-btn:hover {
    color: var(--accent-red);
}

/* DROP DOCUMENT ZONE */
.dropzone-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dropzone-box {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.01);
    transition: var(--transition-smooth);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dropzone-box:hover {
    border-color: var(--accent-blue);
    background: rgba(0, 156, 255, 0.02);
}

.dropzone-box.has-file {
    border-color: var(--accent-green);
    background: rgba(16, 185, 129, 0.02);
}

.dropzone-icon {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.dropzone-box.has-file .dropzone-icon {
    color: var(--accent-green);
}

.dropzone-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.dropzone-desc {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.dropzone-filename {
    font-size: 0.7rem;
    color: var(--accent-green);
    font-weight: 600;
    margin-top: 0.4rem;
    white-space: normal; /* Permite saltos de línea para nombres largos */
    word-break: break-all; /* Rompe palabras muy largas para evitar deformaciones */
    word-wrap: break-word; /* Envuelve palabras largas */
    text-align: center;
    max-width: 100%;
}

.file-input {
    display: none;
}

/* EMAIL COMPILER PANEL */
.email-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    margin-top: 1rem;
}

.email-meta-line {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.email-meta-line span {
    color: var(--text-main);
    font-weight: 600;
}

.email-body {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    font-family: ui-monospace, monospace;
    font-size: 0.8rem;
    white-space: pre-wrap;
    color: var(--text-main);
    margin: 0.75rem 0;
    max-height: 180px;
    overflow-y: auto;
}

/* FACTORING CHECKER LOOKUPS */
.factoring-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
}

.factoring-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-orange);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-neutral {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

/* BILL TO QUICK TAB BUTTON */
.tab-btn-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.35rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.subtab-btn {
    flex: 1;
    padding: 0.5rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: center;
}

.subtab-btn.active {
    background: var(--bg-input);
    color: var(--text-main);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* SETTLEMENT ITEMS LIST */
.settlement-items-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.settlement-item-row {
    display: grid;
    grid-template-columns: 3fr 1fr auto;
    gap: 0.5rem;
    align-items: center;
}

.delete-item-btn {
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.delete-item-btn:hover {
    color: var(--accent-red);
}

/* ADMIN LOG TABLE */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.85rem;
}

.admin-table th {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 600;
}

.admin-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

/* ------------------------------------------
   NUEVO: AUTOCOMPLETADO DE DIRECCIONES DE OPENSTREETMAP
   ------------------------------------------ */
.autocomplete-suggestions {
    position: absolute;
    background-color: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: var(--shadow-premium);
    backdrop-filter: var(--glass-blur);
    margin-top: 4px;
}

.suggestion-item {
    padding: 0.65rem 0.9rem;
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--text-main);
    transition: var(--transition-smooth);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    text-align: left;
}

.suggestion-item:hover {
    background-color: rgba(0, 156, 255, 0.1);
    color: #ffffff;
}

/* RESPONSIVE DESIGN - COLLAPSIBLE ON TABLETS / PHONES */
@media screen and (max-width: 1024px) {
    .dual-panel-container {
        flex-direction: column;
        height: auto;
        overflow: visible;
        gap: 2rem;
    }
    
    .editor-sidebar {
        width: 100%;
        height: auto;
        max-height: 700px;
    }
    
    .preview-workspace {
        width: 100%;
        height: auto;
        padding: 1rem;
        overflow-x: auto;
        overflow-y: hidden;
        display: flex;
        justify-content: center;
        align-items: flex-start;
    }
}

/* NEW MOBILE NATIVE FEATURES (HIDDEN BY DEFAULT ON DESKTOP) */
.header-logo {
    display: none;
}
.bottom-nav {
    display: none;
}
.mobile-preview-fab {
    display: none;
}
.mobile-preview-modal {
    display: none;
}
.mobile-lang-toggle {
    display: none !important;
}
#logout-btn-mob, #support-btn-mob {
    display: none !important;
}
#dropzone-license {
    grid-column: span 2;
}

@media screen and (max-width: 768px) {
    body, html {
        overflow: hidden; /* Evita scroll de toda la ventana */
        height: 100%;
        width: 100%;
    }

    #app-container {
        flex-direction: column;
        height: 100%;
        height: 100dvh;
        overflow: hidden;
    }
    
    .sidebar {
        display: none !important; /* Ocultar sidebar en móviles */
    }
    
    .main-wrapper {
        margin-left: 0 !important;
        width: 100%;
        height: 100%;
        height: 100dvh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    
    /* CABECERA FIJA */
    .top-bar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        z-index: 1100;
        background: rgba(15, 23, 42, 0.9) !important;
        backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--border-color);
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 0.6rem;
    }

    body.light-mode .top-bar {
        background: rgba(255, 255, 255, 0.9) !important;
    }

    .header-logo {
        display: block !important;
        max-height: 22px;
    }

    body.light-mode .header-logo {
        content: url("assets/logo_horizontal_light.png") !important;
    }

    .header-text-title {
        display: none !important; /* Ocultar título largo */
    }

    /* CUERPO DEL CONTENIDO CON SCROLL SEPARADO */
    .content-area {
        position: absolute;
        top: 60px;
        bottom: 65px; /* Altura de la barra inferior */
        left: 0;
        right: 0;
        overflow-y: auto;
        padding: 1.25rem 1.25rem 3rem 1.25rem; /* Margen inferior extra para evitar que el contenido choque con la barra de navegación */
        background: var(--bg-main);
        -webkit-overflow-scrolling: touch;
    }

    /* MENÚ DE NAVEGACIÓN INFERIOR (BOTTOM NAV) */
    .bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 65px;
        background: rgba(15, 23, 42, 0.85);
        backdrop-filter: blur(20px);
        border-top: 1px solid var(--border-color);
        z-index: 1100;
        justify-content: space-around;
        align-items: center;
        padding: 0 0.5rem;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    }

    body.light-mode .bottom-nav {
        background: rgba(255, 255, 255, 0.85);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    }

    .bottom-nav-btn {
        flex: 1;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: transparent;
        border: none;
        outline: none;
        color: var(--text-muted);
        cursor: pointer;
        transition: var(--transition-smooth);
        gap: 0.3rem;
        font-family: inherit;
    }

    .bottom-nav-btn i {
        font-size: 1.2rem;
        transition: var(--transition-smooth);
    }

    .bottom-nav-btn span {
        font-size: 0.65rem;
        font-weight: 600;
        letter-spacing: 0.2px;
    }

    .bottom-nav-btn.active {
        color: var(--accent-blue);
    }

    .bottom-nav-btn.active i {
        transform: translateY(-2px);
        text-shadow: 0 0 10px var(--accent-blue-glow);
    }

    /* BOTÓN FLOTANTE (FAB) PARA PREVISUALIZAR FACTURA EN MÓVIL */
    .mobile-preview-fab {
        display: flex !important;
        position: fixed;
        bottom: 80px;
        right: 20px;
        width: 54px;
        height: 54px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--accent-blue), #0072ff);
        color: #ffffff;
        border: none;
        outline: none;
        justify-content: center;
        align-items: center;
        font-size: 1.3rem;
        box-shadow: 0 6px 16px rgba(0, 156, 255, 0.4);
        z-index: 1200;
        cursor: pointer;
        transition: var(--transition-smooth);
    }

    .mobile-preview-fab:active {
        transform: scale(0.92);
        box-shadow: 0 3px 8px rgba(0, 156, 255, 0.3);
    }

    .mobile-preview-fab.hidden {
        display: none !important;
    }

    /* POPUP/MODAL FULLSCREEN DE PREVISUALIZACIÓN MÓVIL */
    .mobile-preview-modal {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #090d16;
        z-index: 2000;
        flex-direction: column;
        animation: slideUp 0.3s cubic-bezier(0.1, 0.76, 0.55, 0.94) forwards;
    }

    body.light-mode .mobile-preview-modal {
        background: #f1f5f9;
    }

    .mobile-preview-modal.hidden {
        display: none !important;
    }

    @keyframes slideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    .modal-header {
        height: 60px;
        padding: 0 1.25rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid var(--border-color);
        background: rgba(255,255,255,0.01);
    }

    .modal-header h3 {
        font-size: 1rem;
        font-weight: 700;
        color: var(--text-main);
    }

    .modal-close-btn {
        background: rgba(255,255,255,0.05);
        border: 1px solid var(--border-color);
        color: var(--text-main);
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 1.1rem;
        cursor: pointer;
        outline: none;
        transition: var(--transition-smooth);
    }

    .modal-close-btn:active {
        background: rgba(255,255,255,0.1);
    }

    .modal-body {
        flex: 1;
        overflow-y: auto;
        padding: 1rem;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        -webkit-overflow-scrolling: touch;
    }

    .paper-sheet-mobile-container {
        width: 100%;
        display: flex;
        justify-content: center;
        overflow-x: auto;
    }

    .paper-sheet-mobile-container .paper-sheet {
        box-shadow: 0 10px 25px rgba(0,0,0,0.5);
        margin-bottom: 2rem;
    }

    .modal-footer {
        padding: 1rem 1.25rem;
        border-top: 1px solid var(--border-color);
        background: rgba(15, 23, 42, 0.5);
    }

    /* REDISEÑO DE FORMULARIOS Y TABS EN MÓVIL */
    .card-grid, .card-grid-asymmetric {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }

    .result-box-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }

    /* Editor invoice y Settlements en móvil ocupan el ancho total */
    .dual-panel-container {
        flex-direction: column !important;
        height: auto !important;
        overflow: visible !important;
    }

    .editor-sidebar {
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    .editor-scroll-area {
        padding: 0 !important;
        overflow: visible !important;
    }

    .editor-footer {
        display: none !important; /* Ocultar pie redundante en el sidebar del editor */
    }

    .editor-header {
        display: flex !important; /* Mostrar cabecera en móvil */
        background: var(--bg-card) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: 12px;
        padding: 1rem 1.25rem !important;
        margin-bottom: 1.25rem !important;
    }

    .preview-workspace {
        display: none !important; /* Ocultar la previsualización tradicional estática */
    }

    .dropzone-grid {
        grid-template-columns: 1fr !important;
    }
    .top-bar-actions {
        gap: 0.4rem !important;
    }
    .top-bar-actions .icon-btn {
        width: 34px !important;
        height: 34px !important;
        font-size: 0.9rem;
    }
    .mobile-lang-toggle {
        display: flex !important;
        align-items: center;
        gap: 0.2rem !important;
        margin-right: 0.1rem !important;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--border-color);
        padding: 0.15rem 0.35rem !important;
        border-radius: 20px;
    }
    .mobile-lang-toggle .toggle-switch {
        transform: scale(0.7) !important;
        margin: 0 -0.1rem;
    }
    .mobile-lang-toggle .lang-label {
        font-size: 0.65rem;
    }
    #support-btn-mob {
        display: inline-flex !important;
    }
    #logout-btn-mob {
        display: inline-flex !important;
        color: var(--accent-red);
    }
    #dropzone-license {
        grid-column: span 1 !important;
    }
    body.light-mode .mobile-lang-toggle {
        background: rgba(15, 23, 42, 0.05) !important;
        border-color: rgba(15, 23, 42, 0.15) !important;
    }
    body.light-mode .mobile-lang-toggle .lang-label.active {
        color: var(--text-main) !important;
    }
    body.light-mode .mobile-lang-toggle .lang-label:not(.active) {
        color: var(--text-muted) !important;
    }
    body.light-mode .mobile-lang-toggle .slider {
        background-color: rgba(15, 23, 42, 0.1) !important;
    }
    body.light-mode .mobile-lang-toggle input:checked + .slider {
        background-color: var(--accent-blue) !important;
    }
}

/* PRINT MEDIA OVERRIDES FOR CLEAN PDF OUTPUT */
@media print {
    body, html, #app-container, .main-wrapper, .preview-workspace {
        background: #ffffff !important;
        color: #000000 !important;
        overflow: visible !important;
        height: auto !important;
        width: auto !important;
    }
    
    #login-overlay, .sidebar, .top-bar, .editor-sidebar, .btn, .top-bar-actions, .admin-panel, .sidebar-footer {
        display: none !important;
    }
    
    .preview-workspace {
        padding: 0 !important;
        border: none !important;
    }
    
    .paper-sheet {
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        width: 100% !important;
        transform: none !important;
    }
}

/* ==========================================================================
   TOAST PREMIUM STYLES (GLASSMORPHIC & ANIMATED)
   ========================================================================== */
#premium-toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    width: 90%;
    max-width: 420px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 0.9rem 1.25rem;
    box-shadow: var(--shadow-premium);
    z-index: 99999;
    transition: transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.35s ease, bottom 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    pointer-events: none;
}

body.light-mode #premium-toast {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.15);
}

#premium-toast.show {
    bottom: 85px; /* Floats beautifully 20px above mobile bottom nav */
    opacity: 1;
    transform: translateX(-50%) scale(1);
    pointer-events: auto;
}

#premium-toast.hide {
    opacity: 0;
    transform: translateX(-50%) scale(0.92);
}

#premium-toast .toast-content {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

#premium-toast .toast-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

/* SUCCESS (Green Check) */
#premium-toast.success .toast-icon {
    color: var(--accent-green);
    filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.3));
}

/* ERROR (Red Cross) */
#premium-toast.error .toast-icon {
    color: var(--accent-red);
    filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.3));
}

/* WARNING (Orange Exclamation) */
#premium-toast.warning .toast-icon {
    color: var(--accent-orange);
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.3));
}

/* INFO (Blue Information) */
#premium-toast.info .toast-icon {
    color: var(--accent-blue);
    filter: drop-shadow(0 0 6px rgba(0, 156, 255, 0.3));
}

#premium-toast .toast-text {
    flex: 1;
    min-width: 0;
}

#premium-toast .toast-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 0.15rem 0;
    line-height: 1.2;
}

#premium-toast .toast-message {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.35;
    word-break: break-word;
}

/* ==========================================================================
   CUSTOM DIALOG SYSTEM (PREMIUM GLASSMORPHIC MODALS)
   ========================================================================== */
.custom-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(9, 13, 22, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.custom-dialog-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.custom-dialog-box {
    background: rgba(30, 41, 59, 0.75);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    transform: scale(0.9);
    opacity: 0;
}

body.light-mode .custom-dialog-box {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
}

.custom-dialog-overlay.visible .custom-dialog-box {
    transform: scale(1);
    opacity: 1;
}

.custom-dialog-box.animate-out {
    transform: scale(0.92);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.custom-dialog-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    margin-bottom: 1.25rem;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.05);
}

.custom-dialog-icon.alert-icon {
    background: rgba(14, 116, 144, 0.15);
    color: var(--accent-blue);
    border: 1px solid rgba(14, 116, 144, 0.25);
}

.custom-dialog-icon.confirm-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.custom-dialog-icon.prompt-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

body.light-mode .custom-dialog-icon.alert-icon {
    background: rgba(14, 116, 144, 0.08);
}
body.light-mode .custom-dialog-icon.confirm-icon {
    background: rgba(239, 68, 68, 0.08);
}
body.light-mode .custom-dialog-icon.prompt-icon {
    background: rgba(16, 185, 129, 0.08);
}

.custom-dialog-message {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.45;
    margin-bottom: 1.5rem;
}

.custom-dialog-input-wrapper {
    width: 100%;
    margin-bottom: 1.5rem;
}

.custom-dialog-input {
    width: 100%;
    padding: 0.85rem 1.1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-smooth);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.custom-dialog-input:focus {
    border-color: var(--accent-blue);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(0, 156, 255, 0.15);
}

.custom-dialog-buttons {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    justify-content: center;
}

.custom-dialog-btn {
    flex: 1;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.custom-dialog-btn.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), #0072ff);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 156, 255, 0.25);
}

.custom-dialog-btn.btn-primary:active {
    transform: scale(0.96);
}

.custom-dialog-btn.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

body.light-mode .custom-dialog-btn.btn-secondary {
    background: rgba(15, 23, 42, 0.05);
    color: var(--text-main);
}

.custom-dialog-btn.btn-secondary:active {
    background: rgba(255, 255, 255, 0.08);
}

/* PREMIUM CUSTOM SELECT DROPDOWN */
.custom-select-container {
    position: relative;
    width: 100%;
    user-select: none;
}

.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-main);
    transition: var(--transition-smooth);
}

body.light-mode .custom-select-trigger {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(15, 23, 42, 0.15);
}

.custom-select-trigger:hover {
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.05);
}

body.light-mode .custom-select-trigger:hover {
    background: rgba(0, 0, 0, 0.02);
}

.custom-select-trigger.active {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px var(--accent-blue-glow);
}

.custom-select-trigger.active i {
    transform: rotate(180deg);
}

.custom-select-trigger.disabled {
    opacity: 0.55 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
}

.custom-select-options-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #0f172a; /* Sleek rich dark background */
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
    overflow-x: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
    opacity: 1;
    transform: scaleY(1);
    transform-origin: top;
}

body.light-mode .custom-select-options-panel {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.15);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
}

.custom-select-options-panel.hidden {
    display: none;
    pointer-events: none;
}

.custom-select-option {
    padding: 0.6rem 0.75rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s ease, padding-left 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.custom-select-option:hover {
    background: rgba(255, 255, 255, 0.06);
    padding-left: 1rem; /* Micro-interaction: slide to the right slightly on hover */
}

body.light-mode .custom-select-option:hover {
    background: rgba(15, 23, 42, 0.05);
}

.custom-select-option[data-value="Approved"] {
    color: #10b981; /* Emerald Green */
}
.custom-select-option[data-value="Conditional"] {
    color: #f59e0b; /* Amber */
}
.custom-select-option[data-value="Blacklisted"] {
    color: #ef4444; /* Rose Red */
}

.custom-select-option.selected {
    background: rgba(0, 156, 255, 0.12);
}

body.light-mode .custom-select-option.selected {
    background: rgba(0, 156, 255, 0.08);
}

/* FAQ Accordion Styles */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.faq-item:hover {
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.04);
}

.faq-question {
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    color: var(--text-main);
}

.faq-question i {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.faq-answer {
    padding: 0 1.25rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    border-top: 1px solid transparent;
}

.faq-item.active {
    background: rgba(0, 156, 255, 0.02);
    border-color: var(--accent-blue);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: var(--accent-blue);
}

.faq-item.active .faq-answer {
    padding: 0.75rem 1.25rem 1.25rem 1.25rem;
    max-height: 500px;
    border-top: 1px solid var(--border-color);
}

/* SUBTLE SUPPORT LINK IN SIDEBAR FOOTER */
.support-footer-item {
    margin-bottom: 0 !important;
}

.support-footer-link {
    padding: 0.4rem 0.5rem !important;
    font-size: 0.78rem !important;
    color: rgba(148, 163, 184, 0.5) !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    width: auto !important;
    transition: var(--transition-smooth) !important;
    margin: 0 auto;
}

.support-footer-link i {
    font-size: 0.9rem !important;
    color: rgba(148, 163, 184, 0.5) !important;
    width: auto !important;
}

.support-footer-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
    background: transparent !important;
}

.support-footer-link:hover i {
    color: var(--accent-blue) !important;
}

.menu-item.active .support-footer-link {
    color: #ffffff !important;
    background: transparent !important;
    border: 1px solid transparent !important;
}

.menu-item.active .support-footer-link i {
    color: var(--accent-blue) !important;
    filter: drop-shadow(0 0 4px var(--accent-blue-glow)) !important;
}

/* CUSTOM SELECT TRIGGER LARGE SIZE (MATCHES INPUT-STYLE) */
.custom-select-trigger.large-trigger {
    padding: 0.75rem 1rem !important;
    font-size: 0.9rem !important;
    border-radius: 10px !important;
    background-color: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
}

.custom-select-trigger.large-trigger:hover {
    border-color: var(--accent-blue) !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
}

body.light-mode .custom-select-trigger.large-trigger:hover {
    background-color: rgba(0, 0, 0, 0.02) !important;
}

/* HOVER EFFECTS FOR KEY VISIBILITY TOGGLES */
#toggle-support-key-visibility:hover,
#toggle-login-key-visibility:hover {
    color: var(--text-main) !important;
}

/* MINI COPY BUTTON (SETUP PACK SUBJECT) */
.btn-mini-copy {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 6px !important;
    color: var(--text-muted) !important;
    cursor: pointer !important;
    font-size: 0.72rem !important;
    font-weight: 500 !important;
    padding: 0.25rem 0.5rem !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    transition: var(--transition-smooth) !important;
    outline: none !important;
}

.btn-mini-copy:hover {
    background: rgba(0, 156, 255, 0.08) !important;
    border-color: rgba(0, 156, 255, 0.2) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

.btn-mini-copy:active {
    transform: translateY(0) !important;
}

body.light-mode .btn-mini-copy {
    background: rgba(15, 23, 42, 0.04) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    color: var(--text-muted) !important;
}

body.light-mode .btn-mini-copy:hover {
    background: rgba(24, 139, 246, 0.08) !important;
    border-color: rgba(24, 139, 246, 0.25) !important;
    color: var(--accent-blue) !important;
}

#login-request-key-link:hover {
    color: var(--accent-blue-hover) !important;
    text-decoration: underline !important;
}

/* ==========================================================================
   DISPATCHER PROFILE CARD & TAB STYLES
   ========================================================================== */

/* DISPATCHER PROFILE CARD IN SIDEBAR */
.dispatcher-profile-card-container {
    margin: 15px 20px 20px 20px;
    padding: 0 !important;
    list-style: none;
    position: relative;
}

.dispatcher-profile-card {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    padding: 14px 16px !important;
    background: rgba(15, 23, 42, 0.45) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 14px !important;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dispatcher-profile-card:hover {
    background: rgba(15, 23, 42, 0.65) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.dispatcher-profile-card:active {
    transform: translateY(0);
}

/* Dynamic active class behavior managed by router */
.dispatcher-profile-card-container.active .dispatcher-profile-card {
    background: rgba(0, 156, 255, 0.05) !important;
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 15px var(--accent-blue-glow), inset 0 0 8px rgba(0, 156, 255, 0.05);
}

.dispatcher-profile-card-container.active .dispatcher-profile-icon-circle {
    background: rgba(0, 156, 255, 0.2) !important;
    border-color: rgba(0, 156, 255, 0.3) !important;
    color: #ffffff !important;
}

.dispatcher-profile-card-container.active .dispatcher-profile-name {
    color: #ffffff !important;
}

.dispatcher-profile-card-container.active .dispatcher-profile-chevron {
    color: var(--accent-blue) !important;
    transform: translateX(2px);
}

/* Badge (Floating Label) */
.dispatcher-profile-badge {
    position: absolute;
    top: -9px;
    right: 14px;
    background: linear-gradient(135deg, var(--accent-blue), #0ea5e9) !important;
    color: #ffffff !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px !important;
    border-radius: 20px !important;
    box-shadow: 0 2px 6px rgba(0, 156, 255, 0.3);
    z-index: 10;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.dispatcher-profile-card:hover .dispatcher-profile-badge {
    box-shadow: 0 3px 8px rgba(0, 156, 255, 0.5);
    transform: translateY(-1px);
}

/* Icon avatar wrapper */
.dispatcher-profile-icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(0, 156, 255, 0.12) !important;
    border: 1px solid rgba(0, 156, 255, 0.18) !important;
    border-radius: 50% !important;
    color: var(--accent-blue) !important;
    font-size: 1.15rem;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

/* Text elements */
.dispatcher-profile-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow: hidden;
}

.dispatcher-profile-name {
    color: #f3f4f6;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: var(--transition-smooth);
    font-family: 'Outfit', sans-serif;
}

.dispatcher-profile-company {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Chevron arrow */
.dispatcher-profile-chevron {
    color: var(--text-placeholder);
    font-size: 0.8rem;
    transition: var(--transition-smooth);
}

.dispatcher-profile-card:hover .dispatcher-profile-chevron {
    color: var(--text-main);
    transform: translateX(2px);
}

/* Light mode overrides for dispatcher profile card */
body.light-mode .dispatcher-profile-card {
    background: rgba(255, 255, 255, 0.75) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

body.light-mode .dispatcher-profile-card:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(15, 23, 42, 0.15) !important;
}

body.light-mode .dispatcher-profile-card-container.active .dispatcher-profile-card {
    background: rgba(24, 139, 246, 0.04) !important;
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 15px rgba(24, 139, 246, 0.15);
}

body.light-mode .dispatcher-profile-name {
    color: #0f172a;
}

/* COMPACT FORM GRID FOR DISPATCHER PROFILE */
.dispatcher-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem 1rem;
    margin-top: 1rem;
}

.dispatcher-profile-grid .form-group {
    margin-bottom: 0;
}

.dispatcher-profile-grid .form-group.span-2 {
    grid-column: span 2;
}

.dispatcher-profile-grid-3col {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1.2fr;
    gap: 0.75rem;
}

/* Badge number style from user's image */
.badge-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, var(--accent-blue), #0ea5e9);
    color: #ffffff;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 0.6rem;
    vertical-align: middle;
    box-shadow: 0 2px 6px rgba(0, 156, 255, 0.25);
}

/* LOADBOARD PORTALS GRID */
.loadboards-links-grid {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.loadboard-link-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition-smooth);
}

.loadboard-link-item:hover {
    background: rgba(0, 156, 255, 0.05);
    border-color: rgba(0, 156, 255, 0.25);
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(0, 156, 255, 0.05);
}

.loadboard-logo-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #ffffff;
    flex-shrink: 0;
}

/* Custom background branding for loadboard badges */
.loadboard-logo-badge.dat {
    background: linear-gradient(135deg, #0284c7, #0369a1);
}
.loadboard-logo-badge.ts {
    background: linear-gradient(135deg, #10b981, #047857);
}
.loadboard-logo-badge.t123 {
    background: linear-gradient(135deg, #f59e0b, #b45309);
}
.loadboard-logo-badge.ch {
    background: linear-gradient(135deg, #6366f1, #4338ca);
}
.loadboard-logo-badge.cy {
    background: linear-gradient(135deg, #ec4899, #be185d);
}

.loadboard-link-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.loadboard-name {
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
}

.loadboard-url {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.loadboard-link-icon {
    font-size: 0.72rem;
    color: var(--text-placeholder);
    transition: var(--transition-smooth);
}

.loadboard-link-item:hover .loadboard-link-icon {
    color: var(--accent-blue);
    transform: translate(1px, -1px);
}

/* Light mode overrides for loadboard links */
body.light-mode .loadboard-link-item {
    background: rgba(15, 23, 42, 0.02);
    border-color: rgba(15, 23, 42, 0.06);
    color: #0f172a;
}
body.light-mode .loadboard-link-item:hover {
    background: rgba(24, 139, 246, 0.04);
    border-color: rgba(24, 139, 246, 0.2);
}
body.light-mode .loadboard-name {
    color: #0f172a;
}
body.light-mode .loadboard-url {
    color: #64748b;
}

/* GRID LAYOUTS FOR DISPATCHER PROFILE */
.dispatcher-profile-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1rem;
}

/* RESPONSIVE LAYOUT FOR DISPATCHER PROFILE */
@media screen and (max-width: 768px) {
    .dispatcher-profile-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
    .dispatcher-profile-grid .form-group.span-2 {
        grid-column: span 1 !important;
    }
    .dispatcher-profile-grid-3col {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
    .dispatcher-profile-grid-2col {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
}

/* ==========================================================================
   SETUP PACKS & CARRIER PROFILES PREMIUM REDESIGN
   ========================================================================== */

/* Layout & Containers */
.setup-layout-container {
    display: flex;
    gap: 1.5rem;
    position: relative;
    width: 100%;
    align-items: flex-start;
}

.setup-list-sidebar {
    flex: 1;
    min-width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
}

/* Sliding Drawer Panel */
.setup-details-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 50%;
    min-width: 450px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-left: 1px solid var(--border-color);
    box-shadow: -15px 0 35px rgba(0, 0, 0, 0.6);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.setup-details-drawer.visible {
    transform: translateX(0);
}

.drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(9, 13, 22, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drawer-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Tabs & Switchers */
.drawer-tab-btn {
    border-bottom: 2px solid transparent !important;
}

.drawer-tab-btn:hover {
    color: var(--text-main) !important;
    background: rgba(255, 255, 255, 0.02) !important;
}

.drawer-tab-btn.active {
    color: var(--accent-blue) !important;
    border-bottom-color: var(--accent-blue) !important;
    background: rgba(0, 156, 255, 0.05) !important;
}

.drawer-tab-pane {
    display: none;
    animation: drawerPaneFadeIn 0.35s ease;
}

.drawer-tab-pane.active {
    display: block;
}

@keyframes drawerPaneFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Info Cards inside Tab Content */
.info-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: var(--transition-smooth);
}

.info-card:hover {
    border-color: rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.025);
}

/* Loaded Documents Viewer Grid & Card (Pestaña 1) */
.drawer-docs-viewer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (max-width: 576px) {
    .drawer-docs-viewer-grid {
        grid-template-columns: 1fr;
    }
}

.viewer-doc-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.viewer-doc-card:hover {
    background: rgba(0, 156, 255, 0.04);
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}

.viewer-doc-card.empty {
    opacity: 0.55;
    cursor: not-allowed;
}

.viewer-doc-card.empty:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: var(--border-color);
    transform: none;
}

.viewer-doc-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.viewer-doc-icon {
    font-size: 1.15rem;
    color: var(--accent-green);
}

.viewer-doc-card.empty .viewer-doc-icon {
    color: var(--text-placeholder);
}

.viewer-doc-text {
    min-width: 0;
}

.viewer-doc-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.viewer-doc-meta {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.viewer-doc-action {
    font-size: 0.8rem;
    color: var(--accent-blue);
    margin-left: 0.5rem;
}

.viewer-doc-card.empty .viewer-doc-action {
    display: none;
}

/* Autocomplete suggestions wrapper */
.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: var(--shadow-premium);
}

.suggestion-item {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition-smooth);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

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

.suggestion-item:hover {
    background: rgba(0, 156, 255, 0.1);
    color: white;
}

/* Modals custom scrollbar and size */
.modal-large {
    max-width: 600px !important;
}

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

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

.modal-large::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.modal-large::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Enable pointer events toggle during modal animation */
.custom-dialog-overlay {
    pointer-events: none;
}
.custom-dialog-overlay.visible {
    pointer-events: auto;
}

/* PAGINATION STYLES (adapted from ads-promotions-team.html) */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.pagination-buttons {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.pagination-btn {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-smooth);
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.05);
}

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

.pagination-btn.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

/* Light mode support for setup redesign */
body.light-mode .setup-list-sidebar {
    background: white;
}
body.light-mode .setup-details-drawer {
    background: rgba(255, 255, 255, 0.98);
}
body.light-mode .info-card {
    background: rgba(0, 0, 0, 0.01);
}
body.light-mode .viewer-doc-card {
    background: rgba(0, 0, 0, 0.015);
}
body.light-mode .suggestion-item:hover {
    background: rgba(0, 156, 255, 0.05);
}

/* Responsive adjustments for setup */
@media (max-width: 1024px) {
    .setup-layout-container {
        flex-direction: column;
    }
    .setup-list-sidebar {
        width: 100%;
    }
    .setup-details-drawer {
        width: 100vw;
        min-width: 100vw;
        height: 100vh;
        height: 100dvh;
    }
    .drawer-tab-content-container {
        padding-bottom: 6rem !important;
    }
}

.setup-carrier-chevron {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: 0.75rem;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s ease;
}

.profile-card:hover .setup-carrier-chevron {
    color: var(--accent-blue);
    transform: translateX(4px);
}

.profile-card.active .setup-carrier-chevron {
    color: var(--accent-blue);
}




