body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #f9f9f9;
    padding: 20px;
}

header h1 {
    color: #fda400;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f8f9fa;
  margin: 0;
  padding: 0;
  color: #333;
}

.header {
  background-color: #000;
  color: white;
  padding: 20px;
  text-align: center;
}

.container {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.footer {
  background-color: #f1f1f1;
  text-align: center;
  padding: 15px;
  font-size: 14px;
  color: #777;
  margin-top: 50px;
}

.btn-orange {
  background-color: #fda400;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  margin: 10px 5px;
  transition: background-color 0.3s ease;
}

.btn-orange:hover {
  background-color: #e28e00;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  border-radius: 8px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

button {
  width: 100%;
  padding: 12px;
  background-color: #fda400;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
}

button:hover {
  background-color: #e28e00;
}

:root{
  --surface: #fff;
  --surface-2: #f9fafb;
  --border: #e6e6e6;
  --text: #111;
  --muted: #7a7a7a;
  --brand: #fda400;
}

/* Layout */
.page-head { margin: 0 0 12px; }
.container { display: grid; gap: 16px; max-width: 900px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.card-head h2 { margin: 0 0 8px; }

/* Grid responsive */
.form-grid .grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .form-grid .grid { grid-template-columns: repeat(2, 1fr); }
  .field-full { grid-column: 1 / -1; }
}

/* Campos */
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input:not([type]) {
  width: 100%; height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--surface-2);
  color: var(--text);
}
.field input:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Botones */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface-2); cursor: pointer;
  text-decoration: none; color: var(--text);
}
.btn:hover { filter: brightness(1.05); }
.btn.primary {
  background: var(--brand); border-color: var(--brand);
  color: #111; font-weight: 700;
}
.btn-ghost {
  border: 0; background: transparent; height: 40px; padding: 0 8px; cursor: pointer;
}

/* Acciones */
.actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

/* Avatar */
.avatar-row { display: flex; gap: 12px; align-items: center; }
.avatar {
  width: 56px; height: 56px; border-radius: 999px;
  border: 1px solid var(--border); object-fit: cover; background: var(--surface-2);
}
.dropzone {
  margin-top: 8px; border: 1px dashed var(--border);
  border-radius: 10px; padding: 12px; text-align: center; color: var(--muted);
}
.dropzone.hover, .dropzone:focus { border-color: var(--brand); outline: none; }

/* Password */
.password-wrap {
  display: grid; grid-template-columns: 1fr auto; align-items: center; border-radius: 8px;
}
.password-wrap input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.password-wrap .btn-ghost {
  border-left: 1px solid var(--border);
  border-top-right-radius: 8px; border-bottom-right-radius: 8px;
}

/* Helpers */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.muted { color: var(--muted); font-size: 12px; }

/* ==== Tablas ====*/ 
.tbl { width:100%; border-collapse:collapse; background: var(--surface); border-radius:12px; overflow:hidden; }
.tbl thead th { text-align:left; font-weight:600; font-size:13px; color:var(--muted); background:var(--surface-2); border-bottom:1px solid var(--border); padding:10px; }
.tbl tbody td { border-bottom:1px solid var(--border); padding:10px; vertical-align:middle; }
.tbl tbody tr:hover { background:var(--hover); }
.nowrap { white-space:nowrap; }

/* ==== Toolbar / filtros ====*/
.toolbar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:8px 0 12px; }
.toolbar input[type="search"], .toolbar select {
  height:36px; border:1px solid var(--border); border-radius:8px; padding:0 10px; background:var(--surface-2); color:var(--text);
}

/* ==== Badges ====*/
.badge { display:inline-block; padding:2px 8px; border-radius:999px; font-size:12px; border:1px solid var(--border); }
.badge.info { background:#e0f2fe; color:#0c4a6e; border-color:transparent; }
.dark .badge.info { background:#083344; color:#e0f2fe; }
.badge.warning { background:#fef9c3; color:#713f12; border-color:transparent; }
.dark .badge.warning { background:#422006; color:#fde68a; }
.badge.success { background:#dcfce7; color:#065f46; border-color:transparent; }
.dark .badge.success { background:#052e2b; color:#86efac; }
.badge.danger { background:#fee2e2; color:#7f1d1d; border-color:transparent; }
.dark .badge.danger { background:#3f0d0d; color:#fecaca; }
.badge.secondary { background:var(--surface-2); color:var(--text); }

/* ==== Stats (dashboard) ====*/
.stats { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
.stat { border:1px solid var(--border); border-radius:12px; padding:12px; background:var(--surface); }
.stat-kpi { font-weight:800; font-size:22px; }
.stat-label { color:var(--muted); font-size:12px; }

/* ==== Tareas ====*/
.todo { list-style:none; padding:0; margin:0; display:grid; gap:8px; }
.todo li { display:flex; gap:12px; align-items:center; border:1px solid var(--border); border-radius:10px; padding:8px; background:var(--surface); }
.pill { background:var(--surface-2); border:1px solid var(--border); padding:2px 8px; border-radius:999px; font-size:12px; text-transform:capitalize; }
.todo-text { flex:1; }

/* ==== Timeline ====*/
.timeline { list-style:none; margin:0; padding:0; }
.timeline li { display:grid; grid-template-columns:18px 1fr; gap:10px; align-items:start; margin-bottom:10px; }
.timeline .dot { width:10px; height:10px; border-radius:999px; margin-top:5px; background:var(--brand); box-shadow:0 0 0 2px var(--surface); border:2px solid var(--border); }
.timeline .tl-title { font-weight:600; }
.timeline .tl-time { font-size:12px; }

/* ==== Layout helpers ====*/
.grid-2 { display:grid; grid-template-columns:1fr; gap:16px; }
@media (min-width: 900px){ .grid-2 { grid-template-columns: 1fr 1fr; } }
.balance { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.balance-num { font-size:28px; font-weight:800; }

/* Miniatura dentro de la card */
.card .photo {
  display: block;
  width: 100%;
  max-height: 180px;      /* alto controlado */
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface-2);
}
.card .photo img {
  display: block;
  width: 100%;
  height: 180px;          /* fija el alto */
  object-fit: cover;      /* recorta sin deformar */
}

/* icono consolidado */
.link-badge{
  margin-left:auto; font-size:16px; line-height:1;
  filter: drop-shadow(0 0 6px rgba(253,164,0,.5));
  animation: link-pulse 1.6s ease-in-out infinite;
}
@keyframes link-pulse{
  0%,100%{ opacity:.8; transform: scale(1); }
  50%{ opacity:1; transform: scale(1.08); }
}

/* selección múltiple */
.card.is-selected{
  outline: 2px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(245,158,11,.2), var(--shadow-hover);
}

.page-h2{ margin:0 0 12px 0; font-weight:800; }

.card{
  background: var(--surface);
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow: var(--shadow);
}

.form-surface{ padding:18px; }

.form-grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:18px;
}
@media (max-width: 980px){
  .form-grid{ grid-template-columns: 1fr; }
}

.pane{ padding:12px; }
.pane-title{
  margin:0 0 10px 0;
  font-size:14px; font-weight:800; letter-spacing:.2px;
}

.row-2{
  display:grid; gap:12px; grid-template-columns: repeat(2, minmax(0,1fr));
}
@media (max-width: 720px){ .row-2{ grid-template-columns: 1fr; } }

.field{ display:flex; flex-direction:column; gap:6px; }
.label{ font-size:12px; color:var(--muted); }
.input{
  border:1px solid var(--border); background:var(--surface-2); color:var(--text);
  border-radius:10px; padding:10px 12px; outline:none;
}
.input:focus{ border-color: var(--brand); box-shadow: 0 0 0 3px rgba(253,164,0,.15); }
.textarea{ min-height: 96px; resize: vertical; }
.hint{ font-size:12px; color:var(--muted); margin-top:4px; }

.discount{
  display:flex; align-items:center; gap:12px;
  padding:10px; border:1px dashed var(--border); border-radius:12px; margin:8px 0;
}
.checkbox{ display:flex; align-items:center; gap:8px; font-weight:600; }

.actions-bar{
  display:flex; gap:10px; flex-wrap:wrap; margin-top:8px;
}
.btn{
  border:1px solid var(--brand); background:var(--brand); color:#111; font-weight:800;
  padding:12px 16px; border-radius:12px; cursor:pointer;
}
.btn:hover{ filter:brightness(0.98); }
.btn-primary{ color:#fff; }

.summary{ padding:16px; position:sticky; top:78px; align-self:start; }
.kv{ display:grid; grid-template-columns: 1fr auto; row-gap:10px; column-gap:12px; }
.kv .k{ color:var(--muted); font-size:13px; }
.kv .v{ font-weight:800; }
.kv .price{ font-size:18px; }
.kv .total{ font-size:22px; }

.note{ color:var(--muted); font-size:12px; margin-top:10px; }
