:root{
  --bg-dark: #07080d;
  --bg-deep: #0b0d14;
  --bg-card: rgba(18, 18, 32, 0.72);
  --bg-card-strong: rgba(10, 12, 20, 0.88);
  --text-main: #f5f7ff;
  --text-soft: #c6cbe0;
  --text-muted: #97a0bb;
  --border-soft: rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.16);
  --accent: #ffb547;
  --accent-hover: #ffc76e;
  --accent-soft: rgba(255,181,71,0.16);
  --success: #4dd28a;
  --danger: #ff6b6b;
  --shadow-xl: 0 30px 80px rgba(0,0,0,0.45);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.30);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 12px;
  --transition-fast: 0.18s ease-out;
}

*{
  box-sizing:border-box;
}

html,
body{
  min-height:100%;
}

body{
  margin:0;
  font-family:"Outfit", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color:var(--text-main);
  background:
    radial-gradient(circle at top, rgba(47,128,237,0.16), transparent 28%),
    radial-gradient(circle at 80% 80%, rgba(255,181,71,0.10), transparent 22%),
    linear-gradient(180deg, #10131d 0%, #090a11 100%);
  overflow-x:hidden;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:-1;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.05), transparent 28%),
    radial-gradient(circle at bottom right, rgba(255,255,255,0.04), transparent 20%);
}

a{
  color:inherit;
  text-decoration:none;
}

img{
  display:block;
  max-width:100%;
}

button,
input,
textarea,
select{
  font:inherit;
}

.topbar{
  position:sticky;
  top:0;
  z-index:50;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:18px 24px;
  background:rgba(8,10,18,0.72);
  border-bottom:1px solid var(--border-soft);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.brand{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}

.brand__logo{
  width:52px;
  height:52px;
  border-radius:18px;
  overflow:hidden;
  flex-shrink:0;
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.12);
  box-shadow:0 14px 30px rgba(0,0,0,0.28);
}

.brand__logo img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.brand__text{
  display:flex;
  flex-direction:column;
  min-width:0;
}

.brand__text strong{
  font-size:1rem;
  line-height:1.1;
}

.brand__text small{
  font-size:0.82rem;
  color:var(--text-muted);
  letter-spacing:0.08em;
  text-transform:uppercase;
}

.topbar__actions{
  display:flex;
  align-items:center;
  gap:12px;
}

.topbar-profile{
  display:flex;
  align-items:center;
  gap:12px;
  padding:8px 12px 8px 8px;
  border-radius:999px;
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.08);
  transition:background var(--transition-fast), transform var(--transition-fast);
}

.topbar-profile:hover{
  background:rgba(255,255,255,0.09);
  transform:translateY(-1px);
}

.topbar-profile img{
  width:42px;
  height:42px;
  border-radius:50%;
  object-fit:cover;
  border:1px solid rgba(255,255,255,0.14);
}

.topbar-profile span{
  display:flex;
  flex-direction:column;
  line-height:1.15;
}

.topbar-profile strong{
  font-size:0.92rem;
  color:var(--text-main);
}

.topbar-profile small{
  font-size:0.76rem;
  color:var(--text-muted);
}

.icon-button{
  width:48px;
  height:48px;
  border-radius:16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.06);
  color:var(--text-main);
  transition:transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

.icon-button:hover{
  transform:translateY(-1px);
  background:rgba(255,255,255,0.12);
  border-color:rgba(255,255,255,0.16);
}

.icon-button--accent{
  background:var(--accent-soft);
  color:#ffd89c;
  border-color:rgba(255,181,71,0.28);
}

.icon-button svg{
  width:22px;
  height:22px;
  stroke:currentColor;
}

.app-shell{
  width:min(1440px, calc(100% - 32px));
  margin:0 auto;
  padding:28px 0 32px;
}

.site-footer{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  padding:22px 20px 28px;
  color:var(--text-muted);
  font-size:0.9rem;
}

.glass-panel{
  background:rgba(8,10,18,0.38);
  border:1px solid rgba(255,255,255,0.10);
  border-radius:28px;
  box-shadow:var(--shadow-lg);
  backdrop-filter:blur(18px) saturate(145%);
  -webkit-backdrop-filter:blur(18px) saturate(145%);
}

.page-head{
  padding:24px;
  margin-bottom:24px;
  background:
    radial-gradient(circle at top left, rgba(47,128,237,0.14), transparent 35%),
    linear-gradient(180deg, rgba(18,22,36,0.84), rgba(10,12,20,0.78));
}

.section-kicker{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border-radius:999px;
  font-size:0.76rem;
  font-weight:700;
  letter-spacing:0.10em;
  text-transform:uppercase;
  border:1px solid rgba(255,181,71,0.34);
  background:var(--accent-soft);
  color:#ffd89c;
  margin-bottom:16px;
}

.page-head h1,
.panel-title{
  margin:0 0 10px;
  font-size:clamp(1.85rem, 4vw, 2.8rem);
  line-height:1.02;
  letter-spacing:-0.03em;
}

.page-head p,
.panel-copy{
  margin:0;
  max-width:760px;
  color:var(--text-soft);
  line-height:1.65;
}

.page-head__stats{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:18px;
}

.stat-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border-radius:999px;
  color:rgba(255,255,255,0.92);
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.10);
}

.dashboard-layout{
  display:grid;
  grid-template-columns:minmax(0, 1.45fr) 360px;
  gap:24px;
  align-items:start;
}

.section-card{
  padding:24px;
}

.section-heading{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:18px;
  margin-bottom:20px;
}

.section-heading h2{
  margin:0 0 6px;
  font-size:1.45rem;
}

.section-heading p{
  margin:0;
  color:var(--text-muted);
}

.tool-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:18px;
}

.tool-card{
  position:relative;
  min-height:250px;
  border-radius:24px;
  overflow:hidden;
  isolation:isolate;
  border:1px solid rgba(255,255,255,0.10);
  background:
    linear-gradient(180deg, rgba(10,12,20,0.08), rgba(10,12,20,0.86)),
    var(--card-bg) center/cover no-repeat;
  box-shadow:0 18px 34px rgba(0,0,0,0.22);
  transition:transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.tool-card::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.12), transparent 34%),
    linear-gradient(180deg, rgba(8,10,18,0.10) 0%, rgba(8,10,18,0.88) 100%);
  z-index:0;
}

.tool-card:hover{
  transform:translateY(-4px);
  border-color:rgba(255,255,255,0.18);
  box-shadow:0 24px 42px rgba(0,0,0,0.34);
}

.tool-card__content{
  position:absolute;
  inset:auto 0 0 0;
  z-index:1;
  padding:18px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.tool-card__tag{
  display:inline-flex;
  align-self:flex-start;
  padding:6px 10px;
  border-radius:999px;
  font-size:0.74rem;
  font-weight:700;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:rgba(255,255,255,0.88);
  background:rgba(0,0,0,0.28);
  border:1px solid rgba(255,255,255,0.14);
}

.tool-card h3{
  margin:0;
  font-size:1.18rem;
}

.tool-card p{
  margin:0;
  color:var(--text-soft);
  line-height:1.55;
  font-size:0.94rem;
}

.button-primary,
.button-secondary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  padding:12px 18px;
  border:none;
  border-radius:16px;
  font-weight:700;
  transition:transform var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  cursor:pointer;
}

.button-primary{
  background:var(--accent);
  color:#1d1712;
  box-shadow:0 16px 34px rgba(0,0,0,0.30);
}

.button-primary:hover{
  transform:translateY(-1px);
  background:var(--accent-hover);
}

.button-primary--full{
  width:100%;
}

.button-secondary{
  background:rgba(255,255,255,0.06);
  color:var(--text-main);
  border:1px solid rgba(255,255,255,0.10);
}

.button-secondary:hover{
  transform:translateY(-1px);
  background:rgba(255,255,255,0.10);
}

.side-stack{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.side-card{
  padding:20px;
}

.profile-card{
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:16px;
}

.profile-card img{
  width:68px;
  height:68px;
  border-radius:50%;
  object-fit:cover;
  border:2px solid rgba(255,255,255,0.14);
}

.profile-card__meta{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.profile-card__meta strong{
  font-size:1rem;
}

.profile-card__meta span{
  color:var(--text-muted);
  font-size:0.9rem;
}

.side-title{
  margin:0 0 14px;
  font-size:1rem;
  color:var(--text-soft);
}

.user-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.user-row{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px;
  border-radius:16px;
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.08);
}

.user-row img{
  width:42px;
  height:42px;
  border-radius:50%;
  object-fit:cover;
}

.user-row__name{
  flex:1;
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.status-dot{
  width:12px;
  height:12px;
  border-radius:50%;
  background:var(--danger);
  box-shadow:0 0 0 4px rgba(255,255,255,0.04);
  flex-shrink:0;
}

.status-dot.online{
  background:var(--success);
}

.form-wrapper{
  display:flex;
  justify-content:center;
}

.form-card{
  width:min(720px, 100%);
  padding:28px;
  background:
    radial-gradient(circle at top left, rgba(47,128,237,0.10), transparent 30%),
    linear-gradient(180deg, rgba(18,22,36,0.82), rgba(10,12,20,0.86));
}

.stack-lg{
  display:flex;
  flex-direction:column;
  gap:18px;
  margin-top:22px;
}

.form-group{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.form-label{
  font-size:0.92rem;
  font-weight:600;
  color:rgba(255,255,255,0.92);
}

.text-input{
  width:100%;
  min-height:54px;
  padding:0 16px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.05);
  color:var(--text-main);
  outline:none;
  transition:border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}

.text-input::placeholder{
  color:rgba(255,255,255,0.34);
}

.text-input:focus{
  border-color:rgba(255,181,71,0.55);
  background:rgba(255,255,255,0.08);
  box-shadow:0 0 0 6px rgba(255,181,71,0.10);
}

.app-dropzone{
  border:1px dashed rgba(255,255,255,0.18);
  padding:20px;
  border-radius:20px;
  background:rgba(255,255,255,0.04);
  text-align:center;
  cursor:pointer;
  transition:border-color var(--transition-fast), background var(--transition-fast);
}

.app-dropzone:hover{
  border-color:rgba(255,181,71,0.40);
  background:rgba(255,255,255,0.06);
}

.app-dropzone .preview{
  width:110px;
  height:110px;
  margin:16px auto 0;
  border-radius:18px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.04);
}

.app-dropzone .preview img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.dropzone__hint{
  color:var(--text-soft);
  line-height:1.6;
}

.alert{
  padding:14px 16px;
  border-radius:16px;
  margin-top:16px;
  font-size:0.94rem;
}

.alert--error{
  background:rgba(255,107,107,0.10);
  border:1px solid rgba(255,107,107,0.24);
  color:#ffd0d0;
}

@media (max-width: 1100px){
  .dashboard-layout{
    grid-template-columns:1fr;
  }
}

@media (max-width: 760px){
  .topbar{
    padding:16px;
  }

  .app-shell{
    width:min(100% - 24px, 1440px);
    padding-top:20px;
  }

  .page-head,
  .section-card,
  .side-card,
  .form-card{
    padding:20px;
    border-radius:22px;
  }

  .brand__text small,
  .topbar-profile small{
    display:none;
  }

  .topbar-profile{
    padding-right:10px;
  }
}

@media (max-width: 560px){
  .topbar{
    flex-wrap:wrap;
    justify-content:center;
  }

  .topbar__actions{
    width:100%;
    justify-content:center;
  }

  .tool-grid{
    grid-template-columns:1fr;
  }

  .page-head__stats{
    flex-direction:column;
    align-items:flex-start;
  }
}

/* =========================
   HOME ADVANCED DASHBOARD
========================= */

.timeline-panel{
  margin-bottom:24px;
  padding:24px;
  overflow:hidden;
}

.timeline-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:22px;
}

.timeline-head h2{
  margin:0 0 6px;
  font-size:1.45rem;
}

.timeline-head p{
  margin:0;
  color:var(--text-muted);
  line-height:1.55;
}

.timeline-settings{
  width:44px;
  height:44px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.06);
  color:var(--text-main);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:transform var(--transition-fast), background var(--transition-fast);
}

.timeline-settings:hover{
  transform:translateY(-1px);
  background:rgba(255,255,255,0.12);
}

.timeline-settings svg{
  width:21px;
  height:21px;
  stroke:currentColor;
}

.timeline-track{
  position:relative;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(170px, 1fr));
  gap:14px;
}

.timeline-track::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:35px;
  height:1px;
  background:linear-gradient(90deg, transparent, rgba(255,181,71,0.42), transparent);
  pointer-events:none;
}

.timeline-item{
  position:relative;
  padding:18px;
  min-height:124px;
  border-radius:20px;
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.09);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}

.timeline-item__dot{
  width:36px;
  height:36px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--accent-soft);
  border:1px solid rgba(255,181,71,0.32);
  box-shadow:0 0 0 8px rgba(255,181,71,0.06);
  margin-bottom:14px;
  font-size:1.1rem;
}

.timeline-item time{
  display:block;
  color:#ffd89c;
  font-weight:700;
  font-size:0.82rem;
  margin-bottom:6px;
}

.timeline-item strong{
  display:block;
  line-height:1.35;
}

.tool-filters{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:22px;
}

.tool-filter{
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.05);
  color:var(--text-soft);
  border-radius:999px;
  padding:10px 14px;
  cursor:pointer;
  font-weight:700;
  font-size:0.86rem;
  transition:background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.tool-filter:hover,
.tool-filter.is-active{
  transform:translateY(-1px);
  background:var(--accent-soft);
  color:#ffd89c;
  border-color:rgba(255,181,71,0.32);
}

.folder-card{
  grid-column:1 / -1;
  padding:20px;
  border-radius:24px;
  background:
    radial-gradient(circle at top left, rgba(255,181,71,0.10), transparent 30%),
    rgba(255,255,255,0.045);
  border:1px solid rgba(255,255,255,0.10);
}

.folder-card__head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  margin-bottom:16px;
}

.folder-card__head h3{
  margin:0 0 5px;
  font-size:1.22rem;
}

.folder-card__head p{
  margin:0;
  color:var(--text-muted);
}

.folder-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
  gap:12px;
}

.folder-link{
  min-height:104px;
  border-radius:18px;
  padding:14px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:12px;
  background:rgba(255,255,255,0.055);
  border:1px solid rgba(255,255,255,0.09);
  transition:transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

.folder-link:hover{
  transform:translateY(-2px);
  background:rgba(255,255,255,0.09);
  border-color:rgba(255,255,255,0.16);
}

.folder-link span{
  font-size:1.35rem;
}

.folder-link strong{
  font-size:0.98rem;
}

.modal-backdrop{
  position:fixed;
  inset:0;
  z-index:100;
  display:none;
  align-items:center;
  justify-content:center;
  padding:22px;
  background:rgba(3,4,8,0.72);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}

.modal-backdrop.is-open{
  display:flex;
}

.app-modal{
  width:min(680px, 100%);
  max-height:min(86vh, 820px);
  overflow:auto;
  border-radius:28px;
  background:
    radial-gradient(circle at top left, rgba(47,128,237,0.12), transparent 32%),
    linear-gradient(180deg, rgba(18,22,36,0.96), rgba(10,12,20,0.98));
  border:1px solid rgba(255,255,255,0.13);
  box-shadow:var(--shadow-xl);
}

.app-modal__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding:24px 24px 0;
}

.app-modal__head h3{
  margin:0 0 6px;
  font-size:1.45rem;
}

.app-modal__head p{
  margin:0;
  color:var(--text-muted);
  line-height:1.55;
}

.modal-close{
  width:42px;
  height:42px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.06);
  color:var(--text-main);
  cursor:pointer;
  font-size:1.4rem;
  line-height:1;
}

.app-modal__body{
  padding:24px;
}

.modal-actions{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(210px, 1fr));
  gap:12px;
}

.discord-choice,
.tutorial-step,
.timeline-admin-row{
  border-radius:18px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.05);
  padding:16px;
}

.discord-choice{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.discord-choice span{
  font-size:1.6rem;
}

.discord-choice strong{
  font-size:1.05rem;
}

.discord-choice p{
  margin:0;
  color:var(--text-muted);
  line-height:1.5;
}

.tutorial-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.tutorial-step{
  display:grid;
  grid-template-columns:42px 1fr;
  gap:14px;
  align-items:start;
}

.tutorial-step__number{
  width:42px;
  height:42px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--accent-soft);
  border:1px solid rgba(255,181,71,0.28);
  color:#ffd89c;
  font-weight:800;
}

.tutorial-step h4{
  margin:0 0 5px;
}

.tutorial-step p{
  margin:0;
  color:var(--text-muted);
  line-height:1.55;
}

.code-pill{
  display:inline-flex;
  margin-top:10px;
  padding:9px 12px;
  border-radius:12px;
  background:rgba(0,0,0,0.26);
  border:1px solid rgba(255,255,255,0.10);
  color:#fff;
  font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size:0.88rem;
}

.timeline-admin-form{
  display:grid;
  grid-template-columns:150px 1fr 90px auto;
  gap:10px;
  align-items:end;
  margin-bottom:18px;
}

.timeline-admin-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.timeline-admin-row{
  display:grid;
  grid-template-columns:110px 1fr 58px auto;
  gap:10px;
  align-items:center;
}

.mini-button{
  min-height:42px;
  padding:9px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.06);
  color:var(--text-main);
  font-weight:700;
  cursor:pointer;
}

.mini-button--danger{
  color:#ffd0d0;
  background:rgba(255,107,107,0.10);
  border-color:rgba(255,107,107,0.22);
}

@media (max-width:760px){
  .timeline-head,
  .folder-card__head{
    flex-direction:column;
  }

  .timeline-admin-form,
  .timeline-admin-row{
    grid-template-columns:1fr;
  }
}