:root{
    --bg:#f3f6fb;--panel:#ffffff;--text:#172033;--muted:#6b7280;--border:#e5e7eb;
    --primary:#155eef;--primary2:#0f172a;--red:#e11d48;--green:#059669;--yellow:#d97706;--orange:#f97316;
    --shadow:0 18px 45px rgba(15,23,42,.08);--radius:18px;
}
*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--text)}
a{text-decoration:none;color:inherit}.app-shell{display:flex;min-height:100vh}.sidebar{width:275px;background:#0f172a;color:white;padding:24px 18px;position:fixed;inset:0 auto 0 0;box-shadow:10px 0 30px rgba(15,23,42,.16);overflow-y:auto}.brand{display:flex;align-items:center;gap:14px;margin-bottom:32px}.brand-mark{width:48px;height:48px;border-radius:14px;background:linear-gradient(135deg,#155eef,#e11d48);display:flex;align-items:center;justify-content:center;font-weight:900}.brand strong{display:block;font-size:17px}.brand span{display:block;color:#cbd5e1;font-size:12px;margin-top:3px}.sidebar nav{display:flex;flex-direction:column;gap:7px}.sidebar nav a{padding:13px 14px;border-radius:14px;color:#cbd5e1;font-weight:700;font-size:14px;transition:.2s}.sidebar nav a:hover,.sidebar nav a.active{background:rgba(255,255,255,.1);color:#fff}.main{margin-left:275px;width:calc(100% - 275px)}.topbar{height:92px;display:flex;align-items:center;justify-content:space-between;padding:20px 30px;background:rgba(255,255,255,.9);border-bottom:1px solid var(--border);position:sticky;top:0;z-index:5;backdrop-filter:blur(10px)}.topbar h1{font-size:22px;margin:0}.topbar p{margin:4px 0 0;color:var(--muted);font-size:13px}.user-card{display:flex;align-items:center;gap:12px;background:#f8fafc;border:1px solid var(--border);border-radius:16px;padding:10px 12px}.user-card strong{font-size:13px;display:block}.user-card span{font-size:12px;color:var(--muted)}.avatar{width:38px;height:38px;border-radius:50%;background:#155eef;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:900}.logout{background:#fff;border:1px solid var(--border);border-radius:12px;padding:8px 10px;font-size:12px;color:#e11d48;font-weight:800}.content{padding:28px 30px}.grid{display:grid;gap:18px}.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}.card{background:var(--panel);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:22px}.card h2,.card h3{margin:0 0 16px}.metric{padding:22px;border-radius:18px;background:linear-gradient(180deg,#fff,#f8fafc);border:1px solid var(--border);box-shadow:var(--shadow)}.metric span{display:block;color:var(--muted);font-weight:800;font-size:13px}.metric strong{display:block;margin-top:8px;font-size:31px;letter-spacing:-1px}.metric small{display:block;margin-top:8px;color:#64748b}.toolbar{display:flex;gap:10px;justify-content:space-between;align-items:center;margin-bottom:18px;flex-wrap:wrap}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:13px;padding:11px 15px;font-weight:900;cursor:pointer;font-size:14px}.btn-primary{background:var(--primary);color:#fff}.btn-dark{background:#0f172a;color:#fff}.btn-outline{background:#fff;color:#111827;border:1px solid var(--border)}.btn-danger{background:#e11d48;color:white}.btn-success{background:#059669;color:white}.btn-sm{padding:8px 10px;border-radius:11px;font-size:12px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.form-group{display:flex;flex-direction:column;gap:7px;margin-bottom:14px}label{font-size:13px;font-weight:900;color:#334155}input,select,textarea{width:100%;border:1px solid var(--border);border-radius:13px;background:#fff;padding:12px 13px;font-size:14px;outline:none}textarea{min-height:120px;resize:vertical}input:focus,select:focus,textarea:focus{border-color:#155eef;box-shadow:0 0 0 4px rgba(21,94,239,.12)}.table-wrap{overflow:auto;border:1px solid var(--border);border-radius:16px;background:#fff}.table{width:100%;border-collapse:collapse;font-size:13px}.table th{background:#f8fafc;text-align:left;color:#475569;padding:13px;border-bottom:1px solid var(--border);white-space:nowrap}.table td{padding:13px;border-bottom:1px solid #eef2f7;vertical-align:middle}.table tr:last-child td{border-bottom:0}.badge{display:inline-flex;align-items:center;justify-content:center;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:900;white-space:nowrap}.badge-warning{background:#fef3c7;color:#92400e}.badge-info{background:#e0f2fe;color:#075985}.badge-primary{background:#dbeafe;color:#1d4ed8}.badge-danger{background:#ffe4e6;color:#be123c}.badge-success{background:#dcfce7;color:#166534}.badge-dark{background:#e5e7eb;color:#111827}.badge-purple{background:#f3e8ff;color:#7e22ce}.badge-muted{background:#f1f5f9;color:#64748b}.badge-orange{background:#ffedd5;color:#c2410c}.alert{padding:13px 15px;border-radius:14px;margin-bottom:16px;border:1px solid}.alert-success{background:#ecfdf5;color:#047857;border-color:#a7f3d0}.alert-danger,.alert-error{background:#fff1f2;color:#be123c;border-color:#fecdd3}.alert-info{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}.alert-warning{background:#fffbeb;color:#92400e;border-color:#fde68a}.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;background:radial-gradient(circle at top left,#dbeafe,transparent 35%),radial-gradient(circle at bottom right,#fee2e2,transparent 34%),#f8fafc}.login-card{width:100%;max-width:440px;background:white;border:1px solid var(--border);border-radius:26px;box-shadow:0 30px 80px rgba(15,23,42,.14);padding:32px}.login-logo{width:64px;height:64px;border-radius:20px;background:linear-gradient(135deg,#155eef,#e11d48);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:900;font-size:22px;margin-bottom:18px}.hint{background:#f8fafc;border:1px dashed #cbd5e1;border-radius:14px;padding:12px;color:#475569;font-size:13px}.timeline{display:flex;flex-direction:column;gap:12px}.timeline-item{display:flex;gap:12px}.timeline-dot{width:12px;height:12px;border-radius:50%;background:#155eef;margin-top:6px}.timeline-body{background:#f8fafc;border:1px solid var(--border);border-radius:14px;padding:12px;flex:1}.timeline-body p{margin:6px 0 0;color:#334155}.comment{background:#fff;border:1px solid var(--border);border-radius:16px;padding:14px;margin-bottom:12px}.comment-head{display:flex;justify-content:space-between;gap:10px;color:#64748b;font-size:12px;margin-bottom:8px}.filters{display:flex;gap:10px;flex-wrap:wrap}.filters > *{min-width:180px}.chart-bars{display:flex;flex-direction:column;gap:12px}.bar-row{display:grid;grid-template-columns:150px 1fr 45px;align-items:center;gap:12px;font-size:13px}.bar-track{height:12px;background:#e5e7eb;border-radius:999px;overflow:hidden}.bar-fill{height:100%;background:linear-gradient(90deg,#155eef,#ef4444);border-radius:999px}.muted{color:#64748b}.section-title{display:flex;justify-content:space-between;align-items:end;gap:16px;margin-bottom:18px}.section-title h2{margin:0;font-size:24px}.section-title p{margin:6px 0 0;color:#64748b}.pill{background:#f8fafc;border:1px solid var(--border);border-radius:999px;padding:8px 12px;color:#475569;font-weight:800;font-size:12px}.kbd{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;background:#f1f5f9;border:1px solid #cbd5e1;border-radius:8px;padding:2px 6px}.full{grid-column:1/-1}.actions{display:flex;gap:8px;flex-wrap:wrap}.print-header{display:none}@media(max-width:980px){.sidebar{position:relative;width:100%;inset:auto}.app-shell{display:block}.main{margin:0;width:100%}.topbar{height:auto;align-items:flex-start;gap:12px;flex-direction:column}.grid-4,.grid-3,.grid-2,.form-grid{grid-template-columns:1fr}.content{padding:20px}.user-card{width:100%;justify-content:space-between}}@media print{.sidebar,.topbar,.toolbar,.btn,.filters{display:none!important}.main{margin:0;width:100%}.content{padding:0}.card{box-shadow:none;border:0}.print-header{display:block;margin-bottom:20px}.table th,.table td{padding:8px}.badge{border:1px solid #ddd}}

/* Personalización logo Domino's */
.login-logo-img {
    width: 86px;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto 26px auto;
}
.login-card h1,
.login-card .muted {
    text-align: center;
}
.brand-logo-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    background: #fff;
    border-radius: 14px;
    padding: 4px;
    flex: 0 0 auto;
}

/* Dashboard de tiempos de tickets */
.ticket-time-row {
    grid-template-columns: 150px 1fr 90px;
}
.ticket-time-row strong {
    text-align: right;
    white-space: nowrap;
}
.check-card{display:flex;gap:10px;align-items:flex-start;border:1px solid #e5e7eb;border-radius:14px;padding:12px;background:#fff;cursor:pointer}
.check-card input{width:auto;margin-top:4px}
.check-card span{display:flex;flex-direction:column;gap:4px}
.check-card small{color:#64748b;font-weight:500;line-height:1.35}

/* Buscador/autocompletado de activo en nuevo ticket */
.asset-combobox {
    position: relative;
    width: 100%;
}
.asset-combobox-input {
    padding-right: 44px;
}
.asset-clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    font-weight: 900;
}
.asset-clear-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}
.asset-combobox-results {
    display: none;
    position: absolute;
    z-index: 50;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(15,23,42,.16);
    padding: 6px;
}
.asset-combobox-results.show {
    display: block;
}
.asset-result-item {
    width: 100%;
    display: block;
    border: 0;
    background: #fff;
    text-align: left;
    padding: 11px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #0f172a;
}
.asset-result-item:hover {
    background: #eff6ff;
    color: #155eef;
}
.asset-result-empty {
    font-weight: 900;
    color: #475569;
    background: #f8fafc;
}
.asset-result-no-data {
    padding: 12px;
    color: #64748b;
    font-size: 13px;
}

/* KPIs administrador */
.kpi-table td { vertical-align: top; }
.kpi-number {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eff6ff;
    color: #155eef;
    font-weight: 900;
}
.kpi-current {
    display: inline-block;
    min-width: 110px;
    border-radius: 14px;
    padding: 8px 10px;
    font-weight: 900;
    line-height: 1.35;
}
.kpi-current small { font-weight: 700; opacity: .85; }
.kpi-current.badge-success { background:#dcfce7; color:#166534; }
.kpi-current.badge-danger { background:#ffe4e6; color:#be123c; }
.kpi-current.badge-warning { background:#fef3c7; color:#92400e; }
.kpi-mini-list { display:flex; flex-direction:column; gap:6px; min-width:220px; }
.kpi-mini-list .badge { margin-right: 6px; }
