:root {
  color-scheme: dark;
  --bg: #081226;
  --surface: rgba(13, 24, 48, 0.78);
  --surface-strong: rgba(18, 33, 64, 0.92);
  --text: #edf4ff;
  --muted: #9eb0cf;
  --line: rgba(135, 171, 233, 0.18);
  --brand: #4f8cff;
  --brand-dark: #2d67d8;
  --success: #67d4a3;
  --shadow: 0 30px 80px rgba(3, 10, 24, 0.45);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --font-main: "Segoe UI", "Trebuchet MS", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-main);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(84, 135, 255, 0.38), transparent 28%),
    radial-gradient(circle at 85% 18%, rgba(0, 199, 255, 0.18), transparent 22%),
    radial-gradient(circle at bottom right, rgba(98, 74, 255, 0.2), transparent 30%),
    linear-gradient(180deg, #091224 0%, #0b1730 46%, #050b17 100%);
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  position: relative;
  overflow: hidden;
}

.ambient {
  position: fixed;
  z-index: 0;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.45;
}

.ambient-left {
  top: -80px;
  left: -100px;
  background: rgba(60, 115, 255, 0.85);
}

.ambient-right {
  right: -120px;
  bottom: 10%;
  background: rgba(0, 180, 255, 0.58);
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 18px 48px;
}

.hero-card,
.panel,
.status-card {
  backdrop-filter: blur(12px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 26px;
}

.hero-header,
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  object-fit: cover;
  background: #ead9c9;
}

.eyebrow,
.section-label {
  margin: 0 0 6px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 42px);
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(28px, 3.2vw, 38px);
}

h3 {
  margin-bottom: 0;
  font-size: 24px;
}

.role-badge {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(191, 95, 54, 0.14);
  color: var(--brand-dark);
  font-weight: 700;
}

.tutor-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 24px;
  margin-top: 28px;
}

.about-text {
  font-size: 17px;
  line-height: 1.65;
  color: #d9e6ff;
}

.photo-frame {
  min-height: 320px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(31, 60, 118, 0.95), rgba(11, 109, 169, 0.45));
}

.tutor-photo {
  width: 100%;
  height: 100%;
  min-height: 288px;
  object-fit: cover;
  border-radius: 22px;
  background: #13284c;
}

.status-card {
  margin-top: 22px;
  padding: 18px 22px;
  color: var(--success);
  font-weight: 700;
}

.status-card strong,
.status-card span {
  display: block;
}

.status-card strong {
  margin-bottom: 8px;
  font-size: 18px;
}

.status-card-actions {
  margin-top: 14px;
}

.panel {
  margin-top: 22px;
  padding: 24px;
}

.ghost-button,
.primary-button,
.slot-button,
.danger-button {
  border: none;
  border-radius: 18px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.ghost-button:hover,
.primary-button:hover,
.slot-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

.ghost-button {
  padding: 12px 16px;
  color: var(--text);
  background: rgba(20, 38, 72, 0.96);
  border: 1px solid var(--line);
}

.primary-button {
  padding: 14px 18px;
  background: var(--brand);
  color: white;
  font-weight: 700;
}

.danger-button {
  padding: 10px 14px;
  background: rgba(255, 99, 132, 0.14);
  color: #ff9db2;
  font-weight: 700;
}

.days-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 8px 0 6px;
  margin-top: 22px;
  scrollbar-width: none;
}

.days-row::-webkit-scrollbar {
  display: none;
}

.day-pill {
  min-width: 112px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  cursor: pointer;
}

.day-pill.active {
  background: linear-gradient(135deg, #4f8cff, #2c6fe7);
  color: white;
}

.slot-button {
  padding: 16px 18px;
  color: var(--text);
  background: rgba(15, 29, 57, 0.96);
  border: 1px solid var(--line);
  text-align: left;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.empty-state {
  margin-top: 22px;
  color: var(--muted);
}

.admin-layout,
.admin-tables {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.admin-tables {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.card-stack label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--text);
  background: rgba(9, 18, 38, 0.88);
}

.file-input {
  position: relative;
  padding: 18px;
  border: 1px dashed rgba(135, 171, 233, 0.28);
  border-radius: 18px;
  background: rgba(10, 20, 42, 0.88);
}

.file-input input {
  padding: 0;
  border: none;
}

.list-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(10, 20, 42, 0.88);
}

.list-item strong,
.list-item span {
  display: block;
}

.hidden {
  display: none !important;
}

@media (max-width: 960px) {
  .tutor-grid,
  .admin-layout,
  .admin-tables {
    grid-template-columns: 1fr;
  }

  .hero-header,
  .panel-header,
  .list-item {
    flex-direction: column;
    align-items: flex-start;
  }
}
