* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 18px;
    background: #f4f6f9;
    color: #2c3e50;
    min-height: 100vh;
    -webkit-text-size-adjust: 100%;
    overscroll-behavior-y: contain;
}
body {
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}
input, textarea, button, select {
    font-family: inherit;
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
}

.isw-body-login { min-height: 100vh; display: flex; flex-direction: column; }
.isw-bg-login {
    flex: 1;
    background:
        linear-gradient(135deg, rgba(243,156,18,0.85) 0%, rgba(230,126,34,0.92) 100%),
        url('../img/login-bg.jpg') center/cover no-repeat #f39c12;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.isw-login-wrap {
    width: 100%;
    max-width: 460px;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 40px 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}
.isw-logo { text-align: center; font-size: 40px; font-weight: 900; color: #f39c12; letter-spacing: 3px; margin-bottom: 30px; line-height: 1; }
.isw-ios-hint {
    margin-top: 16px;
    padding: 14px;
    background: #fff7e6;
    border-left: 5px solid #f39c12;
    color: #7f5a13;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 600;
}
.isw-ios-hint strong { color: #2c3e50; }

.isw-header {
    background: #f39c12;
    color: #fff;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.isw-header-title { font-size: 22px; font-weight: 900; letter-spacing: 1.5px; }
.isw-header-user { font-size: 13px; opacity: .92; font-weight: 700; }

.isw-nav {
    display: flex;
    background: #2c3e50;
    border-bottom: 4px solid #f39c12;
    position: sticky;
    top: 0;
    z-index: 90;
}
.isw-nav-item {
    flex: 1;
    text-align: center;
    padding: 18px 6px;
    color: #ecf0f1;
    text-decoration: none;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 1.5px;
    border-right: 1px solid rgba(255,255,255,0.08);
}
.isw-nav-item:last-child { border-right: none; }
.isw-nav-item.active { background: #f39c12; color: #fff; }
.isw-nav-item:active { background: #34495e; }

.isw-main { padding: 20px; max-width: 720px; margin: 0 auto; }

.isw-form label {
    display: block;
    font-size: 13px;
    font-weight: 800;
    color: #7f8c8d;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    margin-top: 16px;
}
.isw-form input {
    width: 100%;
    padding: 18px;
    font-size: 22px;
    border: 2px solid #bdc3c7;
    background: #fff;
}
.isw-form input:focus { outline: none; border-color: #f39c12; }

.isw-error {
    background: #fde9e7;
    color: #c0392b;
    padding: 14px;
    margin-top: 16px;
    font-weight: 700;
    border-left: 5px solid #e74c3c;
}
.isw-info {
    background: #fff7e6;
    border-left: 5px solid #f39c12;
    color: #7f5a13;
    padding: 14px;
    margin-bottom: 18px;
    font-weight: 700;
    font-size: 16px;
}

.isw-btn {
    display: block;
    width: 100%;
    padding: 22px;
    margin-top: 14px;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 1.5px;
    border: none;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    color: #fff;
}
.isw-btn-primary { background: #f39c12; color: #fff; }
.isw-btn-primary:active { background: #d68910; }
.isw-btn-secondary { background: #ecf0f1; color: #2c3e50; }
.isw-btn-secondary:active { background: #bdc3c7; }
.isw-btn-success { background: #27ae60; color: #fff; }
.isw-btn-success:active { background: #1e8449; }
.isw-btn-info { background: #3498db; color: #fff; }
.isw-btn-info:active { background: #2874a6; }
.isw-btn-danger { background: #e74c3c; color: #fff; }
.isw-btn-row { display: flex; gap: 10px; margin-top: 14px; }
.isw-btn-row .isw-btn { margin-top: 0; }

.isw-step { display: none; }
.isw-step.active { display: block; }
.isw-step h2 {
    font-size: 24px;
    font-weight: 900;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 4px solid #f39c12;
    letter-spacing: 1px;
}

.isw-input-xl {
    width: 100%;
    padding: 22px;
    font-size: 30px;
    font-weight: 800;
    border: 3px solid #bdc3c7;
    background: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.isw-input-xl:focus { outline: none; border-color: #f39c12; }
.isw-input-xl[readonly] { background: #ecf0f1; color: #7f8c8d; }
.isw-textarea-xl {
    width: 100%;
    padding: 18px;
    font-size: 20px;
    border: 3px solid #bdc3c7;
    background: #fff;
    font-family: inherit;
    resize: vertical;
    min-height: 200px;
    text-transform: none;
}
.isw-textarea-xl:focus { outline: none; border-color: #f39c12; }

.isw-textarea-wrap { position: relative; }
.isw-mic-btn {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: #2c3e50;
    color: #fff;
    border: none;
    padding: 12px 16px;
    font-weight: 900;
    font-size: 13px;
    letter-spacing: 1px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.isw-mic-btn:active { background: #1a252f; }
.isw-mic-btn.recording { background: #e74c3c; animation: iswPulse 1s infinite; }
.isw-mic-btn.unsupported { display: none; }
.isw-mic-icon { font-size: 18px; line-height: 1; }
@keyframes iswPulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(231,76,60,0.5); }
    50% { box-shadow: 0 4px 24px rgba(231,76,60,1); }
}

.isw-label {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: #7f8c8d;
    letter-spacing: 2px;
    margin-top: 18px;
    margin-bottom: 8px;
}

.isw-resumen {
    background: #fff;
    padding: 20px;
    border-left: 6px solid #f39c12;
    margin-bottom: 20px;
    font-size: 17px;
    line-height: 1.6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.isw-resumen .isw-row, .isw-detalle .isw-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #ecf0f1;
    gap: 12px;
}
.isw-resumen .isw-row:last-child, .isw-detalle .isw-row:last-child { border-bottom: none; }
.isw-resumen .isw-key, .isw-detalle .isw-key {
    font-weight: 800;
    color: #7f8c8d;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    flex-shrink: 0;
}
.isw-resumen .isw-val, .isw-detalle .isw-val {
    font-weight: 800;
    color: #2c3e50;
    text-align: right;
    word-break: break-word;
}

.isw-historial {
    background: #fff;
    border-left: 6px solid #3498db;
    padding: 16px 20px 8px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.isw-historial-titulo { font-size: 13px; font-weight: 900; color: #3498db; letter-spacing: 1.5px; margin-bottom: 12px; }
.isw-historial-item { padding: 10px 0; border-bottom: 1px solid #ecf0f1; }
.isw-historial-item:last-child { border-bottom: none; }
.isw-historial-item-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.isw-historial-item-ref { font-size: 14px; font-weight: 900; color: #2c3e50; letter-spacing: 1px; }
.isw-historial-item-fecha { font-size: 12px; color: #7f8c8d; font-weight: 700; }
.isw-historial-item-desc { font-size: 14px; color: #34495e; line-height: 1.4; max-height: 38px; overflow: hidden; }
.isw-historial-item-km { font-size: 12px; color: #7f8c8d; font-weight: 700; margin-top: 4px; }
.isw-historial-empty { color: #95a5a6; font-size: 13px; font-style: italic; text-align: center; padding: 6px; }

.isw-ok-icon { font-size: 100px; color: #27ae60; text-align: center; margin: 20px 0; line-height: 1; font-weight: 900; }
.isw-ref-big { font-size: 34px; font-weight: 900; color: #f39c12; text-align: center; margin-bottom: 24px; letter-spacing: 2px; }

.isw-post-actions { display: flex; flex-direction: column; gap: 0; }

.isw-search-wrap {
    background: #fff;
    padding: 14px 16px;
    border-bottom: 1px solid #e0e6ed;
    position: sticky;
    top: 60px;
    z-index: 80;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.isw-search-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 18px;
    font-weight: 700;
    border: 2px solid #bdc3c7;
    background: #f4f6f9;
}
.isw-search-input:focus { outline: none; border-color: #f39c12; background: #fff; }
.isw-chips { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.isw-chip {
    background: #ecf0f1;
    color: #7f8c8d;
    border: 2px solid transparent;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 1px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}
.isw-chip.active { background: #f39c12; color: #fff; }
.isw-chip:active { transform: scale(0.95); }

.isw-ptr {
    text-align: center;
    color: #f39c12;
    font-weight: 900;
    font-size: 13px;
    letter-spacing: 1.5px;
    height: 0;
    overflow: hidden;
    transition: height 0.2s ease;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.isw-ptr.visible, .isw-ptr.refreshing { height: 60px; }
.isw-ptr.refreshing .isw-ptr-text::after { content: '...'; animation: iswDots 1s infinite; }
@keyframes iswDots {
    0%, 33% { content: '.'; }
    34%, 66% { content: '..'; }
    67%, 100% { content: '...'; }
}

.isw-lista { display: flex; flex-direction: column; gap: 12px; }
.isw-card-ot {
    background: #fff;
    padding: 16px;
    border-left: 6px solid #f39c12;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}
.isw-card-ot:active { background: #fef5e7; }
.isw-card-ot.borrador { border-left-color: #95a5a6; }
.isw-card-ot.validada { border-left-color: #27ae60; }
.isw-card-ot .isw-ot-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.isw-card-ot .isw-ot-ref { font-size: 17px; font-weight: 900; color: #f39c12; letter-spacing: 1px; }
.isw-card-ot .isw-ot-date { font-size: 12px; color: #7f8c8d; font-weight: 600; }
.isw-card-ot .isw-ot-mat { font-size: 22px; font-weight: 900; color: #2c3e50; margin: 4px 0; letter-spacing: 1px; }
.isw-card-ot .isw-ot-cliente { font-size: 15px; color: #34495e; margin-bottom: 6px; font-weight: 700; }
.isw-card-ot .isw-ot-desc { font-size: 14px; color: #7f8c8d; line-height: 1.4; max-height: 42px; overflow: hidden; margin-bottom: 8px; }
.isw-card-ot .isw-ot-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.isw-badge { display: inline-block; padding: 4px 12px; font-size: 11px; font-weight: 900; letter-spacing: 1.5px; }
.isw-badge-borrador { background: #ecf0f1; color: #7f8c8d; }
.isw-badge-validada { background: #27ae60; color: #fff; }

.isw-detalle {
    background: #fff;
    padding: 24px;
    border-left: 6px solid #f39c12;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.isw-detalle h3 {
    font-size: 24px;
    color: #f39c12;
    margin-bottom: 16px;
    letter-spacing: 1.5px;
    font-weight: 900;
}
.isw-detalle-desc {
    background: #f4f6f9;
    padding: 16px;
    font-size: 18px;
    line-height: 1.5;
    white-space: pre-wrap;
    border-left: 4px solid #bdc3c7;
}

.isw-loading { text-align: center; padding: 40px; color: #7f8c8d; font-weight: 800; letter-spacing: 1.5px; }
.isw-empty { text-align: center; padding: 60px 20px; color: #95a5a6; font-weight: 800; letter-spacing: 1.5px; font-size: 16px; }

.isw-toast-host {
    position: fixed;
    bottom: 80px;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
}
.isw-toast {
    pointer-events: auto;
    background: #2c3e50;
    color: #fff;
    padding: 16px 20px;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    border-left: 6px solid #f39c12;
    transform: translateY(120%);
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
}
.isw-toast.show { transform: translateY(0); }
.isw-toast.error { border-left-color: #e74c3c; }
.isw-toast.success { border-left-color: #27ae60; }
.isw-toast.info { border-left-color: #3498db; }

.isw-fase-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 18px;
    background: #ecf0f1;
}
.isw-fase-tab {
    flex: 1;
    background: transparent;
    color: #7f8c8d;
    border: none;
    padding: 16px 8px;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 1.5px;
    cursor: pointer;
    border-bottom: 4px solid transparent;
}
.isw-fase-tab.active {
    background: #fff;
    color: #f39c12;
    border-bottom-color: #f39c12;
}

.isw-camera-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #3498db;
    color: #fff;
    padding: 28px 18px;
    text-align: center;
    font-weight: 900;
    letter-spacing: 1.5px;
    cursor: pointer;
    margin-bottom: 18px;
    border: 3px dashed rgba(255,255,255,0.5);
}
.isw-camera-btn:active { background: #2874a6; }
.isw-camera-icon { font-size: 48px; line-height: 1; }
.isw-camera-label { font-size: 16px; }

.isw-galeria {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 18px;
}
.isw-galeria-item {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #ecf0f1;
    overflow: hidden;
    cursor: pointer;
}
.isw-galeria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.isw-galeria-fase-titulo {
    grid-column: 1 / -1;
    font-size: 12px;
    font-weight: 900;
    color: #7f8c8d;
    letter-spacing: 1.5px;
    margin-top: 10px;
    padding-bottom: 4px;
    border-bottom: 2px solid #ecf0f1;
}
.isw-galeria-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #95a5a6;
    padding: 12px;
    font-size: 13px;
    font-weight: 700;
}

.isw-sig-wrap {
    background: #fff;
    border: 3px solid #2c3e50;
    margin-bottom: 12px;
    position: relative;
    aspect-ratio: 16 / 9;
    width: 100%;
    overflow: hidden;
}
.isw-sig-canvas {
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
    cursor: crosshair;
    background: #fff;
}
.isw-sig-wrap::before {
    content: '✍ Firme aquí';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #bdc3c7;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
    pointer-events: none;
    z-index: 1;
}
.isw-sig-wrap.has-signature::before { display: none; }

.isw-firma-block {
    background: #ecfdf5;
    border-left: 6px solid #27ae60;
    padding: 16px 20px;
    margin-bottom: 12px;
}
.isw-firma-titulo { font-size: 13px; font-weight: 900; color: #27ae60; letter-spacing: 1.5px; margin-bottom: 8px; }
.isw-firma-img { max-width: 100%; height: auto; background: #fff; padding: 8px; border: 1px solid #d5f5e3; }

.isw-gps-status {
    font-size: 12px;
    color: #7f8c8d;
    font-weight: 700;
    text-align: center;
    padding: 8px;
    margin-top: 8px;
    background: #f4f6f9;
}
.isw-gps-status.gps-ok { color: #27ae60; background: #ecfdf5; }
.isw-gps-status.gps-error { color: #c0392b; background: #fde9e7; }

.isw-footer {
    background: #2c3e50;
    color: #95a5a6;
    padding: 22px 18px calc(22px + env(safe-area-inset-bottom)) 18px;
    font-size: 11px;
    line-height: 1.55;
    text-align: center;
    letter-spacing: 0.3px;
    margin-top: 40px;
    border-top: 4px solid #f39c12;
}
.isw-footer-brand {
    color: #ecf0f1;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
    text-transform: uppercase;
}
.isw-footer-brand strong { color: #f39c12; }
.isw-footer-text { max-width: 720px; margin: 0 auto 12px auto; color: #bdc3c7; }
.isw-footer-text a { color: #f39c12; text-decoration: none; font-weight: 800; }
.isw-footer-text a:hover { text-decoration: underline; }
.isw-footer-text strong { color: #ecf0f1; }
.isw-footer-copy {
    font-size: 10px;
    color: #7f8c8d;
    letter-spacing: 1px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 10px;
    text-transform: uppercase;
    font-weight: 700;
}
.isw-body-login .isw-footer { margin-top: 0; }

@media (min-width: 720px) {
    .isw-header-title { font-size: 26px; }
    .isw-input-xl { font-size: 32px; }
    .isw-footer { font-size: 12px; }
    .isw-galeria { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   MENÚ PRINCIPAL
   ============================================================ */
.isw-menu-main { padding-top: 24px; }
.isw-menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}
.isw-menu-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 12px;
    background: #fff;
    border: 2px solid #e0e0e0;
    text-decoration: none;
    color: #2c3e50;
    transition: transform .15s, box-shadow .15s;
    min-height: 118px;
    text-align: center;
}
.isw-menu-card:active { transform: scale(0.96); }
.isw-menu-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.isw-menu-icon {
    font-size: 36px;
    margin-bottom: 4px;
    line-height: 1;
}
.isw-menu-label {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.isw-menu-sub {
    font-size: 11px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.isw-menu-card-orden { border-left: 6px solid #f39c12; }
.isw-menu-card-cita { border-left: 6px solid #3498db; }
.isw-menu-card-list-orden { border-left: 6px solid #e67e22; }
.isw-menu-card-list-cita { border-left: 6px solid #2980b9; }

/* ============================================================
   CITAS - HEADER MODO AZUL
   ============================================================ */
.isw-modo-cita .isw-header,
.isw-header-cita {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}
.isw-modo-cita .isw-nav-item.active {
    background: #3498db;
    color: #fff;
}
.isw-btn-cita {
    background: #3498db;
    color: #fff;
}
.isw-btn-cita:active { background: #2471a3; }
.isw-ok-icon-cita { color: #3498db; }

/* ============================================================
   FORMULARIO CITA
   ============================================================ */
.isw-checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 0;
    cursor: pointer;
    user-select: none;
}
.isw-checkbox-row input[type=checkbox] {
    width: 24px;
    height: 24px;
    margin: 0;
    cursor: pointer;
}
.isw-checkbox-label {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
}
select.isw-input-xl {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%23333' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}
input[type=date].isw-input-xl,
input[type=time].isw-input-xl {
    -webkit-appearance: none;
}

/* ============================================================
   LISTADO CITAS
   ============================================================ */
.isw-cita-item {
    display: block;
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 14px;
    margin-bottom: 10px;
    text-decoration: none;
    color: #2c3e50;
    border-left: 4px solid #3498db;
    position: relative;
}
.isw-cita-item:active { background: #f8f9fa; }
.isw-cita-fecha {
    font-size: 18px;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 6px;
}
.isw-cita-status {
    display: inline-block;
    padding: 3px 10px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-right: 8px;
}
.isw-urgencia {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    padding: 3px 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.isw-cita-cliente {
    font-size: 15px;
    font-weight: 700;
    margin-top: 8px;
    color: #2c3e50;
}
.isw-cita-veh {
    font-size: 13px;
    color: #7f8c8d;
    margin-top: 2px;
}
.isw-cita-desc {
    font-size: 12px;
    color: #34495e;
    margin-top: 6px;
    font-style: italic;
}
.isw-cita-tipo {
    display: inline-block;
    margin-top: 8px;
    color: #fff;
    padding: 3px 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* ============================================================
   DETALLE CITA - SECCIONES Y BOTONES
   ============================================================ */
.isw-detalle-wrap { padding: 0 0 24px; }
.isw-detalle-header {
    background: #2c3e50;
    color: #fff;
    padding: 16px;
    margin-bottom: 14px;
    text-align: center;
}
.isw-detalle-ref {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 6px;
}
.isw-detalle-status {
    display: inline-block;
    padding: 4px 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-right: 6px;
}
.isw-detalle-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 14px;
    margin-bottom: 12px;
}
.isw-detalle-section h3 {
    margin: 0 0 10px;
    font-size: 13px;
    color: #3498db;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 6px;
}
.isw-detalle-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}
.isw-btn-danger {
    background: #e74c3c;
    color: #fff;
}
.isw-btn-danger:active { background: #c0392b; }
.isw-btn-info {
    background: #5dade2;
    color: #fff;
}
.isw-btn-info:active { background: #2874a6; }

/* ============================================================
   MENÚ - FONDO Y BOTÓN SALIR
   ============================================================ */
.isw-body-menu {
    margin: 0;
    min-height: 100vh;
    background: #1a1a2e;
}
.isw-bg-menu {
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(243,156,18,0.92) 0%, rgba(230,126,34,0.85) 50%, rgba(52,152,219,0.92) 100%),
        radial-gradient(ellipse at top right, rgba(255,255,255,0.15) 0%, transparent 60%),
        radial-gradient(ellipse at bottom left, rgba(0,0,0,0.25) 0%, transparent 60%),
        repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 2px, transparent 2px, transparent 12px),
        #1a1a2e;
    display: flex;
    flex-direction: column;
}
.isw-header-menu {
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.isw-body-menu .isw-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 14px 14px 8px 14px;
}
.isw-body-menu .isw-menu-grid { gap: 12px; margin-bottom: 10px; }
.isw-body-menu .isw-menu-card {
    background: rgba(255,255,255,0.97);
    border: none;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    backdrop-filter: blur(4px);
}
.isw-body-menu .isw-menu-card:hover { box-shadow: 0 10px 28px rgba(0,0,0,0.35); }
.isw-body-menu .isw-footer {
    margin-top: 12px;
    padding: 14px 14px calc(14px + env(safe-area-inset-bottom)) 14px;
}

.isw-menu-bottom {
    margin-top: 4px;
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.isw-btn-logout {
    background: #c0392b;
    color: #fff;
    font-weight: 800;
    border: 2px solid rgba(255,255,255,0.2);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.isw-btn-logout:active { background: #922b21; transform: scale(0.98); }
.isw-btn-logout:hover { background: #a93226; color: #fff; }

/* ============================================================
   LOGIN V2 - FONDO Y MARCA DE AGUA
   ============================================================ */
.isw-bg-login-v2 {
    position: relative;
    min-height: 100vh;
    background:
        radial-gradient(ellipse at top right, rgba(255,255,255,0.12) 0%, transparent 55%),
        radial-gradient(ellipse at bottom left, rgba(0,0,0,0.4) 0%, transparent 60%),
        linear-gradient(135deg, #f39c12 0%, #e67e22 35%, #d35400 70%, #2c3e50 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 32px 16px;
    overflow: hidden;
}
.isw-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.08;
    text-align: center;
}
.isw-watermark-circle {
    width: 320px;
    height: 320px;
    border: 14px solid #fff;
    border-radius: 50%;
    margin: 0 auto;
    position: relative;
}
.isw-watermark-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -65%);
    font-size: 110px;
    font-weight: 900;
    color: #fff;
    letter-spacing: 4px;
    line-height: 1;
}
.isw-watermark-tag {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 30%);
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 8px;
}
.isw-bg-login-v2 .isw-login-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 380px;
}
.isw-logo-card {
    background: rgba(255,255,255,0.97);
    border-top: 6px solid #f39c12;
    padding: 20px;
    text-align: center;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.isw-logo-icon {
    font-size: 42px;
    margin-bottom: 6px;
    line-height: 1;
}
.isw-logo-title {
    font-size: 24px;
    font-weight: 900;
    color: #2c3e50;
    letter-spacing: 2px;
}
.isw-logo-sub {
    font-size: 11px;
    color: #7f8c8d;
    letter-spacing: 3px;
    margin-top: 4px;
    text-transform: uppercase;
}
.isw-bg-login-v2 .isw-form {
    background: rgba(255,255,255,0.97);
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.isw-bg-login-v2 .isw-form label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #34495e;
    letter-spacing: 0.5px;
    margin: 12px 0 4px;
}
.isw-bg-login-v2 .isw-form input[type=text],
.isw-bg-login-v2 .isw-form input[type=password] {
    width: 100%;
    padding: 14px;
    border: 2px solid #ddd;
    font-size: 16px;
    font-family: inherit;
    box-sizing: border-box;
    background: #fff;
}
.isw-bg-login-v2 .isw-form input:focus {
    outline: none;
    border-color: #f39c12;
}
.isw-bg-login-v2 .isw-btn { margin-top: 12px; }
.isw-brand-footer {
    text-align: center;
    margin-top: 18px;
    color: rgba(255,255,255,0.85);
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 600;
    z-index: 1;
    position: relative;
}
.isw-bg-login-v2 .isw-error {
    background: #fff3f0;
    border-left: 4px solid #e74c3c;
    color: #c0392b;
    padding: 10px;
    margin-top: 12px;
    font-size: 13px;
}
.isw-bg-login-v2 .isw-ios-hint {
    background: #fef9e7;
    border-left: 4px solid #f39c12;
    color: #7e5109;
    padding: 10px;
    margin-top: 12px;
    font-size: 12px;
}

/* ============================================================
   FILAS DENTRO DE DETALLE-SECTION (Citas)
   ============================================================ */
.isw-detalle-section .isw-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #ecf0f1;
    gap: 12px;
}
.isw-detalle-section .isw-row:last-child { border-bottom: none; }
.isw-detalle-section .isw-key {
    font-weight: 800;
    color: #7f8c8d;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    flex-shrink: 0;
}
.isw-detalle-section .isw-val {
    font-weight: 700;
    color: #2c3e50;
    text-align: right;
    word-break: break-word;
    font-size: 14px;
}
