/* SFTP-SMB Admin — trident theme (blue · green · purple) */
:root {
  /* Trident theme — blue + green */
  --blue:   #2563eb;
  --blue-d: #1d4ed8;
  --green:  #10b981;
  --green-d:#059669;
  --teal:   #0d9488;   /* blue-green accent (replaces former purple) */
  --teal-d: #0f766e;

  --grad-brand: linear-gradient(135deg, var(--blue) 0%, #0ea5e9 50%, var(--green) 115%);
  --grad-sidebar: linear-gradient(185deg, #0b2a4a 0%, #0d3b66 45%, #0f5a4f 100%);

  --ink: #1f2433;
  --muted: #6b7280;
  --line: #e6e8ef;
  --bg: #f5f6fb;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06);

  --sidebar-w: 256px;
  --topbar-h: 64px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

/* ---------- Layout shell ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--grad-sidebar);
  color: #e8ecff;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 1040;
  transition: transform .25s ease;
}
.sidebar__brand {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: 0 1.25rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .2px;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar__brand .logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--grad-brand);
  display: grid; place-items: center;
  font-size: 1.1rem; color: #fff;
  box-shadow: 0 4px 14px rgba(16,185,129,.4);
}
.sidebar__nav { padding: .85rem .65rem; overflow-y: auto; flex: 1; }
.sidebar__label {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .12em;
  color: rgba(232,236,255,.45); margin: 1rem .85rem .35rem;
}
.nav-link-side {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem .85rem; margin-bottom: 2px;
  color: rgba(232,236,255,.82);
  border-radius: 10px;
  text-decoration: none;
  font-size: .92rem; font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-link-side i { font-size: 1.05rem; width: 1.2rem; text-align: center; opacity: .9; }
.nav-link-side:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-link-side.active {
  background: rgba(255,255,255,.14);
  color: #fff;
  box-shadow: inset 3px 0 0 0 var(--green);
}
.sidebar__foot { padding: .85rem 1rem; font-size: .72rem; color: rgba(232,236,255,.4); border-top: 1px solid rgba(255,255,255,.08); }

.main {
  margin-left: var(--sidebar-w);
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}

/* ---------- Topbar ---------- */
.topbar {
  height: var(--topbar-h);
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky; top: 0; z-index: 1030;
}
.topbar__title { font-weight: 650; font-size: 1.1rem; }
.topbar__left { display: flex; align-items: center; gap: .75rem; }
.sidebar-toggle {
  display: none; border: 0; background: transparent; font-size: 1.4rem; color: var(--ink); cursor: pointer;
}
.user-chip {
  display: flex; align-items: center; gap: .55rem;
  background: #fff; border: 1px solid var(--line);
  padding: .35rem .6rem .35rem .4rem; border-radius: 999px;
  cursor: pointer; font-weight: 600; font-size: .85rem; color: var(--ink);
}
.user-chip .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--grad-brand); color: #fff;
  display: grid; place-items: center; font-size: .8rem; font-weight: 700;
}
.user-chip .role { color: var(--muted); font-weight: 500; font-size: .75rem; }

/* ---------- Content ---------- */
.content { padding: 1.6rem 1.5rem 3rem; flex: 1 0 auto; }

/* ---------- Footer ---------- */
.app-footer {
  flex-shrink: 0;
  padding: 1rem 1.5rem;
  text-align: center;
  font-size: .8rem;
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
}
.auth-copyright {
  position: fixed; left: 0; right: 0; bottom: .9rem;
  text-align: center;
  font-size: .78rem;
  color: rgba(255,255,255,.72);
}
.page-head { margin-bottom: 1.25rem; }
.page-head h1 { font-size: 1.4rem; font-weight: 700; margin: 0; }
.page-head p { color: var(--muted); margin: .25rem 0 0; }

/* ---------- Cards ---------- */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 1.25rem 1.35rem; }
.stat-card { color: #fff; border: 0; overflow: hidden; position: relative; }
.stat-card .card-body { padding: 1.1rem 1.25rem; }
.stat-card .stat-label { font-size: .8rem; opacity: .9; font-weight: 500; }
.stat-card .stat-value { font-size: 2rem; font-weight: 750; line-height: 1.1; }
.stat-card i { position: absolute; right: 1rem; bottom: .6rem; font-size: 2.6rem; opacity: .22; }
.stat-blue   { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.stat-green  { background: linear-gradient(135deg, #10b981, #059669); }
.stat-purple { background: linear-gradient(135deg, #059669, #0d9488); } /* green-teal */
.stat-teal   { background: linear-gradient(135deg, #0ea5e9, #14b8a6); }

/* ---------- Buttons (theme override) ---------- */
.btn { border-radius: 9px; font-weight: 600; font-size: .88rem; }
.btn-primary { background: var(--blue); border-color: var(--blue); }
.btn-primary:hover, .btn-primary:focus { background: var(--blue-d); border-color: var(--blue-d); }
.btn-success { background: var(--green); border-color: var(--green); }
.btn-success:hover { background: var(--green-d); border-color: var(--green-d); }
.btn-purple { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn-purple:hover { background: var(--teal-d); border-color: var(--teal-d); color: #fff; }
.btn-gradient { background: var(--grad-brand); border: 0; color: #fff; }
.btn-gradient:hover { color: #fff; filter: brightness(1.05); }

/* ---------- Tables ---------- */
.table { --bs-table-bg: transparent; vertical-align: middle; }
.table > :not(caption) > * > * { padding: .7rem .85rem; }
.table thead th {
  background: #fafbff; color: var(--muted);
  text-transform: uppercase; font-size: .72rem; letter-spacing: .05em;
  border-bottom: 1px solid var(--line);
}
.table-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.table-card .table { margin: 0; }

/* ---------- Badges ---------- */
.badge { font-weight: 600; padding: .4em .65em; border-radius: 7px; }
.badge-soft-green  { background: #e7f7f0; color: #047857; }
.badge-soft-gray   { background: #eef0f5; color: #4b5563; }
.badge-soft-blue   { background: #e8f0fe; color: #1d4ed8; }
.badge-soft-amber  { background: #fef3e2; color: #b45309; }
.badge-soft-red    { background: #fde8e8; color: #b91c1c; }

/* ---------- Forms ---------- */
.form-label { font-weight: 600; font-size: .85rem; color: #374151; }
.form-control, .form-select { border-radius: 9px; border-color: #d8dce8; padding: .55rem .75rem; }
.form-control:focus, .form-select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.form-text { font-size: .8rem; }
.section-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--blue); font-weight: 700; margin: 1.25rem 0 .6rem; }

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: 100vh; display: grid; place-items: center;
  background: var(--grad-sidebar); padding: 1.5rem;
}
.auth-card {
  width: 100%; max-width: 420px; background: #fff;
  border-radius: 18px; box-shadow: 0 24px 60px rgba(13,16,45,.4);
  padding: 2.25rem 2rem;
}
.auth-brand { display: flex; align-items: center; gap: .65rem; justify-content: center; margin-bottom: 1.25rem; }
.auth-brand .logo { width: 44px; height: 44px; border-radius: 12px; background: var(--grad-brand); color: #fff; display: grid; place-items: center; font-size: 1.4rem; box-shadow: 0 8px 22px rgba(37,99,235,.4); }
.auth-card h1 { font-size: 1.3rem; font-weight: 700; text-align: center; margin: 0 0 .25rem; }
.auth-card .sub { text-align: center; color: var(--muted); font-size: .9rem; margin-bottom: 1.4rem; }
.auth-foot { text-align: center; margin-top: 1rem; font-size: .85rem; }
.auth-foot a { color: var(--blue); text-decoration: none; font-weight: 600; }

pre { background: #0f172a; color: #e2e8f0; padding: .85rem 1rem; border-radius: 10px; font-size: .82rem; overflow:auto; }
.alert { border: 0; border-radius: 10px; }

/* ---------- Responsive ---------- */
.backdrop { display: none; }
@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .sidebar-toggle { display: inline-flex; }
  .backdrop.show { display: block; position: fixed; inset: 0; background: rgba(15,18,45,.45); z-index: 1035; }
}
