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

  :root {
    --bg: #0d0f14;
    --surface: #161921;
    --surface2: #1e2330;
    --accent: #2d8c13;
    --accent2: #e8c354;
    --text: #f1ede4;
    --text-muted: #7a7f8e;
    --blue: #4a82e4;
    --green: #3ecf8e;
    --rose: #e05c7a;
    --radius: 20px;
  }

  body {
    font-family: "Outfit", sans-serif;
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    color: var(--text);
  }

  .app {
    width: 100%;
    max-width: 420px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;

  }

  /* BG MESH */
  .bg-mesh {
    position: fixed;
    inset: 0;
    max-width: 420px;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
  }
  .bg-mesh::before {
    content: "";
    position: absolute;
    width: 500px; height: 500px;
    top: -120px; left: -100px;
    background: radial-gradient(circle, rgba(201,162,39,0.12) 0%, transparent 65%);
    animation: drift1 8s ease-in-out infinite alternate;
  }
  .bg-mesh::after {
    content: "";
    position: absolute;
    width: 400px; height: 400px;
    bottom: -80px; right: -80px;
    background: radial-gradient(circle, rgba(74,130,228,0.10) 0%, transparent 65%);
    animation: drift2 10s ease-in-out infinite alternate;
  }
  @keyframes drift1 { from { transform: translate(0,0); } to { transform: translate(30px,20px); } }
  @keyframes drift2 { from { transform: translate(0,0); } to { transform: translate(-20px,-15px); } }

  /* === HOME SCREEN === */
  #screen-home {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 40px 20px;
    min-height: 100vh;
  }

  .logo-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 44px;
    animation: fadeDown 0.6s ease both;
  }
  @keyframes fadeDown {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .logo-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1.5px solid rgba(201,162,39,0.25);
    animation: spin 12s linear infinite;
  }
  @keyframes spin { to { transform: rotate(360deg); } }
  .logo-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    position: relative;
    z-index: 1;
    background: #fff;
    padding: 6px;
    box-shadow: 0 0 0 1px rgba(201,162,39,0.3), 0 12px 40px rgba(0,0,0,0.5);
  }



  .home-card-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }



  .home-card {
    width: 100%;
    background: var(--surface);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius);
    padding: 20px 18px;
    display: flex;
    
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: transform 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
    animation: fadeUp 0.5s 0.4s ease both;
    position: relative;
    overflow: hidden;
  }
  .home-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 60%);
    pointer-events: none;
  }
  .home-card:hover {
    transform: translateY(-2px);
    background: var(--surface2);
    border-color: rgba(201,162,39,0.22);
    box-shadow: 0 8px 32px rgba(0,0,0,0.35), 0 0 0 1px rgba(201,162,39,0.1);
  }
  .home-card:active { transform: scale(0.98); }

  .card-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 26px;
    background: rgba(201,162,39,0.12);
    color: var(--accent2);
  }
  .card-text { flex: 1; }
  .card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 3px;
  }
  .card-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
  }
  .card-arrow {
    width: 30px; height: 30px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    color: rgba(255,255,255,0.3);
    transition: color 0.15s, background 0.15s, border-color 0.15s;
    flex-shrink: 0;
  }
  .home-card:hover .card-arrow {
    background: rgba(201,162,39,0.12);
    color: var(--accent);
    border-color: rgba(201,162,39,0.2);
  }

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

  .footer {
    position: relative; z-index: 1;
    text-align: center;
    padding: 20px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.12);
    animation: fadeUp 0.5s 0.6s ease both;
  }

  /* === MODAL === */
  .modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(6px);
    z-index: 100;
    align-items: flex-end;
    justify-content: center;
  }
  .modal-overlay.open {
    display: flex;
    animation: overlayIn 0.25s ease;
  }
  @keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

  .modal-sheet {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border-radius: 28px 28px 0 0;
    padding: 28px 24px 40px;
    border-top: 1px solid rgba(255,255,255,0.08);
    animation: sheetUp 0.3s cubic-bezier(0.34,1.3,0.64,1) both;
  }
  @keyframes sheetUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
  }

  .modal-handle {
    width: 36px; height: 4px;
    background: rgba(255,255,255,0.12);
    border-radius: 99px;
    margin: 0 auto 24px;
  }

  .modal-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
    text-align: center;
  }
  .modal-sub {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 24px;
  }

  .dni-input-wrap {
    position: relative;
    margin-bottom: 16px;
  }
  .dni-input {
    width: 100%;
    background: var(--surface2);
    border: 1.5px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 16px 52px 16px 18px;
    font-family: "Outfit", sans-serif;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
    text-align: center;
  }
  .dni-input::placeholder { color: rgba(255,255,255,0.18); letter-spacing: 2px; font-size: 16px; font-weight: 400; }
  .dni-input:focus {
    border-color: rgba(201,162,39,0.45);
    box-shadow: 0 0 0 3px rgba(201,162,39,0.08);
  }

  .error-msg {
    font-size: 12px;
    color: var(--rose);
    text-align: center;
    margin-bottom: 12px;
    min-height: 18px;
    font-weight: 500;
  }

  .btn-primary {
    width: 100%;
    background: var(--accent);
    color: #0d0f14;
    border: none;
    border-radius: 14px;
    padding: 16px;
    font-family: "Outfit", sans-serif;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
  }
  .btn-primary:hover { background: var(--accent2); }
  .btn-primary:active { transform: scale(0.98); }

  .btn-cancel {
    width: 100%;
    background: transparent;
    color: var(--text-muted);
    border: none;
    border-radius: 14px;
    padding: 12px;
    font-family: "Outfit", sans-serif;
    font-size: 14px;
    cursor: pointer;
    margin-top: 8px;
    transition: color 0.15s;
  }
  .btn-cancel:hover { color: var(--text); }

  /* === DASHBOARD SCREEN === */
  #screen-dashboard {
    display: none;
    position: relative;
    z-index: 1;
    flex-direction: column;
    flex: 1;
    padding: 0 0 24px;
    min-height: 100vh;
    animation: fadeUp 0.4s ease both;
  }
  #screen-dashboard.visible { display: flex; }

  /* Top bar */
  .dash-topbar {
    padding: 40px 20px 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  .dash-logo {
    width: 44px; height: 44px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    background: #fff;
    padding: 2px;
    border: 1.5px solid rgba(201,162,39,0.3);
    flex-shrink: 0;
  }

  .dash-greeting {
    flex: 1;
  }
  .dash-hi {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
  }
  .dash-name {
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
  }
  .dash-role {
    display: inline-block;
    background: rgba(201,162,39,0.12);
    color: var(--accent2);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 99px;
    margin-top: 5px;
  }
  .dash-leader {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
  }
  .dash-leader span {
    color: rgba(232,195,84,0.7);
    font-weight: 600;
  }

  .dash-logout {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 18px;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
  }
  .dash-logout:hover { background: rgba(224,92,122,0.12); color: var(--rose); }

  /* Divider */
  .dash-divider {
    margin: 20px 20px 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201,162,39,0.2), transparent);
  }

  /* Action grid */
  .dash-grid {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .dash-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    padding-left: 4px;
    margin-bottom: 2px;
  }

  .action-card {
    background: var(--surface);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius);
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: transform 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
    width: 100%;
    text-align: left;
    position: relative;
    overflow: hidden;
  }
  .action-card::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 60%);
    pointer-events: none;
  }
  .action-card:hover {
    transform: translateY(-2px);
    background: var(--surface2);
    box-shadow: 0 8px 28px rgba(0,0,0,0.3);
  }
  .action-card:active { transform: scale(0.98); }


  .panel{
    display:none;
  }
  .action-icon {
    width: 48px; height: 48px;
    border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 22px;
  }
  .ic-gold   { background: rgba(201,162,39,0.12); color: var(--accent2); }
  .ic-blue   { background: rgba(74,130,228,0.12); color: #7aaaf5; }

  .ic-green  { background: rgba(62,207,142,0.12); color: var(--green); }
    .ic-yellow  { background: #5a5a2ede;color: rgba(213, 213, 17, 0.888); }
  .ic-red  { background: #51312bde;color: rgba(213, 46, 17, 0.936); }
  .ic-purple { background: rgba(139,92,246,0.12); color: #a78bfa; }
  .action-card:hover.card-purple { border-color: rgba(139,92,246,0.2); }
  .action-card:hover.card-gold { border-color: rgba(201,162,39,0.2); }
  .action-card:hover.card-blue { border-color: rgba(74,130,228,0.15); }
  
  .action-card:hover.card-green { border-color: rgba(62,207,142,0.15); }

  .action-text { flex: 1; }
  .action-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
  }
  .action-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
  }
  .action-arrow {
    width: 28px; height: 28px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    color: rgba(255,255,255,0.25);
    flex-shrink: 0;
  }

  /* Ocultar flechitas del input number */
  .dni-input::-webkit-outer-spin-button,
  .dni-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  .dni-input[type=number] {
    -moz-appearance: textfield;
  }

  /* === TROQUEL SCREEN === */
  #screen-troquel,
  #screen-registro,
  #screen-contactos {
    display: none;
    position: relative;
    z-index: 1;
    flex-direction: column;
    flex: 1;
    min-height: 100vh;
    padding-bottom: 40px;
  }
  #screen-troquel.visible,
  #screen-registro.visible,
  #screen-contactos.visible { display: flex; }

  .screen-header {
    padding: 44px 20px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
  }
  .btn-back {
    width: 38px; height: 38px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 20px;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
  }
  .btn-back:hover { background: rgba(255,255,255,0.1); color: var(--text); }

  .screen-header-text { flex: 1; }
  .screen-title {
    font-size: 19px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
  }
  .screen-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
  }

  /* FORM */
  .form-wrap {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .form-section {
    background: var(--surface);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 4px;
  }

  .form-section-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    padding: 14px 16px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  .field-row {
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    min-height: 52px;
    gap: 12px;
  }
  .field-row:last-child { border-bottom: none; }

  .field-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    width: 100px;
    flex-shrink: 0;
  }

  .field-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: "Outfit", sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    padding: 14px 0;
    width: 100%;
  }
  .field-input::placeholder { color: rgba(255,255,255,0.18); font-weight: 400; }

  .field-textarea {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: "Outfit", sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    padding: 14px 0;
    resize: none;
    min-height: 80px;
    line-height: 1.5;
  }
  .field-textarea::placeholder { color: rgba(255,255,255,0.18); font-weight: 400; }

  /* Custom select */
  .field-select {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: "Outfit", sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    padding: 14px 0;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
  }
  .field-select option {
    background: #1e2330;
    color: var(--text);
  }
  .select-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
  }
  .select-wrap::after {
    content: "\e5cf"; /* material chevron */
    font-family: "tabler-icons";
    content: "\ea61";
    position: absolute;
    right: 0;
    color: var(--text-muted);
    font-size: 18px;
    pointer-events: none;
  }

  /* Toggle buttons group */
  .toggle-group {
    flex: 1;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 10px 0;
  }
  .toggle-btn {
    padding: 6px 14px;
    border-radius: 99px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: var(--text-muted);
    font-family: "Outfit", sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
  }
  .toggle-btn.active {
    background: rgba(201,162,39,0.18);
    border-color: rgba(201,162,39,0.4);
    color: var(--accent2);
  }

  /* Contact toggle */
  .contact-toggle {
    flex: 1;
    display: flex;
    gap: 6px;
    padding: 10px 0;
  }
  .contact-btn {
    padding: 6px 16px;
    border-radius: 99px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: var(--text-muted);
    font-family: "Outfit", sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
  }
  .contact-btn.active {
    background: rgba(62,207,142,0.15);
    border-color: rgba(62,207,142,0.35);
    color: var(--green);
  }

  .btn-submit {
    margin: 8px 16px 0;
    width: calc(100% - 32px);
    background: var(--accent);
    color: #0d0f14;
    border: none;
    border-radius: 14px;
    padding: 16px;
    font-family: "Outfit", sans-serif;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
  }
  .btn-submit:hover { background: var(--accent2); }
  .btn-submit:active { transform: scale(0.98); }

  .field-input.error {
    color: var(--rose);
  }
  .field-input.error::placeholder {
    color: rgba(224,92,122,0.4);
  }
  .field-row:has(.field-input.error) {
    background: rgba(224,92,122,0.04);
  }





  /* mis contactos */

   /* === CONTACTOS SCREEN === */
  #screen-contactos {
    display: none;
    position: relative;
    z-index: 1;
    flex-direction: column;
    flex: 1;
    min-height: 100vh;
    padding-bottom: 40px;
  }
  #screen-contactos.visible { display: flex; }

  .contactos-wrap {
    padding: 0 16px;
    flex: 1;
  }

  /* Loading */
  .contactos-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 60px 0;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
  }
  .loading-spinner {
    width: 32px; height: 32px;
    border: 2.5px solid rgba(255,255,255,0.08);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }

  /* Empty / Error state */
  .contactos-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 60px 20px;
    text-align: center;
  }
  .contactos-empty i {
    font-size: 40px;
    color: var(--text-muted);
    margin-bottom: 4px;
  }
  .contactos-empty p {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
  }
  .contactos-empty span {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
  }

  /* Contact counter badge */
  .contactos-count {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    padding: 0 4px 12px;
  }

  /* Contact item card */
  .contact-item {
    background: var(--surface);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
    animation: fadeUp 0.3s ease both;
    position: relative;
    overflow: hidden;
  }
  .contact-item::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, transparent 60%);
    pointer-events: none;
  }

  .contact-avatar {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: rgba(74,130,228,0.12);
    border: 1.5px solid rgba(74,130,228,0.18);
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
    font-weight: 800;
    color: #7aaaf5;
    flex-shrink: 0;
    letter-spacing: -0.5px;
  }

  .contact-info { flex: 1; min-width: 0; }
  .contact-fullname {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .contact-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
  }

  .contact-num {
    font-size: 11px;
    font-weight: 700;
    color: rgba(74,130,228,0.5);
    background: rgba(74,130,228,0.08);
    border-radius: 99px;
    padding: 4px 10px;
    flex-shrink: 0;
  }


  .contact-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.oracion-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.04);
  font-size: 17px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, transform 0.1s;
  line-height: 1;
}

.oracion-activa{ 
box-shadow: 0 0 10px 3px rgba(67, 223, 10, 0.804);

}
.oracion-btn:active {
  background: rgba(255,255,255,0.1);
  transform: scale(0.92);
}



/* === MODAL ORACIÓN === */
.modal-oracion-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 999;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.modal-oracion-overlay.open {
  display: flex;
}

.modal-oracion {
  background: var(--surface, #1a1a2e);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255,255,255,0.07);
  animation: slideUp 0.3s cubic-bezier(.22,1,.36,1) both;
}

.modal-oracion-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.modal-oracion-icon {
  font-size: 26px;
  line-height: 1;
}
.modal-oracion-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text, #fff);
}
.modal-oracion-subtitle {
  font-size: 11px;
  color: var(--text-muted, #888);
  margin-top: 1px;
}
.modal-oracion-close {
  margin-left: auto;
  background: rgba(255,255,255,0.06);
  border: none;
  color: var(--text-muted, #888);
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.modal-oracion-body {
  overflow-y: auto;
  padding: 14px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Groups */
.oracion-group {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  overflow: hidden;
}
.oracion-summary {
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #fff);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}
.oracion-summary::-webkit-details-marker { display: none; }
.oracion-summary::after {
  content: "›";
  margin-left: auto;
  font-size: 18px;
  color: var(--text-muted, #888);
  transition: transform 0.2s;
  display: inline-block;
}
.oracion-group[open] .oracion-summary::after {
  transform: rotate(90deg);
}

.oracion-options {
  padding: 4px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.oracion-option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted, #aaa);
  cursor: pointer;
}
.oracion-option input[type="checkbox"] {
  width: 17px; height: 17px;
  accent-color: var(--accent, #4a82e4);
  cursor: pointer;
  flex-shrink: 0;
}
.oracion-option:has(input:checked) {
  color: var(--text, #fff);
}

/* Footer */
.modal-oracion-footer {
  display: flex;
  gap: 10px;
  padding: 14px 20px 28px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.btn-oracion-cancel {
  flex: 1;
  padding: 13px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  color: var(--text-muted, #888);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-oracion-submit {
  flex: 2;
  padding: 13px;
  border-radius: 12px;
  background: var(--accent, #4a82e4);
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn-oracion-submit:active { opacity: 0.85; }



/* === MODAL DETALLE === */
.modal-detalle-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 999;
  align-items: flex-end;
  justify-content: center;
}
.modal-detalle-overlay.open { display: flex; }

.modal-detalle {
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 95vh;
  height: 95vh;
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255,255,255,0.07);
  animation: slideUp 0.3s cubic-bezier(.22,1,.36,1) both;
}

.modal-detalle-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.modal-detalle-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(74,130,228,0.12);
  border: 1.5px solid rgba(74,130,228,0.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800;
  color: #7aaaf5;
  flex-shrink: 0;
}
.modal-detalle-titulo { flex: 1; min-width: 0; }
.modal-detalle-nombre {
  font-size: 16px; font-weight: 800;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.modal-detalle-sub {
  font-size: 11px; color: var(--text-muted); margin-top: 2px;
}

.modal-detalle-body {
  overflow-y: auto;
  padding: 16px 20px 32px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}



/* Sección dentro del detalle */
.detalle-section {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  overflow: hidden;
}
.detalle-section-title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  padding: 10px 14px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.detalle-row {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  gap: 10px;
}
.detalle-row:last-child { border-bottom: none; }
.detalle-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  width: 90px;
  flex-shrink: 0;
}
.detalle-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}
.detalle-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
}
.badge-si {
  background: rgba(62,207,142,0.12);
  color: var(--green);
  border: 1px solid rgba(62,207,142,0.2);
}
.badge-no {
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.07);
}
.seg-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font-family: "Outfit", sans-serif;
  font-size: 13px;
  width: 100%;
  min-width: 0;        /* ← evita que desborde el flex */
  box-sizing: border-box; /* ← padding incluido en el ancho */
  outline: none;
}


/* === TOGGLE CONTACT BTN (WhatsApp / Llamada) === */
.toggle-contact-btn {
  padding: 6px 16px;
  border-radius: 99px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  font-family: "Outfit", sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.toggle-contact-btn.active {
  background: rgba(62,207,142,0.15);
  border-color: rgba(62,207,142,0.35);
  color: var(--green);
}

/* === ANIMACIÓN SLIDE UP (modales) === */
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}


/* Etiquetas largas en field-row */
.field-label-wide {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  width: 120px;
  flex-shrink: 0;
}


.field-row:has(.toggle-group):last-child {
  padding-bottom: 10px;
}




/* === SEGUIMIENTO === */
#screen-seguimiento {
  display: none;
  position: relative;
  z-index: 1;
  flex-direction: column;
  flex: 1;
  min-height: 100vh;
  padding-bottom: 40px;
}
#screen-seguimiento.visible { display: flex; }

.seg-seccion {
  margin-bottom: 20px;
}
.seg-seccion-titulo {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  padding: 0 4px 10px;
}
.seg-seccion-icono {
  margin-right: 6px;
}

.seg-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font-family: "Outfit", sans-serif;
  font-size: 13px;
  width: 100%;
  outline: none;
}
.seg-input:focus {
  border-color: rgba(201,162,39,0.4);
}
/* Fix color del date/time picker en dark */
.seg-input::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.5;
  cursor: pointer;
}



.seg-globo-notif {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 16px 16px auto;
  width: fit-content;
  align-self: flex-end;
  background: var(--surface);
  border: 1px solid rgba(62,207,142,0.25);
  border-radius: 99px;
  padding: 8px 14px 8px 10px;
  color: var(--green);
  font-family: "Outfit", sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(62,207,142,0.12), 0 0 0 1px rgba(62,207,142,0.08);
  transition: box-shadow 0.2s, transform 0.15s;
  animation: fadeUp 0.4s ease both;
}
.seg-globo-notif:active {
  transform: scale(0.96);
}
