:root {
  --cream: #f8f4f4;
  --orange: #eca838;
  --ink: #2f3941;
  --teal: #17494d;
  --teal-hover: #000000;
  --border: #87929d;
  --link: #1f73b7;
  --error: #b3261e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "system-ui", "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--cream);
  color: var(--ink);
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 18px;
}

.logo img { width: 28px; height: 28px; }

.logo-text strong { font-weight: 700; }

.header-nav a {
  color: var(--link);
  text-decoration: none;
  font-size: 14px;
  margin-left: 24px;
}

.header-nav a.active {
  color: var(--ink);
  font-weight: 600;
}

main {
  max-width: 1200px;
  margin: 0;
  padding: 20px 32px 80px;
}

.content-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.search {
  width: 260px;
  max-width: 100%;
}

.search input[type="search"] {
  width: 100%;
  max-width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  box-sizing: border-box;
}

.search input[type="search"]:focus {
  outline: none;
  border-color: var(--teal);
}

.form-col {
  max-width: 650px;
}

.crumbs {
  color: var(--link);
  font-size: 14px;
}

h1 {
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 28px;
}

.field {
  margin-bottom: 22px;
}

.field.nested {
  margin-left: 0;
}

label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}

.opt { color: #6b6b6b; font-weight: 400; }

input[type="text"],
input[type="email"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal);
}

textarea { resize: vertical; }

.hint {
  font-size: 13px;
  color: #6b6b6b;
  margin: 6px 0 0;
}

.dropzone {
  border: 1px dashed var(--border);
  border-radius: 4px;
  padding: 22px;
  text-align: center;
  font-size: 14px;
  background: #fff;
  cursor: pointer;
}

.dropzone.dragover {
  border-color: var(--teal);
  background: #f0f4f4;
}

.dropzone .dz-link {
  color: var(--link);
}

.dropzone .dz-muted {
  color: #6b6b6b;
}

.file-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 10px;
  margin-top: 4px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
}

.file-list .file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-list .file-remove {
  flex: none;
  border: none;
  background: none;
  color: #6b6b6b;
  font-size: 16px;
  line-height: 1;
  padding: 12px 14px;
  margin: -8px -4px;
  cursor: pointer;
}

.file-list .file-remove:hover { color: var(--error); }

button#submit-btn {
  background: var(--teal);
  color: #fff;
  border: none;
  padding: 12px 28px;
  font-size: 15px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 8px;
}

button#submit-btn:hover { background: var(--teal-hover); }
button#submit-btn:disabled { opacity: 0.6; cursor: default; }

.error {
  color: var(--error);
  font-size: 14px;
  margin-top: 14px;
}

.conditional[hidden] { display: none; }

#confirmation {
  max-width: 700px;
  margin: 0 auto;
  padding: 60px 32px;
  text-align: center;
}

#confirmation h2 { font-size: 24px; margin-bottom: 12px; }
#confirmation p { color: #444; }

footer,
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 32px;
  color: #6b6b6b;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.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;
}

.lang-select select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.lang-select select:focus {
  outline: none;
  border-color: var(--teal);
}

/* --- Home --- */

.home-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 64px 32px 96px;
}

.hero {
  text-align: center;
  margin-bottom: 56px;
}

.hero h1 {
  font-size: 34px;
  margin: 0 0 28px;
}

.hero-search {
  display: flex;
  align-items: center;
  max-width: 560px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #fff;
  padding: 4px 4px 4px 20px;
}

.hero-search input[type="search"] {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  font-family: inherit;
  padding: 10px 8px;
  background: transparent;
  color: var(--ink);
}

.hero-search button {
  border: none;
  background: var(--teal);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.hero-search button:hover { background: var(--teal-hover); }

.categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.category-card {
  display: block;
  padding: 28px 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.category-card:hover {
  border-color: var(--teal);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.category-icon {
  font-size: 26px;
  margin-bottom: 12px;
}

.category-card h3 {
  font-size: 17px;
  margin: 0 0 8px;
}

.category-card p {
  font-size: 14px;
  color: #6b6b6b;
  margin: 0;
  line-height: 1.4;
}

.contact-banner {
  text-align: center;
  padding: 32px;
  border-top: 1px solid var(--border);
}

.contact-banner p {
  margin: 0 0 16px;
  color: #6b6b6b;
  font-size: 15px;
}

.contact-btn {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  text-decoration: none;
  padding: 11px 26px;
  border-radius: 4px;
  font-size: 15px;
}

.contact-btn:hover { background: var(--teal-hover); }

@media (max-width: 640px) {
  .categories { grid-template-columns: 1fr; }
  .hero h1 { font-size: 26px; }
}

/* --- Home clásico (réplica visual del support.yalo.com actual, 2026-09-17) ---
   El diseño moderno (hero/categories/contact-banner de arriba) queda intacto y sin usar,
   en reserva en /reserva-diseno-moderno/ — no se activa hasta que Andres lo pida. */

.hero-classic {
  height: 300px;
  background-image: url('/hero-bg.png');
  background-size: cover;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  box-sizing: border-box;
}

.classic-search {
  position: relative;
  width: 100%;
  max-width: 600px;
}

.classic-search input[type="search"] {
  width: 100%;
  height: 40px;
  border: none;
  border-radius: 30px;
  padding: 1px 20px 1px 40px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  box-sizing: border-box;
}

.classic-search input[type="search"]:focus {
  outline: none;
}

.classic-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  pointer-events: none;
}

html[dir="rtl"] .classic-search-icon { left: auto; right: 16px; }
html[dir="rtl"] .classic-search input[type="search"] { padding: 1px 40px 1px 20px; }

/* --- RTL (urdu, hebreo) --- */

html[dir="rtl"] .header-nav a { margin-left: 0; margin-right: 24px; }
html[dir="rtl"] .hero-search { padding: 4px 20px 4px 4px; }

/* --- Gate de login (verificación de correo antes del webchat) --- */

.ylg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(47, 57, 65, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2147483000;
  padding: 16px;
}

.ylg-overlay[hidden] { display: none; }

.ylg-modal {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 32px 28px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.ylg-close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: none;
  background: none;
  font-size: 24px;
  line-height: 1;
  color: var(--border);
  cursor: pointer;
  padding: 4px;
}
html[dir="rtl"] .ylg-close { right: auto; left: 14px; }

.ylg-step h2 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--ink);
}

.ylg-step p { margin: 0 0 16px; font-size: 14px; color: var(--ink); }

.ylg-form { display: flex; flex-direction: column; gap: 12px; }

.ylg-input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 14px;
  font-size: 15px;
  font-family: inherit;
  box-sizing: border-box;
}
.ylg-input:focus { outline: 2px solid var(--teal); outline-offset: 1px; }

.ylg-code-input { letter-spacing: 4px; font-size: 20px; text-align: center; }

.ylg-btn {
  height: 44px;
  border: none;
  border-radius: 24px;
  background: var(--teal);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.ylg-btn:hover:not(:disabled) { background: var(--teal-hover); }
.ylg-btn:disabled { opacity: 0.6; cursor: default; }

.ylg-error { margin: 8px 0 0; font-size: 13px; color: var(--error); }

.ylg-links { display: flex; justify-content: space-between; margin-top: 14px; }

.ylg-link {
  border: none;
  background: none;
  color: var(--link);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
}
.ylg-link:hover { text-decoration: underline; }
html[dir="rtl"] .crumbs { direction: rtl; }

/* --- "Mis solicitudes" (requests.html) --- */

.req-header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.req-header-row h1 { margin-bottom: 8px; }

.req-link {
  border: none;
  background: none;
  color: var(--link);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
}
.req-link:hover { text-decoration: underline; }

.req-btn {
  background: var(--teal);
  color: #fff;
  border: none;
  padding: 12px 28px;
  font-size: 15px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 8px;
}
.req-btn:hover { background: var(--teal-hover); }

.req-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin: 20px 0 24px;
}

.req-tab {
  border: none;
  background: none;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  padding: 10px 4px;
  margin-right: 24px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
html[dir="rtl"] .req-tab { margin-right: 0; margin-left: 24px; }

.req-tab.active {
  color: var(--teal);
  font-weight: 600;
  border-bottom-color: var(--teal);
}

.req-filters select {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}

.req-muted { color: #6b6b6b; font-size: 14px; }

.req-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.req-table th {
  text-align: left;
  font-weight: 600;
  color: #6b6b6b;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
html[dir="rtl"] .req-table th { text-align: right; }

.req-table td {
  padding: 12px;
  border-bottom: 1px solid #e4e4e4;
  vertical-align: top;
}

.req-table tr.req-row { cursor: pointer; }
.req-table tr.req-row:hover td { background: #fff; }

.req-table .req-subject-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.req-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #6b6b6b;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1px 8px;
  white-space: nowrap;
}

.req-status {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  background: #eef3f2;
  color: var(--teal);
  white-space: nowrap;
}
.req-status.is-resolved { background: #eef0f2; color: #55606a; }

/* Detalle */

#req-detail-subject { margin-bottom: 8px; }

.req-detail-meta {
  color: #6b6b6b;
  font-size: 14px;
  margin-bottom: 24px;
}

.req-conversation {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.req-message {
  max-width: 640px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.5;
}

.req-message.is-agent { background: #fff; }
.req-message.is-customer { background: #eef3f2; border-color: #cfe0de; margin-left: auto; }
html[dir="rtl"] .req-message.is-customer { margin-left: 0; margin-right: auto; }

.req-message-meta {
  font-size: 12px;
  color: #6b6b6b;
  margin-bottom: 6px;
  font-weight: 600;
}

.req-message-attachments {
  margin-top: 8px;
  font-size: 12px;
  color: #6b6b6b;
}
.req-message-attachments a {
  color: inherit;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .req-table thead { display: none; }
  .req-table, .req-table tbody, .req-table tr, .req-table td { display: block; width: 100%; }
  .req-table tr.req-row { border-bottom: 1px solid var(--border); padding: 10px 0; }
  .req-table td { border-bottom: none; padding: 3px 0; }
  .req-message { max-width: 100%; }
}
