:root {
  --bg: #0f1418;
  --surface: #182026;
  --surface-2: #232a33;
  --surface-3: #2b3440;
  --gold: #b49d56;
  --gold-soft: #d7c58e;
  --text: #ece8df;
  --muted: #9aa3ad;
  --border: rgba(180, 157, 86, 0.18);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --transition: 0.2s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  background: #0f1418;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: #0f1418;
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

#root {
  min-height: 100vh;
  background: #0f1418;
  background: var(--bg);
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

.App {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

.bg-grid,
.blur-1,
.blur-2 {
  display: none;
}

.tabs-bar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 64px;
  padding: 10px 24px;
  overflow-x: auto;
  background: #151b20;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.tab-item {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: #202930;
  transition: var(--transition);
}

.tab-item.active {
  border-color: rgba(180, 157, 86, 0.62);
  background: #2b302e;
}

.tab-item button {
  width: auto;
  height: auto;
  margin: 0;
  padding: 10px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.tab-item button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.tab-item .tab-close {
  padding: 10px 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 12px;
}

.app-content {
  min-height: calc(100vh - 64px);
}

.App .top-line {
  position: absolute;
  top: 0;
  left: 50%;
  width: 140px;
  height: 2px;
  transform: translateX(-50%);
  background: var(--gold);
}

.loader {
  display: grid;
  min-height: 100vh;
  place-items: center;
  color: var(--gold-soft);
  font-weight: 700;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 3px;
}

@media (max-width: 680px) {
  .tabs-bar {
    min-height: 58px;
    padding: 8px 14px;
  }

  .app-content {
    min-height: calc(100vh - 58px);
  }
}

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1;
  background: var(--bg);
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(
      rgba(255, 255, 255, 0.015) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.015) 1px,
      transparent 1px
    );
  background-size: 60px 60px;
  -webkit-mask-image: radial-gradient(
    circle at center,
    black,
    transparent 90%
  );
          mask-image: radial-gradient(
    circle at center,
    black,
    transparent 90%
  );
  pointer-events: none;
}

.blur-1,
.blur-2 {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
}

.blur-1 {
  width: 500px;
  height: 500px;
  background: rgba(180, 157, 86, 0.08);
  top: -120px;
  right: -100px;
}

.blur-2 {
  width: 420px;
  height: 420px;
  background: rgba(180, 157, 86, 0.05);
  bottom: -120px;
  left: -100px;
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 470px;
  padding: 52px 42px;
  border-radius: 42px;
  background: rgba(31, 36, 42, 0.72);
  border: 1px solid rgba(180, 157, 86, 0.12);
  -webkit-backdrop-filter: blur(22px);
          backdrop-filter: blur(22px);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  z-index: 5;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.04),
      transparent 30%
    );
  pointer-events: none;
}

.top-line {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(180, 157, 86, 0.7),
    transparent
  );
}

.logo {
  width: 92px;
  height: 92px;
  margin: auto;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(180, 157, 86, 0.12);
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.status {
  width: -webkit-fit-content;
  width: fit-content;
  margin: 22px auto 0;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(180, 157, 86, 0.08);
  border: 1px solid rgba(180, 157, 86, 0.14);
  color: #d7c58e;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.login-card h1 {
  margin-top: 24px;
  color: #ece8df;
  font-size: 48px;
  line-height: 1;
  text-align: center;
  font-weight: 800;
  letter-spacing: -2px;
}

.desc {
  margin-top: 18px;
  text-align: center;
  color: #7f8792;
  font-size: 15px;
  line-height: 1.7;
}

.login-card form {
  margin-top: 38px;
}

.input-group {
  margin-bottom: 22px;
}

.login-card label {
  display: block;
  margin-bottom: 12px;
  color: #ece8df;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.login-card input {
  width: 100%;
  height: 66px;
  padding: 0 22px;
  border-radius: 22px;
  border: 1px solid transparent;
  background: rgba(43, 52, 64, 0.72);
  color: #ece8df;
  font-size: 15px;
  font-weight: 500;
  outline: none;
  transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.2px;
}

.login-card input::placeholder {
  color: #7f8792;
}

.login-card input:hover {
  background: rgba(43, 52, 64, 0.92);
}

.login-card input:focus {
  border-color: rgba(180, 157, 86, 0.42);
  background: rgba(43, 52, 64, 1);
  box-shadow:
    0 0 0 4px rgba(180, 157, 86, 0.08),
    0 10px 30px rgba(0, 0, 0, 0.18);
}

.input-info {
  display: block;
  margin-top: 10px;
  padding-left: 4px;
  color: #6f7782;
  font-size: 12px;
  line-height: 1.5;
}

.input-error {
  display: block;
  color: #ff6b6b;
  font-size: 12px;
  margin-top: 8px;
  padding-left: 4px;
  font-weight: 500;
}

.login-card button {
  width: 100%;
  height: 66px;
  border: none;
  border-radius: 22px;
  margin-top: 10px;
  background:
    linear-gradient(
      135deg,
      #d7c58e,
      #b49d56
    );
  color: #111318;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.login-card button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 120%;
  height: 100%;
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.22),
      transparent
    );
  transition: 0.8s;
}

.login-card button:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(180, 157, 86, 0.22);
}

.login-card button:hover:not(:disabled)::before {
  left: 120%;
}

.login-card button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.form-message {
  margin-top: 16px;
  padding: 12px;
  border-radius: 18px;
  text-align: center;
  font-size: 13px;
  background: rgba(255, 107, 107, 0.1);
  color: #ff8787;
  border: 1px solid rgba(255, 107, 107, 0.2);
}

.secure {
  margin-top: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #737b86;
  font-size: 13px;
}

.secure-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b49d56;
}

.footer {
  margin-top: 34px;
  text-align: center;
  color: #5f6670;
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 640px) {
  .login-card {
    padding: 40px 24px;
    border-radius: 34px;
  }

  .login-card h1 {
    font-size: 38px;
  }

  .logo {
    width: 84px;
    height: 84px;
  }

  .login-card input,
  .login-card button {
    height: 62px;
  }
}

.dashboard-wrapper {
  position: relative;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  grid-gap: 26px;
  gap: 26px;
  padding: 40px 24px 60px;
  min-height: 100vh;
  z-index: 1;
  background: var(--bg);
}

.sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: 24px;
  align-self: start;
  min-height: calc(100vh - 48px);
  padding: 28px 22px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.sidebar-brand {
  color: #ece8df;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 18px;
}

.sidebar-user {
  color: #b49d56;
  font-size: 14px;
  margin-bottom: 28px;
  line-height: 1.7;
}

.sidebar-user strong {
  display: block;
  margin-top: 6px;
  color: #ece8df;
}

.sidebar-nav {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
  margin-bottom: 24px;
}

.nav-item {
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #ece8df;
  font-weight: 600;
  padding: 14px 16px;
  border-radius: 18px;
  cursor: pointer;
  transition: var(--transition);
}

.nav-item:hover,
.nav-item.active {
  background: rgba(180, 157, 86, 0.16);
  color: #d7c58e;
  border-color: rgba(180, 157, 86, 0.28);
}

.nav-item.admin {
  margin-top: 16px;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(180, 157, 86, 0.12));
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: #fca5a5;
  font-weight: 700;
}

.nav-item.admin:hover {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.25), rgba(180, 157, 86, 0.18));
}

.sidebar-logout {
  margin-top: auto;
}

.dashboard-main {
  min-width: 0;
}

.account-panel,
.exam-panel,
.certificates-panel {
  display: grid;
  grid-gap: 18px;
  gap: 18px;
  padding: 22px;
  border-radius: 24px;
  background: rgba(43, 52, 64, 0.72);
  border: 1px solid rgba(180, 157, 86, 0.08);
}

.account-panel h2,
.exam-panel h2,
.certificates-panel h2 {
  color: #ece8df;
}

.account-row,
.dashboard-wrapper .exam-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: #d7c58e;
}

.account-row span,
.dashboard-wrapper .exam-card h3 {
  color: #7f8792;
  font-weight: 600;
}

.exam-list,
.certificate-list {
  display: grid;
  grid-gap: 16px;
  gap: 16px;
}

.certificate-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #d7c58e;
}

.certificate-card h3 {
  color: #ece8df;
  margin: 0 0 8px;
}

.certificate-card p {
  color: #b8b0a5;
  margin: 0;
}

.certificate-card span {
  display: inline-block;
  font-weight: 700;
  color: #d7c58e;
  margin-bottom: 4px;
}

.certificate-actions {
  display: grid;
  justify-items: end;
  grid-gap: 8px;
  gap: 8px;
  min-width: 150px;
}

.certificate-download-btn {
  border: 1px solid rgba(180, 157, 86, 0.38);
  border-radius: 14px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #d7c58e, #b49d56);
  color: #0f141a;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
}

.certificate-download-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(180, 157, 86, 0.18);
}

.certificate-download-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.certificate-error {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  font-weight: 700;
}

.session-history-panel {
  margin-top: 20px;
}

.session-card {
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.session-card p + p {
  margin-top: 8px;
}

.session-card strong {
  color: var(--gold-soft);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  color: #ece8df;
  text-align: center;
}

.empty-state h2 {
  margin: 0;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(
      rgba(255, 255, 255, 0.015) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.015) 1px,
      transparent 1px
    );
  background-size: 60px 60px;
  -webkit-mask-image: radial-gradient(
    circle at center,
    black,
    transparent 90%
  );
          mask-image: radial-gradient(
    circle at center,
    black,
    transparent 90%
  );
  pointer-events: none;
}

.blur-1,
.blur-2 {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
}

.blur-1 {
  width: 500px;
  height: 500px;
  background: rgba(180, 157, 86, 0.08);
  top: -120px;
  right: -100px;
}

.blur-2 {
  width: 420px;
  height: 420px;
  background: rgba(180, 157, 86, 0.05);
  bottom: -120px;
  left: -100px;
}

.dashboard-card {
  position: relative;
  width: 100%;
  max-width: 1100px;
  padding: 52px 42px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 5;
}

.dashboard-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.04),
      transparent 30%
    );
  pointer-events: none;
}

.dashboard-header {
  margin-bottom: 32px;
}

.dashboard-header h1 {
  color: #ece8df;
  font-size: 42px;
  margin-bottom: 10px;
}

.dashboard-subtitle {
  color: #7f8792;
  line-height: 1.8;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 18px;
  gap: 18px;
  margin-bottom: 32px;
}

.status-card {
  padding: 24px;
  border-radius: 24px;
  background: rgba(43, 52, 64, 0.7);
  border: 1px solid rgba(180, 157, 86, 0.1);
}

.status-card h3 {
  color: #d7c58e;
  margin-bottom: 12px;
  font-size: 16px;
}

.status-card p {
  color: #ece8df;
  font-size: 30px;
  font-weight: 700;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.dashboard-wrapper .course-card {
  padding: 24px;
  border-radius: 24px;
  background: var(--surface-2);
  border: 1px solid rgba(180, 157, 86, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dashboard-wrapper .course-card-head {
  display: flex;
  justify-content: flex-end;
}

.course-badge {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #d7c58e;
  background: rgba(180, 157, 86, 0.1);
}

.dashboard-wrapper .course-card h2 {
  color: #ece8df;
  margin: 18px 0 12px;
  font-size: 22px;
}

.dashboard-wrapper .course-card p {
  color: #7f8792;
  line-height: 1.8;
  min-height: 70px;
}

.course-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  gap: 14px;
  flex-wrap: wrap;
}

.course-footer span {
  color: #d7c58e;
  font-weight: 600;
}

.dashboard-wrapper .btn-primary,
.dashboard-wrapper .logout-btn {
  border: none;
  border-radius: 22px;
  cursor: pointer;
  padding: 16px 26px;
  font-size: 15px;
  font-weight: 700;
  transition: var(--transition);
}

.dashboard-wrapper .btn-primary {
  background: var(--gold-soft);
  color: #111318;
}

.dashboard-wrapper .btn-primary:hover:not(:disabled),
.dashboard-wrapper .logout-btn:hover {
  transform: translateY(-2px);
}

.dashboard-wrapper .logout-btn {
  width: 100%;
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #ece8df;
}

@media (max-width: 980px) {
  .dashboard-wrapper {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
  }

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

@media (max-width: 860px) {
  .courses-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .dashboard-card {
    padding: 36px 24px;
    border-radius: 34px;
  }

  .dashboard-wrapper {
    padding: 20px 14px 36px;
  }

  .dashboard-header h1 {
    font-size: 32px;
  }

  .dashboard-wrapper .btn-primary,
  .dashboard-wrapper .logout-btn {
    width: 100%;
  }
}

.course-wrapper {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px 80px;
  min-height: 100vh;
  z-index: 1;
  background: var(--bg);
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(
      rgba(255, 255, 255, 0.015) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.015) 1px,
      transparent 1px
    );
  background-size: 60px 60px;
  -webkit-mask-image: radial-gradient(
    circle at center,
    black,
    transparent 90%
  );
          mask-image: radial-gradient(
    circle at center,
    black,
    transparent 90%
  );
  pointer-events: none;
}

.blur-1,
.blur-2 {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
}

.blur-1 {
  width: 500px;
  height: 500px;
  background: rgba(180, 157, 86, 0.08);
  top: -120px;
  right: -100px;
}

.blur-2 {
  width: 420px;
  height: 420px;
  background: rgba(180, 157, 86, 0.05);
  bottom: -120px;
  left: -100px;
}

.course-wrapper .course-card {
  position: relative;
  width: 100%;
  max-width: 650px;
  padding: 52px 42px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 5;
}

.course-wrapper .course-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.04),
      transparent 30%
    );
  pointer-events: none;
}

.top-line {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(180, 157, 86, 0.7),
    transparent
  );
}

.course-wrapper .course-card h1 {
  color: #ece8df;
  font-size: 42px;
  margin-bottom: 16px;
}

.course-desc {
  color: #c8c2b7;
  font-size: 17px;
  line-height: 1.9;
  margin-bottom: 32px;
}

.course-section {
  margin-bottom: 30px;
  padding: 24px 24px 26px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.course-section h2 {
  color: #f7f2e8;
  margin-bottom: 16px;
  font-size: 22px;
}

.course-section p {
  color: #d9d2c5;
  line-height: 1.85;
  margin-bottom: 14px;
}

.video-container {
  margin-top: 20px;
  padding: 24px;
  border-radius: 24px;
  background: rgba(16, 20, 28, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-container h2 {
  color: #f5e8c8;
  font-size: 20px;
  margin-bottom: 18px;
}

.video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.course-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.course-wrapper .btn-primary,
.course-wrapper .btn-secondary {
  border: none;
  border-radius: 22px;
  cursor: pointer;
  padding: 16px 28px;
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.course-wrapper .btn-primary:hover,
.course-wrapper .btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.course-wrapper .btn-primary {
  background: var(--gold-soft);
  color: #111318;
}

.course-wrapper .btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #ece8df;
}

@media (max-width: 680px) {
  .course-wrapper .course-card {
    padding: 34px 22px;
    border-radius: 32px;
  }

  .course-wrapper .course-card h1 {
    font-size: 34px;
  }

  .course-section {
    padding: 20px;
  }

  .course-wrapper .btn-primary,
  .course-wrapper .btn-secondary {
    width: 100%;
  }
}

.exam-wrapper {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px 80px;
  min-height: 100vh;
  z-index: 1;
  background: var(--bg);
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 58px 58px;
  opacity: 0.18;
  pointer-events: none;
}

.blur-1,
.blur-2 {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
}

.blur-1 {
  width: 520px;
  height: 520px;
  background: rgba(213, 182, 96, 0.16);
  top: -140px;
  right: -120px;
}

.blur-2 {
  width: 460px;
  height: 460px;
  background: rgba(89, 104, 191, 0.12);
  bottom: -140px;
  left: -120px;
}

.exam-wrapper .exam-card {
  position: relative;
  width: 100%;
  max-width: 820px;
  padding: 52px 46px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 5;
}

.exam-wrapper .exam-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 35%);
  pointer-events: none;
}

.top-line {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 2px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(213, 182, 96, 0.92),
    transparent
  );
}

.exam-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.exam-subtitle {
  color: #d7c58e;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  margin-bottom: 12px;
}

.exam-wrapper .exam-card h1 {
  color: #f4f1e9;
  font-size: 42px;
  line-height: 1.05;
  margin-bottom: 10px;
}

.exam-note {
  color: #c2b9a3;
  font-size: 15px;
  line-height: 1.9;
  max-width: 520px;
}

.exam-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 16px;
  gap: 16px;
  width: 100%;
}

.summary-pill {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 24px 26px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.06);
  color: #f3e9c3;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  min-height: 112px;
}

.summary-pill::before {
  content: "Durum";
  color: #b8ae94;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.summary-pill {
  font-size: 15px;
  line-height: 1.6;
}

.progress-bar {
  margin: 30px 0 26px;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-fill {
  width: calc(var(--progress) * 1%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, #e0c87f, #ffd786);
  box-shadow: 0 0 20px rgba(231, 194, 97, 0.45);
  transition: width 0.35s ease;
}

.question-card {
  padding: 28px;
  border-radius: 30px;
  background: rgba(19, 29, 44, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.14);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.question-card:hover {
  transform: translateY(-2px);
  border-color: rgba(213, 182, 96, 0.2);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.2);
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.question-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #f2efd9;
  font-size: 13px;
  font-weight: 700;
}

.question-status {
  color: #dbc57c;
  font-size: 13px;
  font-weight: 700;
}

.question-text {
  color: #f3f3f2;
  font-size: 18px;
  line-height: 1.9;
  margin-bottom: 24px;
}

.options {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
}

.option-label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px 18px 60px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  color: #d8cd9d;
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.option-label:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
}

.option-label::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.option-label.selected {
  background: rgba(213, 182, 96, 0.22);
  border-color: rgba(213, 182, 96, 0.38);
  color: #ffffff;
}

.option-label.selected::before {
  border-color: #d7c58e;
  background: linear-gradient(135deg, rgba(215, 197, 142, 0.28), rgba(255, 255, 255, 0.14));
}

.option-label.selected::after {
  content: "";
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d7c58e;
}

.option-label input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-label span {
  display: block;
  font-size: 15px;
  line-height: 1.85;
}

.exam-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.exam-wrapper .btn-primary,
.exam-wrapper .btn-secondary {
  border: none;
  border-radius: 24px;
  cursor: pointer;
  padding: 16px 38px;
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.2s ease;
}

.exam-wrapper .btn-primary {
  background: var(--gold-soft);
  color: #111318;
  box-shadow: 0 18px 37px rgba(215, 197, 142, 0.24);
}

.exam-wrapper .btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 22px 45px rgba(215, 197, 142, 0.32);
}

.exam-wrapper .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #f6f2df;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.exam-wrapper .btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.exam-wrapper .btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.results-box {
  margin-top: 34px;
  padding: 30px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(213, 182, 96, 0.16), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(213, 182, 96, 0.2);
  color: #f2ede0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.results-box h2 {
  margin-bottom: 14px;
  font-size: 24px;
  letter-spacing: 0.02em;
}

.results-box p {
  margin-bottom: 12px;
  line-height: 1.75;
  color: #eae3cb;
}

@media (max-width: 780px) {
  .exam-header {
    flex-direction: column;
  }

  .exam-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .exam-wrapper .exam-card {
    padding: 36px 24px;
    border-radius: 32px;
  }

  .exam-wrapper .exam-card h1 {
    font-size: 32px;
  }

  .summary-pill {
    min-width: 0;
    min-width: initial;
    width: 100%;
  }

  .exam-wrapper .btn-primary,
  .exam-wrapper .btn-secondary {
    width: 100%;
  }
}

.admin-panel {
  min-height: 100vh;
  padding: 36px 24px 60px;
  background: var(--bg);
  color: var(--text);
}

.admin-container {
  max-width: 1180px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: #202930;
}

.admin-navbar .brand {
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
}

.admin-navbar .nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-search,
.form-group input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  outline: 0;
  background: #151b20;
  color: var(--text);
  font: inherit;
  transition: var(--transition);
}

.user-search {
  min-width: 270px;
}

.user-search::placeholder,
.form-group input::placeholder {
  color: var(--muted);
}

.user-search:focus,
.form-group input:focus {
  border-color: rgba(180, 157, 86, 0.7);
  box-shadow: 0 0 0 3px rgba(180, 157, 86, 0.12);
}

.add-user-btn,
.generate-certificates-btn,
.back-btn,
.submit-btn,
.edit-btn,
.download-btn,
.save-btn,
.cancel-btn,
.delete-btn {
  width: auto;
  height: auto;
  margin: 0;
  padding: 11px 15px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
}

.add-user-btn,
.submit-btn,
.save-btn {
  background: var(--gold-soft);
  color: #111318;
}

.edit-btn {
  border-color: rgba(180, 157, 86, 0.36);
  background: rgba(180, 157, 86, 0.12);
  color: var(--gold-soft);
}

.download-btn {
  border-color: rgba(96, 165, 250, 0.32);
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
}

.download-btn:disabled {
  opacity: 0.62;
  cursor: wait;
}

.cancel-btn {
  border-color: rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--text);
}

.generate-certificates-btn {
  border-color: rgba(134, 239, 172, 0.3);
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
}

.generate-certificates-btn:disabled {
  opacity: 0.62;
  cursor: wait;
}

.back-btn {
  border-color: rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--text);
}

.add-user-btn:hover,
.generate-certificates-btn:hover:not(:disabled),
.back-btn:hover,
.submit-btn:hover,
.edit-btn:hover,
.download-btn:hover:not(:disabled),
.save-btn:hover,
.cancel-btn:hover,
.delete-btn:hover {
  transform: translateY(-2px);
}

.add-user-form {
  margin: 20px 24px;
  padding: 22px;
  border: 1px solid rgba(180, 157, 86, 0.16);
  border-radius: var(--radius-lg);
  background: #202930;
}

.add-user-form h2,
.users-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
}

.add-user-form form {
  margin-top: 18px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group > label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.courses-select {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.course-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: #182026;
  color: var(--muted);
  cursor: pointer;
}

.course-checkbox.selected {
  border-color: rgba(180, 157, 86, 0.45);
  background: rgba(180, 157, 86, 0.12);
  color: var(--gold-soft);
}

.course-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
}

.alert {
  margin: 16px 24px;
  padding: 13px 15px;
  border-radius: 12px;
  font-weight: 700;
}

.alert.error {
  background: rgba(220, 38, 38, 0.12);
  color: #fca5a5;
}

.alert.success {
  background: rgba(34, 197, 94, 0.1);
  color: #86efac;
}

.certificate-result {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 16px 24px;
  padding: 16px;
  border: 1px solid rgba(134, 239, 172, 0.2);
  border-radius: 14px;
  background: rgba(34, 197, 94, 0.07);
  color: var(--text);
}

.certificate-result strong {
  flex-basis: 100%;
  color: #86efac;
}

.certificate-result-errors {
  flex-basis: 100%;
  padding-top: 8px;
  color: #fca5a5;
  font-size: 13px;
}

.certificate-download-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 24px;
  padding: 16px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 14px;
  background: rgba(59, 130, 246, 0.06);
}

.download-panel-summary {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
}

.download-panel-summary strong {
  color: var(--text);
  font-size: 16px;
}

.download-panel-summary span {
  color: var(--muted);
  font-size: 13px;
}

.download-panel-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
}

.download-panel-controls label {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
  color: var(--gold-soft);
  font-size: 12px;
  font-weight: 800;
}

.download-panel-controls input,
.download-panel-controls select {
  height: 40px;
  min-width: 150px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  outline: 0;
  background: #151b20;
  color: var(--text);
  font: inherit;
}

.loading,
.no-users {
  padding: 40px 24px;
  color: var(--muted);
  text-align: center;
}

.users-header {
  padding: 20px 24px 8px;
}

.users-table {
  margin: 12px 24px 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
}

.table-header,
.table-row {
  display: grid;
  grid-template-columns: 34px 1.25fr 1.05fr 1.65fr 0.75fr 240px;
  grid-gap: 14px;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
}

.table-header {
  background: #202930;
  color: var(--gold-soft);
  font-size: 13px;
  font-weight: 800;
}

.table-row {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.table-row:hover {
  background: rgba(255, 255, 255, 0.025);
}

.table-row.editing {
  align-items: start;
  background: rgba(255, 255, 255, 0.025);
}

.col-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.user-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--gold-soft);
  color: #111318;
  font-weight: 800;
}

.col-email,
.col-date {
  color: var(--muted);
  font-size: 14px;
}

.col-action {
  text-align: right;
}

.col-select {
  display: flex;
  align-items: center;
  justify-content: center;
}

.col-select input {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.edit-field {
  display: block;
  font-weight: 400;
}

.edit-field label {
  display: block;
  margin: 0 0 6px;
  color: var(--gold-soft);
  font-size: 12px;
  font-weight: 800;
}

.edit-field label:not(:first-child) {
  margin-top: 10px;
}

.edit-field input {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  outline: 0;
  background: #151b20;
  color: var(--text);
  font: inherit;
}

.edit-field input:focus {
  border-color: rgba(180, 157, 86, 0.7);
  box-shadow: 0 0 0 3px rgba(180, 157, 86, 0.12);
}

.edit-courses {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.user-course {
  display: inline-block;
  margin: 2px 4px 2px 0;
  padding: 5px 7px;
  border-radius: 8px;
  background: #202930;
  color: var(--muted);
  font-size: 12px;
}

.delete-btn {
  padding: 8px 12px;
  background: #7f2f35;
  color: #fff;
}

.edit-btn,
.download-btn,
.save-btn,
.cancel-btn {
  padding: 8px 10px;
}

@media (max-width: 860px) {
  .admin-navbar,
  .admin-navbar .nav-actions,
  .certificate-download-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .download-panel-controls {
    justify-content: stretch;
  }

  .download-panel-controls label,
  .download-panel-controls input,
  .download-panel-controls select,
  .download-panel-controls .download-btn {
    width: 100%;
  }

  .user-search {
    min-width: 0;
  }

  .table-header {
    display: none;
  }

  .users-table {
    overflow: visible;
    border: 0;
  }

  .table-row {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    background: #182026;
  }

  .col-action {
    justify-content: flex-start;
    text-align: left;
  }

  .col-select {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .admin-panel {
    padding: 20px 14px 36px;
  }

  .admin-navbar,
  .add-user-form {
    padding: 18px;
  }

  .add-user-form,
  .users-table,
  .certificate-download-panel {
    margin-right: 14px;
    margin-left: 14px;
  }
}

.agreement-wrapper {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 80% 10%, rgba(180, 157, 86, 0.12), transparent 34%),
    radial-gradient(circle at 10% 90%, rgba(180, 157, 86, 0.07), transparent 32%),
    var(--bg);
}

.agreement-card {
  position: relative;
  width: min(880px, 100%);
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  padding: 34px;
  border: 1px solid rgba(180, 157, 86, 0.2);
  border-radius: 28px;
  background: rgba(31, 36, 42, 0.96);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.4);
}

.agreement-top-line {
  position: absolute;
  top: 0;
  left: 50%;
  width: 180px;
  height: 2px;
  transform: translateX(-50%);
  background: var(--gold);
}

.agreement-header {
  display: flex;
  gap: 20px;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.agreement-header img {
  width: 74px;
  height: 74px;
  border-radius: 20px;
  object-fit: cover;
}

.agreement-header p,
.agreement-header h1,
.agreement-header span,
.agreement-content p,
.agreement-note {
  margin: 0;
}

.agreement-error {
  margin: 14px 0 0;
  color: #ff8f8f;
  font-size: 13px;
  text-align: right;
}

.agreement-header p {
  color: var(--gold-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.agreement-header h1 {
  margin: 5px 0 7px;
  color: var(--text);
  font-size: clamp(23px, 3vw, 31px);
}

.agreement-header span,
.agreement-content p,
.agreement-note {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.agreement-content {
  display: grid;
  grid-gap: 16px;
  gap: 16px;
  margin-top: 22px;
}

.agreement-content section {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  background: rgba(13, 18, 23, 0.34);
}

.agreement-content h2 {
  margin: 0 0 10px;
  color: var(--gold-soft);
  font-size: 17px;
}

.agreement-content p + p {
  margin-top: 8px;
}

.agreement-checks {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
  margin-top: 20px;
}

.agreement-checks label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid rgba(180, 157, 86, 0.16);
  border-radius: 14px;
  color: var(--text);
  background: rgba(180, 157, 86, 0.05);
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
}

.agreement-checks input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--gold);
}

.agreement-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 22px;
}

.agreement-actions button {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 13px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.agreement-primary {
  background: var(--gold);
  color: #111318;
}

.agreement-primary:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.agreement-secondary {
  border-color: rgba(255, 255, 255, 0.1) !important;
  background: transparent;
  color: var(--text);
}

.agreement-note {
  margin-top: 14px;
  text-align: right;
  font-size: 12px;
}

@media (max-width: 620px) {
  .agreement-wrapper {
    padding: 14px;
  }

  .agreement-card {
    max-height: calc(100vh - 28px);
    padding: 24px 18px;
    border-radius: 20px;
  }

  .agreement-header {
    align-items: flex-start;
  }

  .agreement-header img {
    width: 58px;
    height: 58px;
    border-radius: 16px;
  }

  .agreement-content section {
    padding: 16px;
  }

  .agreement-actions {
    flex-direction: column-reverse;
  }

  .agreement-actions button {
    width: 100%;
  }
}

