  :root{
    --app-bg:#f6f6f4;
    --sheet:#ffffff;
    --card:#e7f3e3;
    --card-2:#dff1da;
    --card-3:#edf7ea;
    --text:#171717;
    --muted:#5f6b63;
    --muted2:#768277;
    --green:#2f7d32;
    --green-strong:#1f6b25;
    --danger:#c94040;
    --danger-bg:#fff1f1;
    --danger-line:rgba(201,64,64,.22);
    --line:rgba(31,64,35,.10);
    --line-soft:rgba(31,64,35,.07);
    --shadowSoft:0 14px 34px rgba(23,23,23,.08);
    --focus:0 0 0 4px rgba(47,125,50,.18);
  }

  *{box-sizing:border-box;}
  html,body{height:100%;}

  body{
    margin:0;
    background:var(--app-bg);
    color:var(--text);
    overflow-x:hidden;
    -webkit-tap-highlight-color:transparent;
  }

  body::before,
  .orb{
    display:none;
  }

  .dashboard,
  .main{
    position:relative;
    min-height:100vh;
    z-index:auto!important;
    background:var(--app-bg);
  }

  .main{
    min-width:0;
    display:flex;
    flex-direction:column;
  }

  .topbar{
    background:var(--app-bg);
    border-bottom:1px solid var(--line-soft);
  }

  .topbar-left h1{
    color:var(--text);
    font-weight:900;
    letter-spacing:-.05em;
  }

  .topbar-left p{
    color:var(--muted);
  }

  .sidebar-toggle{
    width:44px;
    height:44px;
    border-radius:16px;
    border:1px solid var(--line);
    background:var(--card-3);
    color:var(--text);
    display:grid;
    place-items:center;
    cursor:pointer;
    font-weight:900;
    box-shadow:0 8px 22px rgba(23,23,23,.04);
  }

  .sidebar-toggle:hover{
    background:var(--card-2);
  }

  .avatar-chip{
    display:inline-flex;
    align-items:center;
    gap:10px;
    min-height:40px;
    padding:0 14px;
    border-radius:999px;
    border:1px solid var(--line);
    background:var(--card-3);
    color:var(--text);
    font-size:12px;
    font-weight:900;
  }

  .avatar{
    width:28px;
    height:28px;
    border-radius:999px;
    background:var(--card-2);
    border:1px solid rgba(47,125,50,.14);
    display:grid;
    place-items:center;
    font-size:11px;
    font-weight:900;
    color:var(--green);
    flex-shrink:0;
  }

  .settings-layout{
    display:grid;
    grid-template-columns:1fr;
    gap:16px;
    align-items:start;
  }

  .settings-nav{
  border-radius:26px;
  background:#fff;
  border:1px solid var(--line);
  box-shadow:var(--shadowSoft);
  padding:14px;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
}

.settings-tab{
  width:100%;
  min-height:106px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  color:#173326;
  font:inherit;
  font-size:12px;
  font-weight:900;
  text-align:center;
  padding:12px 8px;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  transition:.15s ease;
}

.settings-tab::before{
  content:"";
  width:48px;
  height:48px;
  border-radius:999px;
  background:var(--card-3);
  display:grid;
  place-items:center;
  font-size:22px;
  font-weight:900;
  color:var(--green);
}

.settings-tab:nth-child(1)::before{content:"🎨";}
.settings-tab:nth-child(2)::before{content:"👤";}
.settings-tab:nth-child(3)::before{content:"🛡️";}
.settings-tab:nth-child(4)::before{content:"💳";}
.settings-tab:nth-child(5)::before{content:"🗑️";}

.settings-tab:hover{
  transform:translateY(-1px);
  background:var(--card-3);
}

.settings-tab.active{
  background:#fff;
  color:#173326;
  border-color:var(--line);
  box-shadow:none;
}

.settings-tab:nth-child(5){
  grid-column:2 / 4;
  min-height:106px;
  background:var(--green);
  color:#fff;
  border-color:rgba(47,125,50,.22);
  border-radius:18px;
  box-shadow:0 12px 24px rgba(47,125,50,.16);
}

.settings-tab:nth-child(5)::before{
  background:rgba(255,255,255,.22);
  color:#fff;
  font-size:24px;
}

.settings-tab:nth-child(5):hover{
  background:var(--green-strong);
}

@media(max-width:760px){
  .settings-nav{
    grid-template-columns:repeat(3,1fr);
    gap:16px;
    padding:14px;
  }

  .settings-tab{
    min-height:106px;
    border-radius:14px;
    font-size:12px;
  }

  .settings-tab:nth-child(5){
    grid-column:2 / 4;
  }
}

@media(max-width:380px){
  .settings-nav{
    gap:10px;
    padding:12px;
  }

  .settings-tab{
    min-height:96px;
    font-size:11px;
  }

  .settings-tab::before{
    width:42px;
    height:42px;
    font-size:19px;
  }
}

  .panel{
    position:relative;
    overflow:hidden;
    border-radius:26px;
    background:#fff;
    border:1px solid var(--line);
    box-shadow:var(--shadowSoft);
  }

  .panel::before{
    display:none;
  }

  .panel-head{
    position:relative;
    z-index:1;
    padding:18px 18px 14px;
    border-bottom:1px solid var(--line-soft);
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
  }

  .panel-title{
    margin:0;
    font-size:18px;
    font-weight:900;
    letter-spacing:-.04em;
    color:var(--text);
  }

  .panel-sub{
    margin-top:5px;
    color:var(--muted);
    font-size:13px;
    line-height:1.55;
  }

  .panel-body{
    position:relative;
    z-index:1;
    padding:18px;
    display:grid;
    gap:16px;
  }

  .section-grid{
    display:grid;
    grid-template-columns:1fr;
    gap:14px;
  }

  .two-col{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
  }

  label{
    display:block;
    margin:0 0 8px;
    color:var(--muted2);
    font-size:11px;
    font-weight:900;
    letter-spacing:.06em;
    text-transform:uppercase;
  }

  .field-wrap{
    position:relative;
  }

  .field{
    width:100%;
    min-height:48px;
    border-radius:16px;
    border:1px solid var(--line);
    background:#fff;
    color:var(--text);
    padding:14px;
    font:inherit;
    outline:none;
    transition:.18s ease;
  }

  .field.with-icon{
    padding-right:44px;
  }

  .field::placeholder{
    color:rgba(95,107,99,.62);
  }

  .field:focus{
    border-color:rgba(47,125,50,.35);
    box-shadow:var(--focus);
  }

  .field.errorLine{
    border-color:rgba(201,64,64,.45)!important;
    box-shadow:0 0 0 4px rgba(201,64,64,.10)!important;
  }

  select.field,
  select.field option,
  .dark-select,
  .dark-select option{
    background:#fff;
    color:var(--text);
    color-scheme:light;
  }

  .field-icon-btn{
    position:absolute;
    right:10px;
    top:50%;
    transform:translateY(-50%);
    width:30px;
    height:30px;
    border:none;
    border-radius:999px;
    background:var(--card-3);
    color:var(--green);
    display:grid;
    place-items:center;
    cursor:pointer;
    padding:0;
  }

  .field-icon-btn svg{
    width:16px;
    height:16px;
    display:block;
  }

  .swatches{
    display:grid;
    grid-template-columns:repeat(8,1fr);
    gap:8px;
  }

  .swatch{
    height:24px;
    border-radius:8px;
    border:1px solid var(--line);
    cursor:pointer;
    position:relative;
    transition:.12s ease;
  }

  .swatch:hover{
    transform:translateY(-1px);
  }

  .swatch.active{
    box-shadow:0 0 0 2px #fff,0 0 0 5px rgba(47,125,50,.18);
  }

  .color-row{
    display:grid;
    grid-template-columns:1fr 110px;
    gap:12px;
    align-items:end;
  }

  .color-readout{
    min-height:46px;
    border-radius:16px;
    border:1px solid var(--line);
    background:var(--card-3);
    padding:8px;
    display:flex;
    align-items:center;
    gap:10px;
  }

  .color-chip{
    width:30px;
    height:30px;
    border-radius:10px;
    border:1px solid var(--line);
    flex-shrink:0;
  }

  .color-code{
    font-size:12px;
    color:var(--text);
    font-weight:900;
    letter-spacing:.03em;
  }

  .upload-box,
  .brand-preview,
  .stat{
    border:1px solid var(--line);
    background:var(--card-3);
    border-radius:20px;
  }

  .upload-box{
    padding:14px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    flex-wrap:wrap;
  }

  .upload-title,
  .toggle-title{
    font-size:14px;
    font-weight:900;
    margin-bottom:4px;
    color:var(--text);
  }

  .upload-sub,
  .toggle-sub,
  .password-hint,
  .preview-sub{
    font-size:12px;
    color:var(--muted);
    line-height:1.5;
  }

  .upload-btn{
    min-height:38px;
    padding:0 14px;
    border-radius:14px;
    border:1px solid rgba(47,125,50,.14);
    background:#fff;
    color:var(--green);
    font:inherit;
    font-size:12px;
    font-weight:900;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    flex-shrink:0;
  }

  .toggle-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:14px 0 0;
    border-top:1px solid var(--line-soft);
  }

  .switch{
    position:relative;
    width:46px;
    height:28px;
    flex-shrink:0;
  }

  .switch input{
    position:absolute;
    inset:0;
    opacity:0;
    cursor:pointer;
  }

  .switch-ui{
    width:100%;
    height:100%;
    border-radius:999px;
    background:#eef1eb;
    border:1px solid var(--line);
    position:relative;
    transition:.2s ease;
  }

  .switch-ui::after{
    content:"";
    position:absolute;
    top:3px;
    left:3px;
    width:20px;
    height:20px;
    border-radius:999px;
    background:#fff;
    box-shadow:0 4px 10px rgba(23,23,23,.08);
    transition:.2s ease;
  }

  .switch input:checked + .switch-ui{
    background:var(--card-2);
    border-color:rgba(47,125,50,.22);
  }

  .switch input:checked + .switch-ui::after{
    left:21px;
    background:var(--green);
  }

  .row{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:2px;
  }

  .btn{
    min-height:44px;
    border:1px solid var(--line);
    background:#fff;
    color:var(--text);
    padding:12px 16px;
    border-radius:16px;
    cursor:pointer;
    font:inherit;
    font-size:13px;
    font-weight:900;
    text-align:center;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    transition:.15s ease;
  }

  .btn:hover{
    background:var(--card-3);
  }

  .btn:active{
    transform:translateY(1px);
  }

  .btn:focus,
  .sidebar-toggle:focus,
  .settings-tab:focus,
  .field:focus{
    outline:none;
    box-shadow:var(--focus);
  }

  .btn[disabled]{
    opacity:.55;
    cursor:not-allowed;
  }

  .btn-primary{
    border-color:rgba(47,125,50,.16);
    background:var(--green);
    color:#fff;
  }

  .btn-primary:hover{
    background:var(--green-strong);
  }

  .btn-dark{
    background:#fff;
    color:var(--text);
  }

  .btn-danger{
    border-color:var(--danger-line);
    background:var(--danger-bg);
    color:#9f1f1f;
  }

  .brand-preview{
    display:flex;
    align-items:center;
    gap:12px;
    padding:12px;
  }

  .logo-thumb,
  .logo-fallback{
    width:56px;
    height:56px;
    border-radius:16px;
    border:1px solid var(--line);
    background:#fff;
    flex-shrink:0;
  }

  .logo-thumb{
    object-fit:contain;
    padding:8px;
    display:none;
  }

  .logo-fallback{
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:12px;
    color:var(--muted);
  }

  .preview-meta{
    min-width:0;
  }

  .preview-title{
    font-size:14px;
    font-weight:900;
    line-height:1.3;
    color:var(--text);
    word-break:break-word;
  }

  .stat-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
  }

  .stat{
    padding:12px;
  }

  .stat-label{
    color:var(--muted2);
    font-size:11px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.05em;
  }

  .stat-value{
    margin-top:6px;
    font-size:16px;
    font-weight:900;
    line-height:1.25;
    color:var(--text);
  }

  .danger-box{
    border:1px solid var(--danger-line);
    background:var(--danger-bg);
    border-radius:20px;
    padding:14px;
  }

  .danger-title{
    color:#9f1f1f;
    font-size:14px;
    font-weight:900;
    margin-bottom:6px;
  }

  .danger-copy{
    color:#9f1f1f;
    font-size:12px;
    line-height:1.6;
  }

  .toast{
    position:fixed;
    bottom:18px;
    left:50%;
    transform:translateX(-50%);
    background:#172118;
    border:1px solid rgba(255,255,255,.12);
    border-radius:999px;
    padding:11px 16px;
    box-shadow:0 12px 35px rgba(0,0,0,.18);
    color:#fff;
    font-size:12px;
    display:none;
    gap:10px;
    align-items:center;
    max-width:calc(100% - 24px);
    z-index:2000;
  }

  .toast-dot{
    width:8px;
    height:8px;
    border-radius:999px;
    background:var(--green);
    flex-shrink:0;
  }

  .hidden{
    display:none!important;
  }

  .overlay{
    z-index:9000!important;
  }

  .sidebar,
  .sidebar.open{
    z-index:10001!important;
    opacity:1!important;
    pointer-events:auto!important;
  }

  @media(max-width:1100px){
    .settings-layout{
      grid-template-columns:1fr;
    }
  }

  @media(max-width:980px){
    .topbar{
      padding:16px 18px;
    }

    .content{
      padding:18px 18px 24px;
    }
  }

  @media(max-width:760px){
    .topbar{
      flex-direction:row!important;
      align-items:flex-start!important;
      justify-content:space-between!important;
      gap:10px!important;
    }

    .topbar-left{
      flex:1 1 auto!important;
      min-width:0!important;
      display:flex!important;
      align-items:flex-start!important;
      gap:10px!important;
    }

    .topbar-right{
      width:auto!important;
      flex:0 0 auto!important;
      display:flex!important;
      justify-content:flex-end!important;
      align-items:flex-start!important;
      padding-top:0!important;
      margin-top:0!important;
    }

    .topbar-left h1{
      font-size:22px;
    }

    .topbar-left p{
      max-width:245px;
      font-size:12px;
      line-height:1.45;
    }

    .settings-nav{
      grid-template-columns:repeat(2,1fr);
      gap:10px;
      padding:12px;
    }

    .settings-tab{
      min-height:104px;
    }

    .settings-tab:nth-child(4){
      grid-column:1 / 2;
    }

    .settings-tab:nth-child(5){
      grid-column:2 / 3;
    }
  }

  @media(max-width:560px){
    .topbar{
      padding:14px;
    }

    .content{
      padding:14px 14px 22px;
    }

    .topbar-left h1{
      font-size:20px;
    }

    .topbar-left p{
      font-size:12px;
    }

    .settings-nav{
      grid-template-columns:repeat(3,1fr);
      border-radius:26px;
      padding:14px;
      gap:12px;
    }

    .settings-tab{
      min-height:104px;
      border-radius:20px;
      font-size:12px;
      padding:12px 8px;
    }

    .settings-tab::before{
      width:46px;
      height:46px;
      font-size:21px;
    }

    .settings-tab:nth-child(4){
      grid-column:1 / 2;
    }

    .settings-tab:nth-child(5){
      grid-column:2 / 4;
    }

    .two-col,
    .stat-grid,
    .color-row{
      grid-template-columns:1fr;
    }

    .swatches{
      grid-template-columns:repeat(4,1fr);
    }
  }

  @media(max-width:380px){
    .settings-nav{
      grid-template-columns:repeat(2,1fr);
    }

    .settings-tab:nth-child(4){
      grid-column:1 / 2;
    }

    .settings-tab:nth-child(5){
      grid-column:2 / 3;
    }
  }
  
  @media(max-width:760px){
  .topbar-right{
    display:none !important;
  }

  .settings-nav{
    margin-top:0;
    padding:12px;
    gap:10px;
    border-radius:24px;
  }

  .settings-tab{
    min-height:92px;
    border-radius:18px;
    gap:8px;
  }

  .settings-tab::before{
    width:42px;
    height:42px;
    font-size:20px;
  }

  .settings-tab:nth-child(5){
    min-height:92px;
    border-radius:18px;
  }
}

@media(max-width:380px){
  .settings-nav{
    gap:8px;
    padding:10px;
  }

  .settings-tab{
    min-height:86px;
    font-size:10.5px;
  }

  .settings-tab::before{
    width:38px;
    height:38px;
    font-size:18px;
  }
}
