* {
  box-sizing: border-box;
}

:root {
  --bg: #070510;
  --bg-2: #0e0a18;
  --panel: rgba(18, 14, 30, 0.92);
  --panel-2: rgba(24, 18, 38, 0.96);
  --line: rgba(163, 116, 255, 0.18);
  --line-strong: rgba(163, 116, 255, 0.34);
  --text: #f5f3ff;
  --muted: #b8afcf;
  --purple: #8b5cf6;
  --purple-2: #a855f7;
  --purple-3: #c084fc;
  --btn: #9d5cff;
  --btn-hover: #8b4df0;
  --danger: #dc2626;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: Inter, Arial, Helvetica, sans-serif;
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(139, 92, 246, 0.18), transparent 20%),
    radial-gradient(circle at top right, rgba(168, 85, 247, 0.12), transparent 22%),
    linear-gradient(180deg, var(--bg) 0%, #07060c 100%);
}

a {
  text-decoration: none;
  color: inherit;
}

button,
input {
  font: inherit;
}

.container {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(7, 6, 12, 0.78);
  backdrop-filter: blur(10px);
}

.header-inner {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-badge {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 26px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.28), rgba(168, 85, 247, 0.12));
  border: 1px solid var(--line);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.18);
  flex: 0 0 auto;
}

.brand-copy {
  min-width: 0;
}

.brand-kicker {
  color: var(--purple-3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.brand-copy h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.search-input,
.input {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 14px 16px;
  border-radius: 14px;
  outline: none;
  font-size: 14px;
  width: 100%;
}

.search-input {
  width: 320px;
  max-width: 100%;
}

.search-input::placeholder,
.input::placeholder {
  color: #bdb5d2;
}

.search-input:focus,
.input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

.ghost-link,
.solid-link,
.folder-btn,
.btn {
  border-radius: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
}

.ghost-link {
  padding: 12px 16px;
  color: #e8defd;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.solid-link,
.btn {
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--btn), var(--purple-2));
  color: #fff;
}

.ghost-link:hover,
.solid-link:hover,
.btn:hover,
.folder-btn:hover {
  transform: translateY(-1px);
}

.user-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.user-pill {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e8defd;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vip-mini-badge {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(192, 132, 252, 0.2);
  color: #f3d8ff;
}

.page-shell {
  padding: 26px 0 42px;
}

.hero-panel,
.content-panel {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.35);
}

.hero-panel {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  margin-bottom: 24px;
}

.hero-kicker {
  color: var(--purple-3);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 10px;
  font-weight: 700;
}

.hero-left h2 {
  margin: 0 0 10px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
}

.hero-left p {
  margin: 0;
  color: var(--muted);
  max-width: 700px;
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.stat-box {
  min-width: 180px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 22px;
  padding: 20px;
}

.stat-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 10px;
}

.stat-box strong {
  font-size: 34px;
  line-height: 1;
}

.content-panel {
  padding: 24px;
}

.cards-grid,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 22px;
}

.folder-card,
.admin-card,
.user-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 22px;
  padding: 12px;
}

.folder-image-wrap,
.admin-card-image-wrap {
  width: 100%;
  aspect-ratio: 3 / 5;
  border-radius: 16px;
  overflow: hidden;
  background: #1a1527;
  margin-bottom: 14px;
}

.folder-image,
.admin-card-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.folder-title,
.admin-card-title {
  margin: 0 0 10px;
  font-size: 18px;
  text-align: center;
  line-height: 1.35;
  word-break: break-word;
}

.folder-date,
.admin-card-date {
  text-align: center;
  color: #ff9ad8;
  font-size: 13px;
  margin-bottom: 4px;
}

.folder-time,
.admin-card-created {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 14px;
}

.folder-actions,
.admin-card-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.folder-btn {
  width: 100%;
  text-align: center;
  background: linear-gradient(135deg, var(--btn), var(--purple-2));
  color: #fff;
  padding: 12px 14px;
  border-radius: 999px;
}

.empty-state {
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 34px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 12px;
  margin-top: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 14px;
  font-weight: 700;
  color: #f3eaff;
}

.dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  padding: 18px;
  text-align: center;
  color: #d4c5f1;
}

.dropzone.dragover {
  background: rgba(139, 92, 246, 0.1);
  border-color: #8b5cf6;
}

.actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-danger {
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #dc2626;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.status {
  margin-top: 14px;
  min-height: 20px;
  font-size: 14px;
}

.status.success {
  color: #7dffb0;
}

.status.error {
  color: #ff8f8f;
}

.preview-box {
  margin-top: 10px;
}

.preview-box img {
  max-width: 180px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.users-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 18px;
}

.user-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.vip-badge,
.normal-badge {
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.vip-badge {
  background: rgba(139, 92, 246, 0.18);
  color: #e9d5ff;
}

.normal-badge {
  background: rgba(255, 255, 255, 0.08);
  color: #f5f3ff;
}

.muted-small {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 18px;
}

.visits-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  overflow: hidden;
}

.visits-table th,
.visits-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  font-size: 14px;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(460px, 100%);
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.35);
  padding: 28px;
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 36px;
}

.auth-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.full-btn {
  width: 100%;
}

@media (max-width: 900px) {
  .hero-panel {
    flex-direction: column;
  }

  .hero-stats {
    width: 100%;
  }
}

@media (max-width: 700px) {
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 0;
  }

  .header-tools {
    width: 100%;
  }

  .search-input {
    width: 100%;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .cards-grid,
  .admin-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .user-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}