/* Theo Properties RC1.0.15.120 — Mobile & Tablet Account Centre SaaS Visual Polish Lock
   Baseline: RC1.0.15.119.
   Scope: Account Centre presentation only, <=1180px.
   No auth, routing, Supabase, workspace, identity-validation or security-flow changes. */

/* =========================================================
   SHARED MOBILE + TABLET ACCOUNT CENTRE — <=1180px
   ========================================================= */
@media (max-width:1180px){
  .theo-account-centre-backdrop{
    z-index:9400!important;
    background:rgba(7,18,29,.62)!important;
    backdrop-filter:blur(9px) saturate(112%)!important;
    -webkit-backdrop-filter:blur(9px) saturate(112%)!important;
  }

  .theo-account-centre{
    --account-navy:#17364d;
    --account-blue:#4f80b8;
    --account-gold:#b48135;
    --account-teal:#438a7b;
    --account-violet:#756daf;
    --account-line:#dfe8ec;
    position:relative!important;
    isolation:isolate!important;
    border:1px solid rgba(79,128,184,.16)!important;
    background:
      radial-gradient(circle at 94% -8%,rgba(79,128,184,.10),transparent 24%),
      radial-gradient(circle at 3% 104%,rgba(180,129,53,.08),transparent 28%),
      #fff!important;
    box-shadow:0 30px 86px rgba(7,18,29,.30),0 4px 15px rgba(7,18,29,.08)!important;
  }

  .theo-account-centre-head{
    overflow:hidden!important;
    background:
      linear-gradient(135deg,rgba(79,128,184,.070),rgba(255,255,255,.97) 46%,rgba(180,129,53,.055))!important;
    border-bottom:1px solid rgba(79,128,184,.13)!important;
  }
  .theo-account-centre-head::before{
    content:""!important;
    position:absolute!important;
    top:0!important;
    left:26px!important;
    width:82px!important;
    height:3px!important;
    border-radius:0 0 999px 999px!important;
    background:linear-gradient(90deg,#b48135,#dfbd82)!important;
    pointer-events:none!important;
  }
  .theo-account-centre-kicker{color:#a8752f!important}
  .theo-account-centre-head h2{color:#14334a!important;letter-spacing:-.035em!important}
  .theo-account-centre-head p{color:#6f8290!important;line-height:1.52!important}
  .theo-account-centre-close{
    flex:0 0 auto!important;
    border:1px solid #e0e8ec!important;
    background:linear-gradient(180deg,#fff,#f3f7f9)!important;
    color:#17364d!important;
    box-shadow:0 5px 14px rgba(19,45,67,.05)!important;
  }

  /* Profile identity card */
  .theo-account-profile{
    position:relative!important;
    overflow:hidden!important;
    border:1px solid rgba(79,128,184,.18)!important;
    background:
      radial-gradient(circle at 98% 0%,rgba(67,138,123,.075),transparent 30%),
      linear-gradient(135deg,rgba(79,128,184,.075),#fff 48%,rgba(180,129,53,.035))!important;
    box-shadow:0 12px 28px rgba(19,45,67,.052)!important;
  }
  .theo-account-profile::before{
    content:""!important;
    position:absolute!important;
    top:0!important;
    left:18px!important;
    right:18px!important;
    height:3px!important;
    border-radius:0 0 999px 999px!important;
    background:linear-gradient(90deg,#4f80b8 0%,#438a7b 56%,rgba(67,138,123,.16) 100%)!important;
    pointer-events:none!important;
  }
  .theo-account-avatar{
    background:linear-gradient(145deg,#102f45,#173f59)!important;
    color:#fff!important;
    border:1px solid rgba(255,255,255,.18)!important;
    box-shadow:0 10px 22px rgba(16,47,69,.17),inset 0 1px 0 rgba(255,255,255,.12)!important;
  }
  .theo-account-profile strong{color:#14334a!important;letter-spacing:-.018em!important}
  .theo-account-profile span{color:#70828f!important}
  .theo-account-status{
    border:1px solid rgba(67,138,123,.18)!important;
    background:linear-gradient(180deg,#effaf5,#e7f6ef)!important;
    color:#2c725f!important;
    box-shadow:0 4px 11px rgba(67,138,123,.06)!important;
  }

  /* Shared SaaS card treatment */
  .theo-account-card{
    --account-card-accent:#4f80b8;
    --account-card-rgb:79,128,184;
    position:relative!important;
    isolation:isolate!important;
    overflow:hidden!important;
    border:1px solid rgba(var(--account-card-rgb),.17)!important;
    background:linear-gradient(180deg,rgba(var(--account-card-rgb),.055),#fff 30%,#fff 100%)!important;
    box-shadow:0 14px 34px rgba(19,45,67,.052),0 2px 7px rgba(19,45,67,.02)!important;
  }
  .theo-account-grid>.theo-account-card:first-child{
    --account-card-accent:#4f80b8;
    --account-card-rgb:79,128,184;
  }
  .theo-account-grid>.theo-account-card:nth-child(2){
    --account-card-accent:#b48135;
    --account-card-rgb:180,129,53;
  }
  .theo-account-security{
    --account-card-accent:#756daf;
    --account-card-rgb:117,109,175;
  }
  .theo-account-card::before{
    content:""!important;
    position:absolute!important;
    z-index:2!important;
    top:0!important;
    left:18px!important;
    right:18px!important;
    height:3px!important;
    border-radius:0 0 999px 999px!important;
    background:linear-gradient(90deg,var(--account-card-accent),rgba(var(--account-card-rgb),.16))!important;
    pointer-events:none!important;
  }
  .theo-account-card h3{
    position:relative!important;
    color:#17364d!important;
    letter-spacing:-.022em!important;
  }
  .theo-account-card h3::before{
    content:""!important;
    display:inline-block!important;
    width:7px!important;
    height:7px!important;
    margin:0 8px 2px 0!important;
    border-radius:50%!important;
    background:var(--account-card-accent)!important;
    box-shadow:0 0 0 4px rgba(var(--account-card-rgb),.10)!important;
  }
  .theo-account-card>p{color:#718390!important;line-height:1.48!important}

  /* Workspace access action */
  .theo-account-workspace{
    position:relative!important;
    overflow:hidden!important;
    border:1px solid rgba(79,128,184,.20)!important;
    background:linear-gradient(135deg,rgba(79,128,184,.085),#fff 64%)!important;
    color:#17364d!important;
    box-shadow:0 7px 18px rgba(19,45,67,.035)!important;
  }
  .theo-account-workspace::before{
    content:""!important;
    position:absolute!important;
    top:10px!important;
    right:10px!important;
    width:6px!important;
    height:6px!important;
    border-radius:50%!important;
    background:#4f80b8!important;
    box-shadow:0 0 0 3px rgba(79,128,184,.10)!important;
  }
  .theo-account-workspace small{color:#758895!important;padding-right:12px!important}
  .theo-account-workspace:hover{
    border-color:rgba(79,128,184,.42)!important;
    background:linear-gradient(135deg,rgba(79,128,184,.13),#fff 66%)!important;
  }

  /* Form surface */
  .theo-account-form label{color:#4f6372!important}
  .theo-account-form input,
  .theo-account-form select{
    min-height:45px!important;
    border:1px solid #d6e1e6!important;
    background:linear-gradient(180deg,#fff,#fbfdfe)!important;
    color:#17364d!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.82),0 2px 5px rgba(19,45,67,.018)!important;
  }
  .theo-account-form input:hover,
  .theo-account-form select:hover{border-color:#c2d1d9!important}
  .theo-account-form input:focus,
  .theo-account-form select:focus{
    outline:0!important;
    border-color:#b48135!important;
    box-shadow:0 0 0 3px rgba(180,129,53,.10),0 4px 12px rgba(19,45,67,.035)!important;
  }
  .theo-account-form-message{color:#5d7d70!important}

  /* Action buttons */
  .theo-account-btn{
    min-height:42px!important;
    border-radius:9px!important;
    background:linear-gradient(135deg,#17364d,#244d6a 72%,#315f7f)!important;
    color:#fff!important;
    box-shadow:0 8px 19px rgba(23,54,77,.13)!important;
  }
  .theo-account-btn.secondary{
    border:1px solid rgba(79,128,184,.22)!important;
    background:linear-gradient(135deg,rgba(79,128,184,.085),#fff)!important;
    color:#2d5b7d!important;
    box-shadow:0 6px 14px rgba(79,128,184,.045)!important;
  }
  .theo-account-btn.danger{
    border:1px solid #f0d0cb!important;
    background:linear-gradient(180deg,#fff7f5,#fff0ed)!important;
    color:#963f35!important;
    box-shadow:none!important;
  }
  .theo-account-actions>span{
    color:#748692!important;
    font-size:12px!important;
    line-height:1.35!important;
  }

  .theo-account-note{
    border:1px solid rgba(79,128,184,.12)!important;
    background:linear-gradient(135deg,rgba(79,128,184,.055),#fff)!important;
  }
  .theo-account-note.warning{
    border-color:rgba(180,129,53,.18)!important;
    background:linear-gradient(135deg,rgba(180,129,53,.09),#fffaf2)!important;
  }
  .theo-account-note.danger{
    border-color:#f0d0cb!important;
    background:linear-gradient(135deg,#fff4f1,#fff)!important;
  }
}

/* =========================================================
   TABLET / IPAD — 701px to 1180px
   ========================================================= */
@media (min-width:701px) and (max-width:1180px){
  .theo-account-centre-backdrop{padding:20px!important;place-items:center!important}
  .theo-account-centre{
    width:min(980px,100%)!important;
    max-height:calc(100dvh - 40px)!important;
    border-radius:22px!important;
  }
  .theo-account-centre-head{padding:25px 28px 19px!important}
  .theo-account-centre-head::before{left:28px!important}
  .theo-account-centre-body{padding:24px 28px 30px!important;gap:19px!important}
  .theo-account-profile{padding:19px 21px!important}

  /* Give the data-heavy identity card more useful width on tablet. */
  .theo-account-grid{
    grid-template-columns:minmax(250px,.72fr) minmax(0,1.28fr)!important;
    gap:18px!important;
    align-items:stretch!important;
  }
  .theo-account-card{padding:21px!important;border-radius:17px!important}
  .theo-account-grid>.theo-account-card:first-child{min-width:0!important}
  .theo-account-grid>.theo-account-card:nth-child(2){min-width:0!important}
  .theo-account-form-row{gap:13px!important}
  .theo-account-security{padding:20px 21px!important}
}

/* Compact tablet / split-view: preserve hierarchy, remove cramped two-column form. */
@media (min-width:701px) and (max-width:860px){
  .theo-account-centre{max-height:calc(100dvh - 28px)!important}
  .theo-account-centre-backdrop{padding:14px!important}
  .theo-account-grid{grid-template-columns:1fr!important}
  .theo-account-form-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* =========================================================
   MOBILE — <=700px
   ========================================================= */
@media (max-width:700px){
  .theo-account-centre-backdrop{
    padding:0!important;
    place-items:end center!important;
  }
  .theo-account-centre{
    width:100%!important;
    max-height:94dvh!important;
    border-radius:22px 22px 0 0!important;
  }
  .theo-account-centre-head{
    padding:21px 18px 16px!important;
  }
  .theo-account-centre-head::before{
    left:18px!important;
    width:66px!important;
  }
  .theo-account-centre-head h2{font-size:24px!important}
  .theo-account-centre-head p{font-size:13px!important;max-width:92%!important}
  .theo-account-centre-close{width:38px!important;height:38px!important;border-radius:10px!important}
  .theo-account-centre-body{padding:17px 16px 24px!important;gap:14px!important}

  .theo-account-profile{
    grid-template-columns:auto minmax(0,1fr)!important;
    gap:13px!important;
    padding:16px!important;
    border-radius:15px!important;
  }
  .theo-account-profile::before{left:15px!important;right:15px!important}
  .theo-account-avatar{width:50px!important;height:50px!important;border-radius:14px!important}
  .theo-account-profile strong{font-size:16px!important;overflow-wrap:anywhere!important}
  .theo-account-profile span{font-size:12px!important;overflow-wrap:anywhere!important}
  .theo-account-profile>.theo-account-status{grid-column:2!important;margin-top:3px!important}

  .theo-account-grid{grid-template-columns:1fr!important;gap:14px!important}
  .theo-account-card{padding:17px!important;border-radius:15px!important}
  .theo-account-card::before{left:15px!important;right:15px!important}
  .theo-account-card h3{font-size:16px!important}
  .theo-account-card>p{font-size:12.5px!important;margin-bottom:14px!important}
  .theo-account-workspace{min-height:50px!important;padding:13px 14px!important}
  .theo-account-workspace small{font-size:10.5px!important}

  .theo-account-form{gap:12px!important}
  .theo-account-form-row{grid-template-columns:1fr!important;gap:11px!important}
  .theo-account-form input,
  .theo-account-form select{min-height:46px!important;padding:11px 12px!important;border-radius:10px!important}
  .theo-account-actions{gap:8px!important}
  .theo-account-actions .theo-account-btn{width:100%!important;justify-content:center!important;text-align:center!important}
  .theo-account-actions>span{width:100%!important}

  .theo-account-security{
    align-items:stretch!important;
    gap:15px!important;
    padding:17px!important;
  }
  .theo-account-security .theo-account-actions{width:100%!important}
  .theo-account-security .theo-account-btn{width:100%!important}
  .theo-account-continuation{justify-content:stretch!important}
  .theo-account-continuation .theo-account-btn{width:100%!important;text-align:center!important}
}

@media (max-width:360px){
  .theo-account-centre-head p{max-width:100%!important}
  .theo-account-centre-body{padding-left:13px!important;padding-right:13px!important}
  .theo-account-card{padding:15px!important}
  .theo-account-workspace{align-items:flex-start!important;flex-direction:column!important;gap:5px!important}
}

@media (max-width:1180px) and (prefers-reduced-motion:reduce){
  .theo-account-centre,
  .theo-account-profile,
  .theo-account-card,
  .theo-account-workspace,
  .theo-account-btn{transition:none!important}
}
