:root{
  --bg:#05070b;
  --bg2:#09110d;
  --card:rgba(9,14,18,.78);
  --card2:rgba(8,18,12,.72);

  --line:rgba(34,255,122,.14);
  --line-strong:rgba(34,255,122,.28);

  --text:#eaf6ee;
  --muted:#92a99a;

  --green:#22ff7a;
  --green2:#00c85f;
  --green3:#7dffb0;

  --danger:#ff5f7a;

  --shadow:0 20px 60px rgba(0,0,0,.50);
  --shadow-green:0 0 28px rgba(34,255,122,.14);
  --radius:20px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}

body{
  font-family:Segoe UI, Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(34,255,122,.14), transparent 28%),
    radial-gradient(circle at bottom right, rgba(0,200,95,.12), transparent 26%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  color:var(--text);
  min-height:100vh;
}

/* ===== glass ===== */
.glass{
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018)),
    linear-gradient(135deg, rgba(34,255,122,.03), rgba(0,0,0,0));
  border:1px solid var(--line);
  box-shadow:var(--shadow), inset 0 1px 0 rgba(255,255,255,.03);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}

/* ===== login ===== */
.login-page{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

.login-shell{
  width:100%;
  max-width:460px;
  padding:22px;
  margin:0 auto;
}

.login-card{
  border-radius:28px;
  padding:28px;
  position:relative;
}

.brand{
  display:flex;
  align-items:center;
  gap:16px;
  margin-bottom:24px;
}

.brand-logo{
  width:62px;
  height:62px;
  border-radius:18px;
  display:grid;
  place-items:center;
  font-weight:800;
  letter-spacing:.08em;
  color:#04110a;
  background:linear-gradient(135deg, var(--green), #9cffc1);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.06),
    0 0 30px rgba(34,255,122,.28);
}

.brand-logo.sm{
  width:48px;
  height:48px;
  border-radius:14px;
  font-size:14px;
}

.brand h1{
  margin:0;
  font-size:26px;
  color:#eefcf2;
}

.brand p{
  margin:4px 0 0;
  color:var(--muted);
}

/* ===== form ===== */
.login-form{
  display:grid;
  gap:10px;
}

label{
  color:#dff7e8;
  font-weight:600;
}

input{
  width:100%;
  border:1px solid rgba(34,255,122,.14);
  background:rgba(255,255,255,.035);
  color:var(--text);
  padding:13px 14px;
  border-radius:14px;
  outline:none;
  transition:.18s ease;
}

input::placeholder{
  color:rgba(234,246,238,.35);
}

input:focus{
  border-color:rgba(34,255,122,.42);
  box-shadow:
    0 0 0 4px rgba(34,255,122,.08),
    0 0 18px rgba(34,255,122,.08);
  background:rgba(255,255,255,.045);
}

/* ===== buttons ===== */
.btn{
  border:1px solid rgba(34,255,122,.18);
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  color:var(--text);
  padding:11px 14px;
  border-radius:14px;
  cursor:pointer;
  transition:.18s ease;
  text-decoration:none;
}

.btn:hover{
  transform:translateY(-1px);
  border-color:rgba(34,255,122,.34);
  box-shadow:
    0 10px 26px rgba(0,0,0,.22),
    0 0 18px rgba(34,255,122,.10);
}

.btn-primary{
  background:linear-gradient(135deg, rgba(34,255,122,.18), rgba(0,200,95,.10));
  border-color:rgba(34,255,122,.34);
  color:#f1fff6;
}

.btn-primary:hover{
  box-shadow:
    0 12px 28px rgba(0,0,0,.24),
    0 0 22px rgba(34,255,122,.16);
}

.btn.danger{
  border-color:rgba(255,95,122,.30);
  color:#ffdfe5;
}

.btn.danger:hover{
  box-shadow:
    0 10px 22px rgba(0,0,0,.22),
    0 0 16px rgba(255,95,122,.10);
}

.btn.mini{
  padding:7px 10px;
  border-radius:12px;
  font-size:12px;
}

.file-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
}

/* ===== small text ===== */
.msg{
  min-height:20px;
  color:#ff9bad;
  font-size:14px;
}

.login-foot{
  margin-top:18px;
  color:var(--muted);
  font-size:13px;
}

/* ===== background orbs ===== */
.bg-orb{
  position:fixed;
  border-radius:50%;
  filter:blur(70px);
  pointer-events:none;
  opacity:.9;
}

.orb1{
  width:300px;
  height:300px;
  background:rgba(34,255,122,.14);
  top:7%;
  left:8%;
}

.orb2{
  width:260px;
  height:260px;
  background:rgba(0,200,95,.12);
  right:8%;
  bottom:8%;
}

/* ===== app layout ===== */
.topbar{
  margin:18px;
  border-radius:22px;
  padding:16px 18px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
}

.brandline{
  display:flex;
  align-items:center;
  gap:14px;
}

.eyebrow{
  font-size:12px;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.14em;
}

.topbar h1{
  margin:0;
  font-size:24px;
  color:#eefcf2;
}

.top-actions{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.search{
  min-width:300px;
}

/* ===== main panel ===== */
.layout{
  padding:0 18px 18px;
}

.panel{
  border-radius:24px;
  padding:18px;
}

.panel-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:14px;
}

.panel-head h2{
  margin:0;
  color:#effff4;
}

.badge{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(34,255,122,.22);
  background:linear-gradient(135deg, rgba(34,255,122,.10), rgba(255,255,255,.03));
  color:#ccffdd;
  font-size:12px;
  box-shadow:0 0 14px rgba(34,255,122,.06);
}

/* ===== breadcrumbs ===== */
.breadcrumbs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  margin-bottom:14px;
}

.crumb,
.linklike{
  background:none;
  border:none;
  color:#baffd1;
  cursor:pointer;
  padding:0;
  font:inherit;
}

.crumb:hover,
.linklike:hover{
  text-decoration:underline;
  color:#e9fff0;
}

.crumb.drag-over-target{
  color:#effff4;
  text-shadow:0 0 14px rgba(34,255,122,.30);
}

.sep{
  color:var(--muted);
}

/* ===== toolbar ===== */
.toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:16px;
}

/* ===== table ===== */
.table-wrap{
  overflow:auto;
  border-radius:18px;
  border:1px solid rgba(34,255,122,.10);
  background:rgba(255,255,255,.02);
}

.file-table{
  width:100%;
  border-collapse:collapse;
  min-width:920px;
}

.file-table th,
.file-table td{
  text-align:left;
  padding:14px 14px;
  border-bottom:1px solid rgba(34,255,122,.08);
}

.file-table th{
  color:#b8f3ca;
  font-size:13px;
  background:rgba(255,255,255,.025);
}

.file-table tbody tr{
  transition:.15s ease;
}

.file-table tbody tr:hover{
  background:rgba(34,255,122,.03);
}

.file-name{
  display:flex;
  align-items:center;
  gap:10px;
}

.icon{
  width:12px;
  height:12px;
  border-radius:4px;
  display:inline-block;
  box-shadow:0 0 12px rgba(34,255,122,.16);
}

.icon.folder{
  background:linear-gradient(135deg, #58ff9f, #11b85c);
}

.icon.file{
  background:linear-gradient(135deg, #e9fff1, #8dffb8);
}

.row-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.empty{
  text-align:center;
  color:var(--muted);
  padding:28px;
}

/* ===== scrollbar ===== */
*::-webkit-scrollbar{
  width:10px;
  height:10px;
}

*::-webkit-scrollbar-track{
  background:rgba(255,255,255,.03);
  border-radius:999px;
}

*::-webkit-scrollbar-thumb{
  background:rgba(34,255,122,.18);
  border-radius:999px;
}

*::-webkit-scrollbar-thumb:hover{
  background:rgba(34,255,122,.28);
}

/* ===== responsive ===== */
@media (max-width: 980px){
  .topbar{
    flex-direction:column;
    align-items:stretch;
  }

  .top-actions{
    justify-content:stretch;
  }

  .search{
    min-width:0;
  }
}
/* ===== brand / logo pulse ===== */
.brand-kicker{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.14em;
  color:var(--muted);
  margin-bottom:2px;
}

.header-sub{
  font-size:13px;
  color:var(--muted);
  margin-top:3px;
}

.brand-logo{
  position:relative;
  overflow:visible;
}

.brand-logo span{
  position:relative;
  z-index:3;
}

.pulse-logo{
  animation:logoPulse 2.8s ease-in-out infinite;
}

.logo-ring{
  position:absolute;
  inset:-6px;
  border-radius:22px;
  border:1px solid rgba(34,255,122,.18);
  box-shadow:0 0 0 1px rgba(34,255,122,.04), 0 0 18px rgba(34,255,122,.14);
  animation:ringPulse 2.8s ease-out infinite;
  pointer-events:none;
}

.logo-ring.ring-2{
  inset:-12px;
  opacity:.55;
  animation-delay:1.1s;
}

.brand-logo.sm .logo-ring{
  inset:-5px;
  border-radius:18px;
}

@keyframes logoPulse{
  0%,100%{
    transform:scale(1);
    box-shadow:
      0 0 0 1px rgba(255,255,255,.06),
      0 0 24px rgba(34,255,122,.22);
  }
  50%{
    transform:scale(1.035);
    box-shadow:
      0 0 0 1px rgba(255,255,255,.08),
      0 0 34px rgba(34,255,122,.34);
  }
}

@keyframes ringPulse{
  0%{
    transform:scale(.96);
    opacity:0;
  }
  20%{
    opacity:.55;
  }
  60%{
    opacity:.16;
  }
  100%{
    transform:scale(1.16);
    opacity:0;
  }
}

/* ===== top user card ===== */
.user-card{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 12px;
  min-height:44px;
  border-radius:16px;
  border:1px solid rgba(34,255,122,.18);
  background:
    linear-gradient(135deg, rgba(34,255,122,.08), rgba(255,255,255,.02));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 0 18px rgba(34,255,122,.06);
}

.user-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background:linear-gradient(135deg, var(--green), #9cffc1);
  box-shadow:
    0 0 0 3px rgba(34,255,122,.08),
    0 0 14px rgba(34,255,122,.28);
  animation:userDotPulse 1.8s ease-in-out infinite;
  flex:0 0 auto;
}

.user-meta{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}

.user-label{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.12em;
  color:var(--muted);
}

.user-meta strong{
  font-size:14px;
  color:#effff4;
  font-weight:700;
  max-width:220px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

@keyframes userDotPulse{
  0%,100%{
    transform:scale(1);
    box-shadow:
      0 0 0 3px rgba(34,255,122,.08),
      0 0 14px rgba(34,255,122,.24);
  }
  50%{
    transform:scale(1.12);
    box-shadow:
      0 0 0 5px rgba(34,255,122,.12),
      0 0 22px rgba(34,255,122,.34);
  }
}

/* ===== panel user badge ===== */
.user-badge-panel{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 12px;
  border-radius:999px;
  border:1px solid rgba(34,255,122,.22);
  background:linear-gradient(135deg, rgba(34,255,122,.10), rgba(255,255,255,.03));
  color:#ccffdd;
  font-size:12px;
  box-shadow:0 0 14px rgba(34,255,122,.06);
}

.user-badge-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:linear-gradient(135deg, var(--green), #9cffc1);
  box-shadow:0 0 12px rgba(34,255,122,.24);
}

/* ===== nicer top actions spacing ===== */
.top-actions{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
}

@media (max-width: 980px){
  .user-card{
    width:100%;
    justify-content:flex-start;
  }

  .user-meta strong{
    max-width:none;
  }
}
.login-card::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:28px;
  pointer-events:none;
  background:linear-gradient(135deg, rgba(34,255,122,.08), transparent 28%, transparent 72%, rgba(34,255,122,.04));
  opacity:.9;
}
.logo-png-wrap{
  display:grid;
  place-items:center;
  overflow:visible;
}

.brand-logo-img{
  position:relative;
  z-index:3;
  width:68%;
  height:68%;
  object-fit:contain;
  display:block;
  filter:
    drop-shadow(0 0 10px rgba(34,255,122,.18))
    drop-shadow(0 0 18px rgba(34,255,122,.10));
}

.brand-logo.sm .brand-logo-img{
  width:66%;
  height:66%;
}

.user-badge-panel{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:7px 12px;
  border-radius:999px;
  border:1px solid rgba(34,255,122,.22);
  background:linear-gradient(135deg, rgba(34,255,122,.10), rgba(255,255,255,.03));
  color:#ccffdd;
  font-size:12px;
  box-shadow:0 0 14px rgba(34,255,122,.06);
}

.user-badge-avatar{
  width:22px;
  height:22px;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-size:11px;
  font-weight:800;
  color:#04110a;
  background:linear-gradient(135deg, var(--green), #9cffc1);
  box-shadow:0 0 12px rgba(34,255,122,.22);
}
/* ===== upload progress ===== */
.upload-progress-wrap{
  min-width:280px;
  max-width:360px;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(34,255,122,.18);
  background:
    linear-gradient(135deg, rgba(34,255,122,.06), rgba(255,255,255,.02));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 0 18px rgba(34,255,122,.05);
}

.upload-progress-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
  font-size:12px;
  color:#d8fbe4;
}

.upload-progress-bar{
  width:100%;
  height:10px;
  border-radius:999px;
  overflow:hidden;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(34,255,122,.10);
}

.upload-progress-fill{
  width:0%;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg, var(--green), var(--green3));
  box-shadow:0 0 16px rgba(34,255,122,.22);
  transition:width .18s ease;
}

/* ===== toast ===== */
.toast-stack{
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:9999;
  display:flex;
  flex-direction:column;
  gap:10px;
  pointer-events:none;
}

.toast{
  min-width:280px;
  max-width:380px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:13px 14px;
  border-radius:16px;
  color:#effff4;
  border:1px solid rgba(34,255,122,.16);
  background:
    linear-gradient(135deg, rgba(8,18,12,.94), rgba(10,14,18,.94));
  box-shadow:
    0 18px 40px rgba(0,0,0,.34),
    0 0 18px rgba(34,255,122,.06);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  opacity:0;
  transform:translateY(12px) scale(.98);
  transition:opacity .22s ease, transform .22s ease;
}

.toast.show{
  opacity:1;
  transform:translateY(0) scale(1);
}

.toast.hide{
  opacity:0;
  transform:translateY(8px) scale(.98);
}

.toast-dot{
  width:11px;
  height:11px;
  border-radius:50%;
  flex:0 0 auto;
  box-shadow:0 0 14px currentColor;
}

.toast-success{
  border-color:rgba(34,255,122,.18);
}

.toast-success .toast-dot{
  background:linear-gradient(135deg, var(--green), #9cffc1);
  color:rgba(34,255,122,.9);
}

.toast-error{
  border-color:rgba(255,95,122,.24);
}

.toast-error .toast-dot{
  background:linear-gradient(135deg, #ff7d98, #ff5f7a);
  color:rgba(255,95,122,.9);
}

.toast-content{
  font-size:14px;
  line-height:1.35;
  word-break:break-word;
}

/* ===== drag and drop rows ===== */
.file-table tbody tr.draggable-row{
  cursor:grab;
}

.file-table tbody tr.draggable-row:active{
  cursor:grabbing;
}

.file-table tbody tr.is-dragging{
  opacity:.45;
  background:rgba(34,255,122,.06);
}

.file-table tbody tr.drop-target-row.drag-over{
  background:rgba(34,255,122,.10);
  box-shadow:inset 0 0 0 1px rgba(34,255,122,.28);
}

.file-table tbody tr.drop-target-row.drag-over .file-name{
  text-shadow:0 0 14px rgba(34,255,122,.20);
}

#btnUp.drag-over-target{
  border-color:rgba(34,255,122,.42);
  box-shadow:
    0 10px 26px rgba(0,0,0,.24),
    0 0 20px rgba(34,255,122,.18);
}

/* ===== modal ===== */
.app-modal{
  position:fixed;
  inset:0;
  z-index:12000;
  display:grid;
  place-items:center;
  padding:18px;
}

.app-modal[hidden]{
  display:none !important;
}

.app-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(4,8,12,.68);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
}

.app-modal-dialog{
  position:relative;
  width:min(520px, 100%);
  border-radius:22px;
  padding:18px;
  border:1px solid rgba(34,255,122,.18);
  box-shadow:
    0 30px 80px rgba(0,0,0,.46),
    0 0 30px rgba(34,255,122,.10);
  animation:modalIn .18s ease-out;
}

.app-modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}

.app-modal-head h3{
  margin:0;
  color:#effff4;
  font-size:20px;
}

.modal-close-btn{
  min-width:40px;
  padding:8px 11px;
}

.app-modal-message{
  margin:0 0 14px;
  color:#c8e9d3;
  line-height:1.45;
}

.app-modal-input-wrap{
  display:grid;
  gap:8px;
}

.app-modal-input-wrap[hidden]{
  display:none !important;
}

.app-modal-input-wrap label{
  color:#dff7e8;
}

.app-modal-input-wrap input{
  width:100%;
}

.app-modal-error{
  min-height:18px;
  color:#ff9bad;
  font-size:13px;
}

.app-modal-actions{
  margin-top:14px;
  display:flex;
  justify-content:flex-end;
  gap:10px;
}

.app-modal .btn.danger{
  border-color:rgba(255,95,122,.35);
  background:linear-gradient(135deg, rgba(255,95,122,.16), rgba(255,255,255,.02));
}

@keyframes modalIn{
  from{
    opacity:0;
    transform:translateY(8px) scale(.98);
  }
  to{
    opacity:1;
    transform:translateY(0) scale(1);
  }
}

@media (max-width: 640px){
  .app-modal-dialog{
    padding:16px;
    border-radius:18px;
  }

  .app-modal-actions{
    flex-direction:column-reverse;
  }

  .app-modal-actions .btn{
    width:100%;
  }
}
