/* CallSliven — profile page (loads after base.css).
   Also loaded by submit, my-reports, admin and super-admin for the shared card, field and message styles.
   The email-change and delete-account styles below are scoped to the profile page's own ids
   (#email-card, #del-card, #deleted), so short class names like .box or .note never leak into those pages. */
body{background:
  radial-gradient(45% 35% at 100% 0%, rgba(63,174,95,.08), transparent 70%),
  radial-gradient(40% 30% at 0% 100%, rgba(63,174,95,.06), transparent 70%), #fff}
.page{padding:clamp(120px,12vw,150px) 0 clamp(70px,9vw,110px)}
.wrap.narrow{max-width:760px}
.page-head{display:flex;flex-direction:column;gap:10px;margin-bottom:28px}
.page-head h1{font-size:clamp(34px,4.4vw,48px)}
.page-head .lead{color:var(--muted);max-width:620px}

.card{background:#fff;border:1px solid var(--line);border-radius:24px;padding:clamp(22px,3.6vw,36px);box-shadow:var(--shadow);animation:rise .55s var(--ease) both}
.card + .card{margin-top:18px;animation-delay:.08s}
@keyframes rise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}

/* fields (same look as auth.html) */
form{display:flex;flex-direction:column;gap:18px}
.row{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.field{display:flex;flex-direction:column;gap:6px}
.label{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-size:14px;font-weight:700}
.label .opt{font-weight:500;color:var(--muted);font-size:13px}
.control{position:relative;display:flex;align-items:center}
.control > svg{position:absolute;left:15px;width:18px;height:18px;color:#8A998E;pointer-events:none;transition:color .3s}
.input{width:100%;min-height:52px;padding:0 16px 0 44px;border-radius:14px;border:1.5px solid var(--line);background:#fff;outline:0;font:inherit;font-size:15.5px;color:var(--ink);
  transition:border-color .3s, box-shadow .35s var(--ease), background .3s}
.input::placeholder{color:#9AA79E}
.input:hover{border-color:#C3D3C2}
.input:focus{border-color:var(--g-500);box-shadow:0 0 0 4px rgba(63,174,95,.16)}
.control:focus-within > svg{color:var(--g-700)}
.input.static{display:flex;align-items:center;background:var(--g-50);color:var(--muted);word-break:break-all}
.field.invalid .input{border-color:var(--danger);background:#FFFBFA}
.field.invalid .input:focus{box-shadow:0 0 0 4px rgba(217,63,51,.14)}
.field.changed .input{border-color:#9FD3AC}
.err{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:var(--danger);max-height:0;overflow:hidden;opacity:0;transition:max-height .3s var(--ease), opacity .3s}
.err svg{width:15px;height:15px;flex:none}
.field.invalid .err{max-height:40px;opacity:1}
.hint{font-size:13px;color:var(--muted)}
.shake{animation:shake .45s}
@keyframes shake{20%,60%{transform:translateX(-6px)}40%,80%{transform:translateX(6px)}}

.alert{display:none;align-items:flex-start;gap:10px;padding:12px 14px;border-radius:14px;font-size:14px;font-weight:600;background:#FCEDEB;color:#C8372C}
.alert.show{display:flex;animation:rise .4s var(--ease)}
.alert svg{width:18px;height:18px;flex:none;margin-top:1px}

.actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:4px}
.btn[disabled]{opacity:.55;cursor:not-allowed;transform:none!important;box-shadow:none!important}
.btn .spin{display:none;width:18px;height:18px;border-radius:50%;border:2.5px solid rgba(255,255,255,.4);border-top-color:#fff;animation:spin .8s linear infinite}
.btn.loading .spin{display:block}
@keyframes spin{to{transform:rotate(360deg)}}
.btn-ghost{background:none;color:var(--muted)}
.btn-ghost:hover{background:var(--g-50);color:var(--g-700)}
.btn-outline{background:#fff;color:var(--danger);border:1.5px solid #F0C9C5;min-height:46px;padding:0 20px;font-size:15px}
.btn-outline:hover{border-color:var(--danger);box-shadow:0 0 18px rgba(217,63,51,.18)}
.link{color:var(--g-700);font-weight:700;font-size:14.5px}
.link:hover{text-decoration:underline;text-underline-offset:3px}

.skeleton-wrap{display:flex;flex-direction:column;gap:14px}
.skeleton{height:52px;border-radius:14px;background:linear-gradient(90deg,var(--g-50),var(--g-100),var(--g-50));background-size:200% 100%;animation:shimmer 1.4s linear infinite}
.skeleton.short{width:40%;height:48px;border-radius:999px}
@keyframes shimmer{to{background-position:-200% 0}}

.facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0}
.facts div{padding:14px 16px;border-radius:14px;background:var(--g-50);border:1px solid var(--line)}
.facts dt{font-size:13px;color:var(--muted);font-weight:600}
.facts dd{margin:2px 0 0;font-weight:700;font-size:15.5px}
.meta-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin-top:18px}

.toast{position:fixed;left:50%;bottom:24px;z-index:80;transform:translate(-50%,20px);opacity:0;pointer-events:none;
  padding:12px 18px;border-radius:14px;background:var(--g-900);color:#fff;font-weight:600;font-size:14.5px;box-shadow:0 18px 40px -16px rgba(0,0,0,.5);
  transition:opacity .35s, transform .45s var(--ease)}
.toast.show{opacity:1;transform:translate(-50%,0)}

/* ═════════ Profile page only: email change and deleting the profile ═════════ */

/* card heading with an icon */
:is(#email-card,#del-card) .card-head{display:flex;align-items:flex-start;gap:14px;margin-bottom:20px}
:is(#email-card,#del-card) .card-ico{width:44px;height:44px;flex:none;border-radius:14px;display:grid;place-items:center;color:var(--g-700);background:var(--g-100)}
:is(#email-card,#del-card) .card-ico svg{width:22px;height:22px}
:is(#email-card,#del-card) .card-head h2{font-size:22px;line-height:1.25;letter-spacing:-.01em}
:is(#email-card,#del-card) .card-sub{margin-top:4px;color:var(--muted);font-size:15px}
:is(#email-card,#del-card) > .alert.show,#form-delete .alert.show{margin-bottom:2px}
#email-card > .alert.show{margin-bottom:18px}
#em-alert.info{background:var(--g-100);color:var(--g-800)}
#email-card .actions,#form-delete .actions{align-items:center}

/* email */
#email-card .em-current{display:flex;gap:10px;align-items:stretch}
#email-card .em-current .control{flex:1;min-width:0}
#email-card .input.static{color:var(--ink);font-weight:600}
#email-card .em-step:not([hidden]){animation:rise .45s var(--ease)}
#email-card .btn-soft{min-height:52px;padding:0 22px;background:var(--g-50);color:var(--g-700);border:1.5px solid var(--g-200);white-space:nowrap}
#email-card .btn-soft:hover{border-color:var(--g-500);box-shadow:0 0 18px rgba(63,174,95,.28)}
#email-card .link-btn{border:0;background:none;padding:8px 4px;margin-left:auto;font:inherit;font-size:14px;font-weight:700;color:var(--g-700);cursor:pointer}
#email-card .link-btn:hover:not([disabled]){text-decoration:underline;text-underline-offset:3px}
#email-card .link-btn[disabled]{color:var(--muted);font-weight:600;cursor:default}

/* 6-digit codes (same look as auth.html) */
#email-card .otp{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;max-width:440px}
#email-card .otp input{width:100%;min-height:58px;padding:0;text-align:center;font:inherit;font-size:25px;font-weight:600;font-variant-numeric:tabular-nums;border-radius:14px;border:1.5px solid var(--line);background:#fff;outline:0;color:var(--ink);caret-color:var(--g-700);
  transition:border-color .3s, box-shadow .35s var(--ease), background .3s, transform .35s var(--ease)}
#email-card .otp input:nth-child(4){margin-left:8px}
#email-card .otp input:hover{border-color:#C3D3C2}
#email-card .otp input:focus{border-color:var(--g-500);box-shadow:0 0 0 4px rgba(63,174,95,.16);transform:translateY(-2px)}
#email-card .otp input.filled{border-color:#9FD3AC;background:var(--g-50);animation:pf-digit .3s var(--ease)}
@keyframes pf-digit{0%{transform:scale(.9)}60%{transform:scale(1.06)}100%{transform:scale(1)}}
#email-card .otp input:disabled{background:#F3F5F3;color:#9AA79E;cursor:not-allowed}
#email-card .field.invalid .otp input{border-color:var(--danger);background:#FFFBFA}
#email-card .otp.ok input,#email-card .otp.ok input:disabled{border-color:var(--g-700);background:var(--g-100);color:var(--g-800);animation:pf-wave .5s var(--ease) both}
#email-card .otp.ok input:nth-child(2){animation-delay:.04s}
#email-card .otp.ok input:nth-child(3){animation-delay:.08s}
#email-card .otp.ok input:nth-child(4){animation-delay:.12s}
#email-card .otp.ok input:nth-child(5){animation-delay:.16s}
#email-card .otp.ok input:nth-child(6){animation-delay:.2s}
@keyframes pf-wave{50%{transform:translateY(-6px)}}
#email-card .code-field .label{display:block;font-weight:600;line-height:1.45}
#email-card .code-field .label b{font-weight:700;word-break:break-all}
#email-card .code-field.done .label::after{content:"";display:inline-block;vertical-align:-4px;width:20px;height:20px;margin-left:8px;border-radius:50%;
  background:var(--g-700) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4 10-10'/%3E%3C/svg%3E") center/11px no-repeat}

/* delete */
#del-card{border-color:#F3D6D2}
#del-card .card-ico{color:var(--danger);background:#FCEDEB}
#del-card .del-list{margin:0 0 20px;padding:0;list-style:none;display:flex;flex-direction:column;gap:10px}
#del-card .del-list li{position:relative;padding-left:26px;font-size:15px;color:var(--muted)}
#del-card .del-list li::before{content:"";position:absolute;left:4px;top:.62em;width:8px;height:8px;border-radius:50%;background:#E8A39C}
#del-staff{padding:12px 14px;border-radius:14px;background:var(--g-50);border:1px solid var(--line);font-size:14.5px;color:var(--muted)}
#form-delete{padding-top:18px;border-top:1px solid var(--line)}
#form-delete .has-toggle .input{padding-right:50px}
#form-delete .eye{position:absolute;right:6px;width:40px;height:40px;border:0;border-radius:10px;background:none;display:grid;place-items:center;color:#7A8A7E;transition:background .3s, color .3s}
#form-delete .eye:hover{background:var(--g-50);color:var(--g-700)}
#form-delete .eye svg{width:19px;height:19px}
#form-delete .eye .off{display:none}
#form-delete .eye[aria-pressed="true"] .on{display:none}
#form-delete .eye[aria-pressed="true"] .off{display:block}
#form-delete .check{display:flex;align-items:flex-start;gap:12px;font-size:14.5px;color:var(--ink);cursor:pointer}
#form-delete .check input{position:absolute;opacity:0;width:1px;height:1px}
#form-delete .box{width:22px;height:22px;flex:none;margin-top:1px;border-radius:7px;border:1.5px solid #B9C7BC;background:#fff;display:grid;place-items:center;transition:background .3s, border-color .3s, box-shadow .3s}
#form-delete .box svg{width:14px;height:14px;color:#fff;transform:scale(0);transition:transform .3s var(--ease)}
#form-delete .check input:checked + .box{background:var(--danger);border-color:var(--danger)}
#form-delete .check input:checked + .box svg{transform:scale(1)}
#form-delete .check input:focus-visible + .box{box-shadow:0 0 0 4px rgba(217,63,51,.2)}
#form-delete .field.invalid .box{border-color:var(--danger)}
#del-open{background:#fff;color:var(--danger);border:1.5px solid #F0C9C5}
#del-open:hover{border-color:var(--danger);background:#FFF8F7;box-shadow:0 0 18px rgba(217,63,51,.18)}
#form-delete .btn-danger{background:linear-gradient(135deg, #E0675D, var(--danger) 60%, #B12E24);color:#fff;box-shadow:0 12px 28px -12px rgba(200,55,44,.65)}
#form-delete .btn-danger:hover{transform:translateY(-2px);box-shadow:0 18px 34px -14px rgba(200,55,44,.8)}

/* after deleting */
#deleted{display:flex;flex-direction:column;align-items:center;text-align:center;gap:14px;padding-top:44px;padding-bottom:44px}
#deleted[hidden]{display:none}
#deleted h2{font-size:clamp(28px,3.4vw,36px)}
#deleted h2:focus{outline:0}
#deleted p{max-width:460px;color:var(--muted)}
#deleted .btn{margin-top:8px}
#deleted .done-ico{position:relative;width:84px;height:84px;border-radius:50%;display:grid;place-items:center;color:#fff;background:linear-gradient(140deg, var(--g-500), var(--g-700));
  box-shadow:0 18px 40px -16px rgba(31,122,58,.8);animation:pf-pop .6s var(--ease)}
#deleted .done-ico::before{content:"";position:absolute;inset:-10px;border-radius:50%;border:2px solid var(--g-200);animation:pf-ring 2.4s ease-out infinite}
#deleted .done-ico svg{width:36px;height:36px}
@keyframes pf-ring{0%{transform:scale(.9);opacity:1}100%{transform:scale(1.25);opacity:0}}
@keyframes pf-pop{0%{transform:scale(.6);opacity:0}60%{transform:scale(1.06)}100%{transform:scale(1);opacity:1}}

@media (max-width:600px){
  .row,.facts{grid-template-columns:1fr}
  .actions .btn{flex:1 1 100%}
  #email-card .link-btn{margin-left:0}
  #email-card .em-current{flex-direction:column}
  #email-card .otp{gap:6px}
  #email-card .otp input{min-height:50px;font-size:21px;border-radius:12px}
  #email-card .otp input:nth-child(4){margin-left:4px}
}
@media (prefers-reduced-motion:reduce){
  .card,.skeleton,.alert.show{animation:none}
  #email-card .em-step,#email-card .otp input,#deleted .done-ico,#deleted .done-ico::before{animation:none!important}
}