:root {
    --primary: #FFB800;
    --secondary: #F58200;
    --dark: #1e1e1e;
    --text: #342E1C;
    --mute: #807c70;
    --bg: #f2f1ef;
    --card: #eeeae2;
    --white: #ffffff;
    --grad: linear-gradient(135deg, #FFB800 0%, #F58200 100%);
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
  }

  h1,h2,h3,h4,h5,h6 { font-family: 'Poppins', sans-serif; }

  /* ── HEADER ── */
  header {
    background: var(--dark);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0,0,0,.4);
  }
  .header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
  }
  .logo-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: .6rem;
  }
  .logo-badge {
    background: var(--grad);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: .06em;
    text-transform: uppercase;
  }
  .header-back {
    color: rgba(255,255,255,.55);
    font-size: .85rem;
    display: flex;
    align-items: center;
    gap: .4rem;
    text-decoration: none;
    transition: color .2s;
  }
  .header-back:hover { color: var(--primary); }

  /* ── HERO ── */
  .hero {
    background: var(--dark);
    padding: 3.5rem 2rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
  }
  .hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 120%, rgba(255,184,0,.18) 0%, transparent 70%);
    pointer-events: none;
  }
  .hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255,184,0,.12);
    border: 1px solid rgba(255,184,0,.25);
    color: var(--primary);
    font-size: .78rem;
    font-weight: 600;
    padding: .35rem 1rem;
    border-radius: 999px;
    margin-bottom: 1.2rem;
    letter-spacing: .05em;
    text-transform: uppercase;
  }
  .hero h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: #fff;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: .8rem;
  }
  .hero h1 span { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
  .hero p {
    color: rgba(255,255,255,.55);
    font-size: 1rem;
    max-width: 520px;
    margin: 0 auto 2rem;
    line-height: 1.6;
  }

  /* ── SEARCH ── */
  .search-wrap {
    max-width: 560px;
    margin: 0 auto 0;
    position: relative;
    z-index: 2;
  }
  .search-wrap input {
    width: 100%;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 12px;
    padding: 1rem 1rem 1rem 3rem;
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: border-color .25s, background-color .25s;
    backdrop-filter: blur(8px);
  }
  .search-wrap input::placeholder { color: rgba(255,255,255,.35); }
  .search-wrap input:focus {
    border-color: var(--primary);
    background: rgba(255,255,255,.12);
  }
  .search-wrap .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,.4);
    font-size: 1.1rem;
    pointer-events: none;
  }

  /* ── TABS ── */
  .tab-bar {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-top: 2.5rem;
    position: relative;
    z-index: 2;
  }
  .tab-btn {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    color: rgba(255,255,255,.55);
    font-family: 'DM Sans', sans-serif;
    font-size: .9rem;
    font-weight: 500;
    padding: .7rem 1.8rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all .25s;
    display: flex;
    align-items: center;
    gap: .45rem;
    outline: none;
  }
  .tab-btn:hover {
    color: #fff;
    border-color: rgba(255,184,0,.4);
  }
  .tab-btn.active {
    background: var(--grad);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(255,184,0,.35);
  }
  .tab-btn svg { width: 18px; height: 18px; }

  /* ── WAVE DIVIDER ── */
  .wave { display: block; margin-top: -2px; line-height: 0; }
  .wave svg { width: 100%; height: 60px; }

  /* ── MAIN ── */
  main { max-width: 1200px; margin: 0 auto; padding: 2.5rem 1.5rem 5rem; }

  /* ── PANEL FADE ── */
  .panel { display: none; animation: fadeUp .35s ease; }
  .panel.active { display: block; }
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* ── SECTION TITLE ── */
  .section-label {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-bottom: 1.8rem;
  }
  .section-label .line {
    flex: 1;
    height: 2px;
    background: var(--card);
    border-radius: 999px;
  }
  .section-label span {
    font-family: 'Poppins', sans-serif;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--mute);
    white-space: nowrap;
  }

  /* ── KB CATEGORIES ── */
  .kb-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
    margin-bottom: 3rem;
  }
  .kb-cat {
    background: #fff;
    border: 1px solid rgba(0,0,0,.07);
    border-radius: 14px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all .25s;
    position: relative;
    overflow: hidden;
  }
  .kb-cat::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--grad);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s;
  }
  .kb-cat:hover { box-shadow: 0 8px 32px rgba(0,0,0,.1); transform: translateY(-2px); }
  .kb-cat:hover::before { transform: scaleX(1); }
  .kb-cat-icon {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, rgba(255,184,0,.15), rgba(245,130,0,.1));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.3rem;
  }
  .kb-cat h3 {
    font-size: .98rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: .35rem;
  }
  .kb-cat p { font-size: .82rem; color: var(--mute); line-height: 1.5; }
  .kb-cat-count {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    margin-top: .8rem;
    font-size: .75rem;
    font-weight: 600;
    color: var(--secondary);
  }

  /* ── KB ARTICLES ── */
  .kb-articles { display: flex; flex-direction: column; gap: .7rem; }
  .kb-article {
    background: #fff;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 10px;
    padding: 1.1rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
  }
  .kb-article:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    border-color: rgba(255,184,0,.3);
    transform: translateX(4px);
  }
  .kb-article-icon {
    width: 36px; height: 36px; flex-shrink: 0;
    background: var(--card);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
  }
  .kb-article-body { flex: 1; min-width: 0; }
  .kb-article-body h4 { font-size: .92rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .kb-article-body p { font-size: .78rem; color: var(--mute); margin-top: .15rem; }
  .kb-article-meta {
    display: flex; align-items: center; gap: .6rem; flex-shrink: 0;
  }
  .tag {
    background: var(--card);
    color: var(--mute);
    font-size: .68rem;
    font-weight: 600;
    padding: .2rem .6rem;
    border-radius: 999px;
  }
  .tag.urgent { background: rgba(220,53,69,.1); color: #dc3545; }
  .tag.new { background: rgba(255,184,0,.15); color: var(--secondary); }
  .arrow { color: var(--mute); font-size: .9rem; }

  /* ── SEARCH RESULTS ── */
  .search-results { display: none; }
  .search-results.visible { display: block; }

  /* ── TICKET FORM ── */
  .ticket-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
  }
  @media (max-width: 800px) { .ticket-grid { grid-template-columns: 1fr; } }

  .form-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,.07);
    border-radius: 16px;
    padding: 2rem;
  }
  .form-card h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: .6rem;
  }
  .form-card h2 .dot {
    width: 8px; height: 8px;
    background: var(--grad);
    border-radius: 999px;
    display: inline-block;
  }

  .form-group { margin-bottom: 1.2rem; }
  .form-group label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: .45rem;
    letter-spacing: .02em;
  }
  .form-group label .req { color: var(--secondary); margin-left: 2px; }
  .form-control {
    width: 100%;
    background: var(--bg);
    border: 1px solid rgba(0,0,0,.1);
    border-radius: 8px;
    padding: .75rem 1rem;
    font-family: 'DM Sans', sans-serif;
    font-size: .9rem;
    color: var(--text);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    appearance: none;
  }
  .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,184,0,.15);
    background: #fff;
  }
  select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23807c70' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }
  textarea.form-control { resize: vertical; min-height: 130px; }

  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  @media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

  /* Priority selector */
  .priority-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .5rem;
  }
  .priority-opt { display: none; }
  .priority-opt + label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    padding: .7rem .4rem;
    border: 2px solid rgba(0,0,0,.09);
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s;
    font-size: .72rem;
    font-weight: 600;
    color: var(--mute);
  }
  .priority-opt + label .pip {
    width: 10px; height: 10px;
    border-radius: 999px;
  }
  .priority-opt[value="baja"] + label .pip { background: #28a745; }
  .priority-opt[value="media"] + label .pip { background: var(--primary); }
  .priority-opt[value="alta"] + label .pip { background: var(--secondary); }
  .priority-opt[value="critica"] + label .pip { background: #dc3545; }
  .priority-opt:checked + label {
    border-color: var(--primary);
    background: rgba(255,184,0,.07);
    color: var(--text);
  }

  /* File upload */
  .file-drop {
    border: 2px dashed rgba(0,0,0,.12);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    position: relative;
  }
  .file-drop:hover {
    border-color: var(--primary);
    background: rgba(255,184,0,.04);
  }
  .file-drop input[type="file"] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
  }
  .file-drop .file-icon { font-size: 1.8rem; margin-bottom: .5rem; }
  .file-drop p { font-size: .8rem; color: var(--mute); line-height: 1.5; }
  .file-drop span { color: var(--secondary); font-weight: 600; }

  /* Submit button */
  .btn-submit {
    width: 100%;
    background: var(--grad);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    padding: .9rem 1.5rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    transition: all .25s;
    margin-top: 1.5rem;
    box-shadow: 0 4px 16px rgba(255,184,0,.3);
  }
  .btn-submit:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(255,184,0,.4);
  }
  .btn-submit:active { transform: translateY(0); }

  /* Sidebar info */
  .sidebar-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,.07);
    border-radius: 14px;
    padding: 1.4rem;
    margin-bottom: 1.2rem;
  }
  .sidebar-card h3 {
    font-size: .85rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: .5rem;
  }
  .sla-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .5rem 0;
    border-bottom: 1px solid var(--card);
    font-size: .82rem;
  }
  .sla-row:last-child { border-bottom: none; }
  .sla-row .label { color: var(--mute); display: flex; align-items: center; gap: .4rem; }
  .sla-row .val { font-weight: 600; color: var(--text); }

  .tip-list { list-style: none; }
  .tip-list li {
    font-size: .81rem;
    color: var(--mute);
    padding: .4rem 0;
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    line-height: 1.45;
    border-bottom: 1px solid var(--card);
  }
  .tip-list li:last-child { border-bottom: none; }
  .tip-list li::before { content: '→'; color: var(--secondary); font-weight: 700; flex-shrink: 0; }

  .status-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .72rem;
    font-weight: 700;
    padding: .25rem .7rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .05em;
  }
  .status-open { background: rgba(255,184,0,.15); color: #a07000; }
  .status-online { background: rgba(40,167,69,.12); color: #1a7a40; }
  .status-dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; animation: pulse 2s infinite; }
  @keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

  /* ── SUCCESS STATE ── */
  .success-overlay {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    animation: fadeUp .4s ease;
  }
  .success-overlay.visible { display: flex; }
  .success-icon {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, #FFB800, #ffc685);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 32px rgba(255,184,0,.35);
  }
  .success-overlay h2 { font-size: 1.6rem; color: var(--text); margin-bottom: .7rem; }
  .success-overlay p { color: var(--mute); max-width: 420px; line-height: 1.6; margin-bottom: 2rem; }
  .ticket-number {
    background: var(--card);
    border-radius: 10px;
    padding: .6rem 1.4rem;
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2rem;
    letter-spacing: .1em;
  }

  .article-categorie{ display: none;  }
  .article-categorie.visible { display: block; animation: fadeUp .3s ease; }

  /* ── KB DETAIL ── */
  .article-detail { display: none; }
  .article-detail.visible { display: block; animation: fadeUp .3s ease; }
  .article-header {
    background: #fff;
    border: 1px solid rgba(0,0,0,.07);
    border-radius: 14px;
    padding: 2rem;
    margin-bottom: 1.5rem;
  }
  .breadcrumb {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .78rem;
    color: var(--mute);
    margin-bottom: 1rem;
    flex-wrap: wrap;
  }
  .breadcrumb a { color: var(--secondary); text-decoration: none; font-weight: 600; }
  .breadcrumb a:hover { text-decoration: underline; }
  .article-body { font-size: .93rem; line-height: 1.75; color: var(--text); }
  .article-body h4 { font-size: 1rem; margin: 1.5rem 0 .6rem; color: var(--text); }
  .article-body p { margin-bottom: .9rem; }
  .article-body ul { padding-left: 1.2rem; margin-bottom: .9rem; }
  .article-body li { margin-bottom: .35rem; }
  .article-body .callout {
    background: rgba(255,184,0,.1);
    border-left: 3px solid var(--primary);
    border-radius: 0 8px 8px 0;
    padding: .8rem 1rem;
    margin: 1rem 0;
  }
  .article-helpful { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--card); }
  .article-helpful p { font-size: .88rem; color: var(--mute); margin-bottom: .8rem; }
  .helpful-btns { display: flex; gap: .7rem; }
  .helpful-btn {
    padding: .5rem 1.2rem;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,.1);
    background: none;
    font-family: 'DM Sans', sans-serif;
    font-size: .82rem;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    gap: .4rem;
  }
  .helpful-btn:hover { background: var(--card); }

  /* ── TICKET LIST ── */
  .ticket-list-wrap { margin-top: 2.5rem; }
  .ticket-item {
    background: #fff;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 10px;
    padding: 1.1rem 1.4rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    margin-bottom: .6rem;
    cursor: pointer;
    transition: all .2s;
  }
  .ticket-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); transform: translateY(-1px); }
  .t-id { font-family: monospace; font-size: .78rem; font-weight: 700; color: var(--mute); min-width: 70px; }
  .t-body h4 { font-size: .9rem; font-weight: 600; }
  .t-body p { font-size: .78rem; color: var(--mute); margin-top: .15rem; }
  .t-meta { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; }

  /* ── MISC ── */
  .back-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--secondary);
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1.5rem;
    background: none;
    border: none;
    font-family: 'DM Sans', sans-serif;
    padding: 0;
    text-decoration: none;
  }
  .back-btn:hover { opacity: .75; }

  /* Responsive hero */
  @media (max-width: 640px) {
    .tab-bar { gap: .3rem; }
    .tab-btn { padding: .6rem 1.1rem; font-size: .82rem; }
    main { padding: 1.5rem 1rem 4rem; }
  }

  /* footer */

  h1,h2,h3 { font-family: 'Poppins', sans-serif; }
 
  .bg-brand-grad { background: linear-gradient(135deg, #FFB800 0%, #F58200 100%); }
  .text-brand-grad {
    background: linear-gradient(135deg, #FFB800, #F58200);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
 
  /* subtle animated grain texture on the number */
  @keyframes flicker { 0%,100%{opacity:.06} 50%{opacity:.12} }
  .grain { animation: flicker 4s ease infinite; }
 
  /* floating dots */
  @keyframes float1 { 0%,100%{transform:translateY(0)}   50%{transform:translateY(-14px)} }
  @keyframes float2 { 0%,100%{transform:translateY(0)}   50%{transform:translateY(-9px)}  }
  .float1 { animation: float1 5s ease-in-out infinite; }
  .float2 { animation: float2 7s ease-in-out infinite; }

  /* animacion hers */

  @keyframes slideDown {
  from { opacity: 0; transform: translateY(-32px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Eyebrow: "Centro de Ayuda" */
.hero .hero-eyebrow {
  opacity: 0;
  animation: slideDown 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

/* H1 */
.hero h1 {
  opacity: 0;
  animation: slideDown 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.25s forwards;
}

/* Párrafo descriptivo */
.hero p {
  opacity: 0;
  animation: slideDown 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.38s forwards;
}

/* Botones con fadeIn escalonado */
.tab-btn:nth-child(1) { opacity: 0; animation: fadeIn 0.5s ease 0.55s forwards; }
.tab-btn:nth-child(2) { opacity: 0; animation: fadeIn 0.5s ease 0.70s forwards; }
.tab-btn:nth-child(3) { opacity: 0; animation: fadeIn 0.5s ease 0.85s forwards; }