/* Aparatos — Custom Styles */

* { box-sizing: border-box; }

body {
    background-color: #0f172a;
    color: #f1f5f9;
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #1e293b; }
::-webkit-scrollbar-thumb { background: #475569; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* Cards */
.card { background: #1e293b; border: 1px solid #334155; border-radius: 0.75rem; }
.card-hover { transition: border-color 0.15s, box-shadow 0.15s; }
.card-hover:hover { border-color: #0d9488; box-shadow: 0 0 0 1px rgba(13,148,136,.3); }

/* Inputs */
.inp {
    background: #0f172a;
    border: 1px solid #334155;
    color: #f1f5f9;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    width: 100%;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.inp:focus { outline: none; border-color: #0d9488; box-shadow: 0 0 0 2px rgba(13,148,136,.25); }
.inp::placeholder { color: #475569; }
select.inp option { background: #1e293b; }
textarea.inp { resize: vertical; min-height: 80px; }

/* Botones */
.btn { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.5rem 1rem; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: all 0.15s; border: none; }
.btn-primary { background: #0d9488; color: #fff; }
.btn-primary:hover { background: #0f766e; }
.btn-secondary { background: #1e293b; color: #cbd5e1; border: 1px solid #334155; }
.btn-secondary:hover { background: #334155; color: #f1f5f9; }
.btn-danger { background: rgba(239,68,68,.12); color: #f87171; border: 1px solid rgba(239,68,68,.3); }
.btn-danger:hover { background: #ef4444; color: #fff; }
.btn-sm { padding: 0.3rem 0.65rem; font-size: 0.75rem; }
.btn-icon { padding: 0.4rem; border-radius: 0.375rem; }

/* Tabs */
.tab-btn { padding: 0.65rem 1rem; font-size: 0.875rem; font-weight: 500; border-bottom: 2px solid transparent; color: #64748b; cursor: pointer; transition: color 0.15s, border-color 0.15s; white-space: nowrap; background: none; border-top: none; border-left: none; border-right: none; }
.tab-btn.active { color: #2dd4bf; border-bottom-color: #0d9488; }
.tab-btn:hover:not(.active) { color: #cbd5e1; border-bottom-color: #475569; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Badges estado garantía */
.badge { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.7rem; font-weight: 600; padding: 0.2rem 0.55rem; border-radius: 9999px; }
.badge-ok     { background: rgba(16,185,129,.15); color: #34d399; border: 1px solid rgba(16,185,129,.3); }
.badge-warn   { background: rgba(245,158,11,.15);  color: #fbbf24; border: 1px solid rgba(245,158,11,.3); }
.badge-danger { background: rgba(239,68,68,.15);   color: #f87171; border: 1px solid rgba(239,68,68,.3); }
.badge-muted  { background: rgba(100,116,139,.15); color: #94a3b8; border: 1px solid rgba(100,116,139,.3); }
.badge-info   { background: rgba(99,102,241,.15);  color: #a5b4fc; border: 1px solid rgba(99,102,241,.3); }

/* Card aparato */
.aparato-card { position: relative; }
.aparato-card .cat-icon { font-size: 2.5rem; line-height: 1; }

/* Label de formulario */
.lbl { display: block; font-size: 0.75rem; font-weight: 600; color: #94a3b8; margin-bottom: 0.3rem; text-transform: uppercase; letter-spacing: 0.04em; }

/* Separador */
.sep { border-color: #334155; margin: 1rem 0; }

/* Adjunto item */
.adj-item { display: flex; align-items: center; gap: 0.5rem; background: #0f172a; border: 1px solid #334155; border-radius: 0.5rem; padding: 0.4rem 0.65rem; font-size: 0.8rem; }
.adj-item a { color: #2dd4bf; text-decoration: none; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adj-item a:hover { text-decoration: underline; }

/* Garantía días countdown */
.dias-grande { font-size: 2rem; font-weight: 800; line-height: 1; }
.dias-label  { font-size: 0.7rem; color: #94a3b8; }

/* Edit form expandible */
.edit-form { display: none; }
.edit-form.open { display: block; }

/* Item lista */
.item-row { background: #1e293b; border: 1px solid #334155; border-radius: 0.5rem; padding: 0.75rem 1rem; }
.item-row:hover { border-color: #475569; }
