/* ============================================================
   PasTele — CREATE TELEGRAM
   Channel / Group
   CLEAN SAAS UI — LIGHT + DARK
   Page scoped — no theme fallback conflicts
   ============================================================ */
:root{
  --ct-bg:#f5f7fb;
  --ct-surface:#ffffff;
  --ct-surface-2:#f8fafc;
  --ct-surface-3:#eef2f7;
  --ct-text:#0f172a;
  --ct-text-soft:#334155;
  --ct-muted:#64748b;
  --ct-placeholder:#94a3b8;
  --ct-border:#e2e8f0;
  --ct-border-strong:#cbd5e1;
  --ct-primary:#635bff;
  --ct-primary-2:#8b5cf6;
  --ct-blue:#3b82f6;
  --ct-cyan:#06b6d4;
  --ct-green:#10b981;
  --ct-orange:#f59e0b;
  --ct-red:#ef4444;
  --ct-pink:#ec4899;
  --ct-input-bg:#ffffff;
  --ct-input-text:#0f172a;
  --ct-input-border:#dbe2ea;
  --ct-shadow-sm:0 6px 20px rgba(15,23,42,.06);
  --ct-shadow:0 18px 55px rgba(15,23,42,.09);
  --ct-radius:18px;
  --ct-radius-sm:12px;
  --ct-max:860px;
  color-scheme:light;
}
/* ============================================================
   DARK THEME
   ============================================================ */
html[data-theme="dark"],
html.theme-dark,
body.theme-dark{
  --ct-bg:#080d16;
  --ct-surface:#101722;
  --ct-surface-2:#151e2b;
  --ct-surface-3:#1b2635;
  --ct-text:#f8fafc;
  --ct-text-soft:#e2e8f0;
  --ct-muted:#a8b5c7;
  --ct-placeholder:#8291a6;
  --ct-border:rgba(255,255,255,.11);
  --ct-border-strong:rgba(255,255,255,.18);
  --ct-input-bg:#0d1520;
  --ct-input-text:#f8fafc;
  --ct-input-border:rgba(255,255,255,.15);
  --ct-shadow-sm:0 8px 24px rgba(0,0,0,.22);
  --ct-shadow:0 20px 65px rgba(0,0,0,.36);
  color-scheme:dark;
}
/* ============================================================
   PAGE
   ============================================================ */
.create-detail-page{
  min-height:100vh;
  background:var(--ct-bg);
  color:var(--ct-text);
  transition:
    background-color .25s ease,
    color .25s ease;
}
.create-detail-page *,
.create-detail-page *::before,
.create-detail-page *::after{
  box-sizing:border-box;
}
.create-detail-page .create-detail{
  width:min(var(--ct-max),calc(100% - 32px));
  margin:0 auto;
  padding:30px 0 70px;
}
/* ============================================================
   HEADER
   ============================================================ */
.create-detail-head{
  margin-bottom:22px;
}
.back-create{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-bottom:17px;
  color:var(--ct-muted);
  font-size:13px;
  font-weight:750;
  text-decoration:none;
  transition:
    color .18s ease,
    transform .18s ease;
}
.back-create:hover{
  color:var(--ct-primary);
  transform:translateX(-2px);
}
.back-create i{
  font-size:12px;
}
.detail-title{
  display:flex;
  align-items:flex-start;
  gap:14px;
}
.detail-icon{
  width:52px;
  height:52px;
  flex:0 0 52px;
  display:grid;
  place-items:center;
  border-radius:15px;
  background:
    linear-gradient(
      135deg,
      rgba(59,130,246,.12),
      rgba(168,85,247,.10)
    );
  border:1px solid rgba(59,130,246,.16);
  box-shadow:
    0 10px 28px rgba(37,99,235,.08);
}
.detail-icon i{
  font-size:21px;
  background:
    linear-gradient(
      135deg,
      #2563eb,
      #8b5cf6,
      #ec4899
    );
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.eyebrow{
  display:block;
  margin:1px 0 5px;
  color:#2563eb;
  font-size:10px;
  font-weight:900;
  letter-spacing:.14em;
  line-height:1.2;
}
.detail-title h1{
  margin:0;
  color:var(--ct-text);
  font-size:32px;
  line-height:1.12;
  font-weight:900;
  letter-spacing:-.03em;
}
.detail-title p{
  margin:7px 0 0;
  color:var(--ct-muted);
  font-size:13.5px;
  line-height:1.55;
}
/* ============================================================
   FORM CARD
   ============================================================ */
.create-card{
  width:100%;
  padding:28px;
  background:var(--ct-surface);
  color:var(--ct-text);
  border:1px solid var(--ct-border);
  border-radius:21px;
  box-shadow:var(--ct-shadow);
  transition:
    background-color .25s ease,
    border-color .25s ease,
    box-shadow .25s ease;
}
/* ============================================================
   TYPE SWITCH
   ============================================================ */
.type-switch{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
  margin-bottom:21px;
}
.type-switch a{
  min-height:45px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:1px solid var(--ct-input-border);
  border-radius:12px;
  background:var(--ct-input-bg);
  color:var(--ct-text-soft);
  font-size:12.5px;
  font-weight:800;
  text-decoration:none;
  transition:
    background-color .18s ease,
    border-color .18s ease,
    color .18s ease,
    transform .18s ease,
    box-shadow .18s ease;
}
.type-switch a:hover{
  border-color:rgba(37,99,235,.42);
  transform:translateY(-1px);
}
.type-switch a.active{
  border-color:#2563eb;
  background:
    linear-gradient(
      135deg,
      rgba(37,99,235,.10),
      rgba(168,85,247,.07)
    );
  color:#2563eb;
  box-shadow:
    0 0 0 3px rgba(37,99,235,.08);
}
.type-switch a i{
  font-size:13px;
}
/* ============================================================
   FIELDS
   ============================================================ */
.field{
  margin-bottom:20px;
}
.field > label:not(.access-option){
  display:flex;
  align-items:center;
  gap:6px;
  margin-bottom:8px;
  color:var(--ct-text);
  font-size:13.5px;
  font-weight:800;
  line-height:1.4;
}
.field em{
  color:var(--ct-red);
  font-style:normal;
}
.field label span{
  margin-left:2px;
  color:var(--ct-muted);
  font-size:11px;
  font-weight:600;
}
.field > small{
  display:block;
  margin-top:6px;
  color:var(--ct-muted);
  font-size:11.5px;
  line-height:1.5;
}
/* ============================================================
   INPUT / TEXTAREA
   ============================================================ */
.create-detail-page input:not([type="radio"]):not([type="checkbox"]),
.create-detail-page textarea,
.create-detail-page select{
  width:100%;
  border:1px solid var(--ct-input-border);
  border-radius:12px;
  background:var(--ct-input-bg);
  color:var(--ct-input-text);
  outline:none;
  font-family:inherit;
  font-size:13.5px;
  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background-color .18s ease,
    color .18s ease;
}
.create-detail-page input:not([type="radio"]):not([type="checkbox"]),
.create-detail-page select{
  height:47px;
  padding:0 13px;
}
.create-detail-page textarea{
  min-height:120px;
  padding:12px 13px;
  resize:vertical;
  line-height:1.55;
}
.create-detail-page input::placeholder,
.create-detail-page textarea::placeholder{
  color:var(--ct-placeholder);
  opacity:1;
}
.create-detail-page input:hover,
.create-detail-page textarea:hover,
.create-detail-page select:hover{
  border-color:rgba(37,99,235,.34);
}
.create-detail-page input:focus,
.create-detail-page textarea:focus,
.create-detail-page select:focus{
  border-color:#2563eb;
  box-shadow:
    0 0 0 3px rgba(37,99,235,.12);
  outline:none;
}
/* Native select */
.create-detail-page select{
  cursor:pointer;
}
.create-detail-page select option{
  background:var(--ct-input-bg);
  color:var(--ct-input-text);
}
/* ============================================================
   PRICE
   ============================================================ */
.price-box{
  padding:16px;
  border:1px solid rgba(37,99,235,.14);
  border-radius:15px;
  background:
    linear-gradient(
      135deg,
      rgba(37,99,235,.06),
      rgba(168,85,247,.035)
    );
}
.price-box[hidden]{
  display:none;
}
.money-input{
  position:relative;
}
.money-input > span{
  position:absolute;
  left:14px;
  top:50%;
  transform:translateY(-50%);
  color:var(--ct-muted);
  font-size:13px;
  font-weight:800;
  pointer-events:none;
  z-index:2;
}
.money-input input{
  padding-left:42px !important;
  font-weight:800;
}
.create-detail-page input[type="number"]::-webkit-inner-spin-button,
.create-detail-page input[type="number"]::-webkit-outer-spin-button{
  -webkit-appearance:none;
  margin:0;
}
.create-detail-page input[type="number"]{
  -moz-appearance:textfield;
}
/* ============================================================
   ACCESS OPTIONS
   ============================================================ */
.access-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.access-option{
  position:relative;
  display:block;
  margin:0;
  cursor:pointer;
}
.access-option input{
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none;
}
.access-option > span{
  min-height:74px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:13px 14px;
  background:var(--ct-input-bg);
  border:1px solid var(--ct-input-border);
  border-radius:14px;
  transition:
    border-color .18s ease,
    background-color .18s ease,
    box-shadow .18s ease,
    transform .18s ease;
}
.access-option:hover > span{
  border-color:rgba(37,99,235,.36);
  transform:translateY(-1px);
}
.access-option input:checked + span{
  border-color:#2563eb;
  background:
    linear-gradient(
      135deg,
      rgba(37,99,235,.09),
      rgba(168,85,247,.055)
    );
  box-shadow:
    0 0 0 3px rgba(37,99,235,.08);
}
.access-option b{
  display:flex;
  align-items:center;
  gap:7px;
  color:var(--ct-text);
  font-size:13.5px;
  font-weight:850;
}
.access-option b i{
  background:
    linear-gradient(
      135deg,
      #2563eb,
      #8b5cf6,
      #ec4899
    );
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.access-option small{
  display:block;
  margin-top:4px;
  color:var(--ct-muted);
  font-size:11px;
  line-height:1.45;
}
/* ============================================================
   TELEGRAM URL
   ============================================================ */
.telegram-url{
  position:relative;
}
.telegram-url > span{
  position:absolute;
  left:13px;
  top:50%;
  transform:translateY(-50%);
  display:flex;
  align-items:center;
  color:#229ed9;
  z-index:2;
}
.telegram-url input{
  padding-left:38px !important;
}
/* ============================================================
   BUTTONS
   ============================================================ */
.create-actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:9px;
  margin-top:27px;
  padding-top:21px;
  border-top:1px solid var(--ct-border);
}
.create-actions .btn{
  min-height:45px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:0 17px;
  border-radius:11px;
  font:700 13px inherit;
  text-decoration:none;
  cursor:pointer;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background-color .18s ease,
    border-color .18s ease,
    color .18s ease;
}
.create-actions .btn:hover{
  transform:translateY(-1px);
}
.btn.secondary{
  border:1px solid var(--ct-border-strong);
  background:var(--ct-surface);
  color:var(--ct-text-soft);
}
.btn.secondary:hover{
  background:var(--ct-surface-2);
  border-color:rgba(37,99,235,.40);
  color:var(--ct-text);
}
.btn.primary{
  border:0;
  background:
    linear-gradient(
      135deg,
      #2563eb,
      #7c3aed,
      #db2777
    );
  color:#ffffff;
  box-shadow:
    0 9px 22px rgba(37,99,235,.17);
}
.btn.primary:hover{
  box-shadow:
    0 13px 28px rgba(37,99,235,.25);
}
.btn.primary:disabled{
  opacity:.58;
  cursor:not-allowed;
  transform:none;
  box-shadow:none;
}
.normal,
.loading{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
/* ============================================================
   BOT / STATUS
   ============================================================ */
.inline-status{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:9px;
  padding:9px 11px;
  border:1px solid rgba(245,158,11,.18);
  border-radius:10px;
  background:rgba(245,158,11,.07);
  color:#b45309;
  font-size:11.5px;
}
.inline-status[hidden]{
  display:none;
}
.inline-status i{
  color:var(--ct-orange);
}
.selected-bot{
  margin-top:7px;
  color:var(--ct-muted);
  font-size:11px;
}
.selected-bot b{
  color:#2563eb;
  font-weight:800;
}
/* ============================================================
   RESULT
   ============================================================ */
.create-result{
  margin-top:17px;
  padding:18px;
  border:1px solid rgba(34,197,94,.20);
  border-radius:15px;
  background:
    linear-gradient(
      135deg,
      rgba(34,197,94,.08),
      rgba(20,184,166,.045)
    );
  color:var(--ct-text);
  transition:
    background-color .25s ease,
    border-color .25s ease,
    color .25s ease;
}
.create-result[hidden]{
  display:none;
}
.create-result h2{
  margin:10px 0 5px;
  color:var(--ct-text);
  font-size:17px;
}
.create-result p{
  margin:0;
  color:var(--ct-muted);
  font-size:12.5px;
}
.result-icon{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:13px;
  background:
    linear-gradient(
      135deg,
      #22c55e,
      #14b8a6
    );
  color:#ffffff;
}
.result-url{
  display:flex;
  margin-top:13px;
}
.result-url input{
  flex:1 !important;
  border-radius:10px 0 0 10px !important;
}
.result-url button{
  width:46px;
  border:0;
  border-radius:0 10px 10px 0;
  background:
    linear-gradient(
      135deg,
      #2563eb,
      #7c3aed
    );
  color:#ffffff;
  cursor:pointer;
}
.result-actions{
  display:flex;
  gap:8px;
  margin-top:12px;
}
/* ============================================================
   DARK MODE — EXPLICIT PAGE SAFETY
   ============================================================ */
html[data-theme="dark"] .create-detail-page,
html.theme-dark .create-detail-page{
  background:#080d16;
  color:#f8fafc;
}
html[data-theme="dark"] .create-detail-page .create-card,
html.theme-dark .create-detail-page .create-card{
  background:#101722;
  border-color:rgba(255,255,255,.11);
}
html[data-theme="dark"] .create-detail-page .detail-title h1,
html.theme-dark .create-detail-page .detail-title h1{
  color:#f8fafc;
}
html[data-theme="dark"] .create-detail-page .detail-title p,
html.theme-dark .create-detail-page .detail-title p{
  color:#a8b5c7;
}
html[data-theme="dark"] .create-detail-page .back-create,
html.theme-dark .create-detail-page .back-create{
  color:#a8b5c7;
}
html[data-theme="dark"] .create-detail-page .field > label,
html.theme-dark .create-detail-page .field > label{
  color:#f8fafc;
}
html[data-theme="dark"] .create-detail-page .field > small,
html.theme-dark .create-detail-page .field > small{
  color:#a8b5c7;
}
html[data-theme="dark"] .create-detail-page .field label span,
html.theme-dark .create-detail-page .field label span{
  color:#8291a6;
}
html[data-theme="dark"] .create-detail-page input:not([type="radio"]):not([type="checkbox"]),
html[data-theme="dark"] .create-detail-page textarea,
html[data-theme="dark"] .create-detail-page select,
html.theme-dark .create-detail-page input:not([type="radio"]):not([type="checkbox"]),
html.theme-dark .create-detail-page textarea,
html.theme-dark .create-detail-page select{
  background:#0d1520;
  color:#f8fafc;
  border-color:rgba(255,255,255,.15);
}
html[data-theme="dark"] .create-detail-page input::placeholder,
html[data-theme="dark"] .create-detail-page textarea::placeholder,
html.theme-dark .create-detail-page input::placeholder,
html.theme-dark .create-detail-page textarea::placeholder{
  color:#8291a6;
}
html[data-theme="dark"] .create-detail-page select option,
html.theme-dark .create-detail-page select option{
  background:#0d1520;
  color:#f8fafc;
}
html[data-theme="dark"] .create-detail-page .type-switch a,
html.theme-dark .create-detail-page .type-switch a{
  background:#0d1520;
  color:#e2e8f0;
  border-color:rgba(255,255,255,.14);
}
html[data-theme="dark"] .create-detail-page .type-switch a.active,
html.theme-dark .create-detail-page .type-switch a.active{
  background:
    linear-gradient(
      135deg,
      rgba(37,99,235,.16),
      rgba(168,85,247,.10)
    );
  border-color:#4f8cff;
  color:#7da8ff;
}
html[data-theme="dark"] .create-detail-page .access-option > span,
html.theme-dark .create-detail-page .access-option > span{
  background:#0d1520;
  border-color:rgba(255,255,255,.14);
}
html[data-theme="dark"] .create-detail-page .access-option input:checked + span,
html.theme-dark .create-detail-page .access-option input:checked + span{
  background:
    linear-gradient(
      135deg,
      rgba(37,99,235,.16),
      rgba(168,85,247,.09)
    );
  border-color:#4f8cff;
}
html[data-theme="dark"] .create-detail-page .access-option b,
html.theme-dark .create-detail-page .access-option b{
  color:#f8fafc;
}
html[data-theme="dark"] .create-detail-page .access-option small,
html.theme-dark .create-detail-page .access-option small{
  color:#a8b5c7;
}
html[data-theme="dark"] .create-detail-page .price-box,
html.theme-dark .create-detail-page .price-box{
  background:
    linear-gradient(
      135deg,
      rgba(37,99,235,.10),
      rgba(168,85,247,.06)
    );
  border-color:rgba(96,165,250,.18);
}
html[data-theme="dark"] .create-detail-page .money-input > span,
html.theme-dark .create-detail-page .money-input > span{
  color:#a8b5c7;
}
html[data-theme="dark"] .create-detail-page .telegram-url > span,
html.theme-dark .create-detail-page .telegram-url > span{
  color:#38bdf8;
}
html[data-theme="dark"] .create-detail-page .selected-bot,
html.theme-dark .create-detail-page .selected-bot{
  color:#a8b5c7;
}
html[data-theme="dark"] .create-detail-page .selected-bot b,
html.theme-dark .create-detail-page .selected-bot b{
  color:#7da8ff;
}
html[data-theme="dark"] .create-detail-page .inline-status,
html.theme-dark .create-detail-page .inline-status{
  background:rgba(245,158,11,.10);
  border-color:rgba(245,158,11,.20);
  color:#fbbf24;
}
html[data-theme="dark"] .create-detail-page .create-actions,
html.theme-dark .create-detail-page .create-actions{
  border-color:rgba(255,255,255,.11);
}
html[data-theme="dark"] .create-detail-page .btn.secondary,
html.theme-dark .create-detail-page .btn.secondary{
  background:#111b28;
  color:#e2e8f0;
  border-color:rgba(255,255,255,.16);
}
html[data-theme="dark"] .create-detail-page .btn.secondary:hover,
html.theme-dark .create-detail-page .btn.secondary:hover{
  background:#182334;
  color:#ffffff;
  border-color:#4f8cff;
}
html[data-theme="dark"] .create-detail-page .create-result,
html.theme-dark .create-detail-page .create-result{
  background:
    linear-gradient(
      135deg,
      rgba(34,197,94,.12),
      rgba(20,184,166,.07)
    );
  border-color:rgba(52,211,153,.24);
  color:#f8fafc;
}
html[data-theme="dark"] .create-detail-page .create-result h2,
html.theme-dark .create-detail-page .create-result h2{
  color:#ffffff;
}
html[data-theme="dark"] .create-detail-page .create-result p,
html.theme-dark .create-detail-page .create-result p{
  color:#a8b5c7;
}
/* ============================================================
   MOBILE
   ============================================================ */
@media(max-width:700px){
  .create-detail-page .create-detail{
    width:calc(100% - 22px);
    padding:22px 0 48px;
  }
  .create-card{
    padding:20px;
    border-radius:18px;
  }
  .detail-icon{
    width:46px;
    height:46px;
    flex-basis:46px;
  }
  .detail-icon i{
    font-size:19px;
  }
  .detail-title h1{
    font-size:27px;
  }
  .detail-title p{
    font-size:12.5px;
  }
}
/* ============================================================
   SMALL MOBILE
   ============================================================ */
@media(max-width:520px){
  .create-detail-page .create-detail{
    width:calc(100% - 16px);
    padding-top:17px;
  }
  .create-card{
    padding:16px 13px;
    border-radius:16px;
  }
  .detail-title{
    gap:10px;
  }
  .detail-icon{
    width:42px;
    height:42px;
    flex-basis:42px;
    border-radius:12px;
  }
  .detail-icon i{
    font-size:17px;
  }
  .detail-title h1{
    font-size:23px;
  }
  .detail-title p{
    font-size:11.5px;
  }
  .field{
    margin-bottom:17px;
  }
  .create-detail-page input:not([type="radio"]):not([type="checkbox"]),
  .create-detail-page select{
    height:45px;
    font-size:13px;
  }
  .create-detail-page textarea{
    font-size:12.5px;
  }
  .access-grid{
    gap:7px;
  }
  .access-option > span{
    min-height:65px;
    padding:11px;
  }
  .access-option b{
    font-size:12.5px;
  }
  .access-option small{
    font-size:10.5px;
  }
  .create-actions{
    flex-direction:column-reverse;
    align-items:stretch;
  }
  .create-actions .btn{
    width:100%;
    min-height:46px;
  }
  .result-actions{
    flex-direction:column;
  }
  .result-actions .btn{
    width:100%;
  }
}
/* ============================================================
   VERY SMALL DEVICES
   ============================================================ */
@media(max-width:360px){
  .access-grid{
    grid-template-columns:1fr;
  }
  .detail-title h1{
    font-size:21px;
  }
  .create-card{
    padding:14px 11px;
  }
}
/* ============================================================
   ACCESSIBILITY / REDUCED MOTION
   ============================================================ */
@media(prefers-reduced-motion:reduce){
  .create-detail-page *,
  .create-detail-page *::before,
  .create-detail-page *::after{
    transition:none !important;
    animation:none !important;
  }
}
@media(hover:none){
  .create-detail-page .btn:hover,
  .create-detail-page .type-switch a:hover,
  .create-detail-page .access-option:hover > span{
    transform:none;
  }
}
