/* Header Styles - Inspired by Premium Design */
.header {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 60px;
    padding: 0 16px;
    max-width: 1400px;
    margin: 0 auto;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    /* WCAG 2.5.5: touch target mínimo 44×44 px */
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.4rem;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
    flex-shrink: 0;
}

.company-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: -0.025em;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-icon-btn:hover {
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.05);
}

.header-icon-btn.primary {
    background: rgba(6, 182, 212, 0.1);
    color: #06b6d4;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.header-icon-btn.primary:hover {
    background: rgba(6, 182, 212, 0.2);
    transform: translateY(-1px);
}

.header-sync-center-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}

.header-sync-center-btn:hover,
.header-sync-center-btn:focus-visible {
    background: rgba(255, 255, 255, 0.05);
    outline: none;
    transform: translateY(-1px);
}

.header-sync-center-btn [data-role="sync-badge"] {
    pointer-events: none;
}

.sync-badge-lucide {
    display: block;
    color: currentColor;
    stroke: currentColor;
    flex: 0 0 auto;
}

.sync-center-overlay {
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 10020;
}

.sync-center-modal {
    width: min(620px, 100%);
    background: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    padding: 18px;
}

.sync-center-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.sync-center-header h2 {
    margin: 0;
    color: #f8fafc;
    font-size: 1.05rem;
    letter-spacing: 0;
}

.sync-center-header p {
    margin: 4px 0 0;
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.35;
}

.sync-center-close {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #1e293b;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

.sync-center-close:hover,
.sync-center-close:focus-visible {
    color: #f8fafc;
    border-color: #64748b;
    outline: none;
}

.sync-center-status {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.sync-center-status > div {
    background: #111827;
    border: 1px solid #243044;
    border-radius: 10px;
    padding: 10px;
    min-width: 0;
}

.sync-center-status span {
    display: block;
    color: #64748b;
    font-size: 0.68rem;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 4px;
}

.sync-center-status strong {
    display: block;
    color: #f8fafc;
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sync-center-actions {
    display: grid;
    gap: 10px;
}

.sync-center-actions.primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 10px;
}

.sync-center-action {
    border: 1px solid #334155;
    background: #111827;
    color: #e2e8f0;
    border-radius: 10px;
    padding: 13px;
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 11px;
    align-items: center;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.sync-center-action:hover,
.sync-center-action:focus-visible {
    border-color: #06b6d4;
    background: rgba(6, 182, 212, 0.08);
    box-shadow: inset 0 0 0 1px rgba(6, 182, 212, 0.15);
    outline: none;
}

.sync-center-action.secondary {
    grid-template-columns: 34px 1fr;
    padding: 11px 12px;
}

.sync-center-action-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 182, 212, 0.12);
    color: #06b6d4;
    font-size: 1.15rem;
    font-weight: 800;
}

.sync-center-action.secondary .sync-center-action-icon {
    width: 34px;
    height: 34px;
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.1);
}

.sync-center-action-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.sync-center-action-copy strong {
    color: #f8fafc;
    font-size: 0.88rem;
}

.sync-center-action-copy small {
    color: #94a3b8;
    font-size: 0.74rem;
    line-height: 1.35;
}

/* ⏸️ Switches de pausa de subida/descarga (centro de sincronización) */
.sync-pause-switches {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.sync-pause-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    text-align: left;
    background: #111827;
    border: 1px solid #243044;
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.sync-pause-row:hover {
    border-color: #334155;
}

.sync-pause-row.is-paused {
    background: #2a1a0d;
    border-color: #b45309;
}

.sync-pause-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.sync-pause-copy strong {
    color: #f8fafc;
    font-size: 0.86rem;
    font-weight: 700;
}

.sync-pause-copy small {
    color: #94a3b8;
    font-size: 0.73rem;
    line-height: 1.35;
}

.sync-pause-row.is-paused .sync-pause-copy strong {
    color: #fbbf24;
}

/* Switch — verde (activo) ↔ ámbar (pausado) */
.sync-pause-switch {
    flex-shrink: 0;
    width: 44px;
    height: 24px;
    background: #10b981;
    border-radius: 24px;
    position: relative;
    border: 1.5px solid #10b981;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sync-pause-switch-handle {
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 1.5px;
    left: 22px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sync-pause-row.is-paused .sync-pause-switch {
    background: #f59e0b;
    border-color: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.sync-pause-row.is-paused .sync-pause-switch-handle {
    left: 2px;
}

@media (max-width: 640px) {
    .sync-center-status,
    .sync-center-actions.primary {
        grid-template-columns: 1fr;
    }
}

/* Sync indicator override */
.sync-indicator-btn {
    background: transparent !important;
    border: none !important;
    padding: 8px !important;
    /* WCAG 2.5.5: touch target mínimo 44×44 px */
    min-width: 44px;
    min-height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    box-shadow: none !important;
}

.sync-indicator-btn:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

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

/* Nav tabs if legacy mode is active */
.nav-tabs-container {
    padding: 0 16px 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}
