/* Ece Akademi arayüz stilleri. Renkler tema değişkenlerindedir; koyu tema data-theme="dark" ile açılır. */
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../vendor/roboto/roboto-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../vendor/roboto/roboto-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --app-bg: #f6f7fb;
  --app-surface: #ffffff;
  --app-border: #eceef4;
  --app-text: #1f2333;
  --app-muted: #7a8094;
  --app-primary: #7b2cbf;
  --app-primary-2: #e0218a;
  --app-primary-soft: #f3e8ff;
  --app-blue: #4a8fe7;
  --app-green: #2fbf71;
  --app-red: #e5383b;
  --app-orange: #f4a338;
  --app-shadow: 0 4px 18px rgba(31, 35, 51, 0.08);
  --app-shadow-hover: 0 10px 28px rgba(31, 35, 51, 0.16);
  --app-navbar-height: 70px;
  --app-rail-width: 64px;
  --app-sidebar-width: 250px;
  --bs-body-font-family: "Roboto", "Segoe UI", system-ui, sans-serif;
  --bs-primary: #7b2cbf;
  --bs-primary-rgb: 123, 44, 191;
  --bs-link-color: #7b2cbf;
  --bs-link-color-rgb: 123, 44, 191;
  --bs-link-hover-color: #5b1f91;
}

[data-theme="dark"] {
  --app-bg: #12131a;
  --app-surface: #1b1d27;
  --app-border: #2a2d3a;
  --app-text: #e7e8ee;
  --app-muted: #9aa0b4;
  --app-primary: #b77cf0;
  --app-primary-soft: #2c2140;
  --app-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  --app-shadow-hover: 0 10px 28px rgba(0, 0, 0, 0.55);
  --bs-primary: #b77cf0;
  --bs-primary-rgb: 183, 124, 240;
  --bs-link-color: #c79bf5;
  --bs-link-color-rgb: 199, 155, 245;
}

body {
  background: var(--app-bg);
  color: var(--app-text);
  font-family: var(--bs-body-font-family);
}

.btn-primary {
  --bs-btn-bg: var(--app-primary);
  --bs-btn-border-color: var(--app-primary);
  --bs-btn-hover-bg: #6420a3;
  --bs-btn-hover-border-color: #6420a3;
  --bs-btn-active-bg: #561b8c;
  --bs-btn-active-border-color: #561b8c;
  --bs-btn-disabled-bg: var(--app-primary);
  --bs-btn-disabled-border-color: var(--app-primary);
}

.btn-outline-primary {
  --bs-btn-color: var(--app-primary);
  --bs-btn-border-color: var(--app-primary);
  --bs-btn-hover-bg: var(--app-primary);
  --bs-btn-hover-border-color: var(--app-primary);
  --bs-btn-active-bg: var(--app-primary);
  --bs-btn-active-border-color: var(--app-primary);
}

.btn-gradient {
  background: linear-gradient(90deg, var(--app-primary), var(--app-primary-2));
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1.3rem;
  font-weight: 600;
}

.btn-gradient:hover {
  color: #fff;
  filter: brightness(1.08);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--app-primary);
  box-shadow: 0 0 0 0.2rem rgba(123, 44, 191, 0.18);
}

/* Navbar */
.app-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--app-navbar-height);
  background: var(--app-surface);
  box-shadow: 0 2px 12px rgba(31, 35, 51, 0.06);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  z-index: 1030;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
}

.app-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--app-primary), var(--app-primary-2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.app-brand-text {
  line-height: 1.05;
}

.app-brand-text strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--app-primary), var(--app-primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.app-brand-text small {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--app-muted);
  font-weight: 600;
}

.app-search {
  flex: 1;
  max-width: 760px;
  margin: 0 auto;
  position: relative;
}

.app-search input {
  border-radius: 999px;
  padding: 0.65rem 1rem 0.65rem 2.6rem;
  border: 1px solid #cfd3de;
  background: var(--app-surface);
}

.app-search .bi-search {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--app-muted);
}

.app-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a5b4fc, #c4b5fd);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Sidebar: masaüstünde ikon şeridi, düğmeyle etiketli geniş hâl */
.app-sidebar {
  position: fixed;
  top: var(--app-navbar-height);
  bottom: 0;
  left: 0;
  width: var(--app-rail-width);
  background: var(--app-surface);
  border-right: 1px solid var(--app-border);
  padding: 18px 8px;
  z-index: 1020;
  display: flex;
  flex-direction: column;
  transition: width 0.18s ease;
  overflow-x: hidden;
}

.sidebar-expanded .app-sidebar {
  width: var(--app-sidebar-width);
  box-shadow: 6px 0 24px rgba(31, 35, 51, 0.1);
}

.sidebar-toggle {
  position: fixed;
  top: calc(var(--app-navbar-height) + 10px);
  left: calc(var(--app-rail-width) - 16px);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: #111;
  color: #fff;
  z-index: 1025;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: left 0.18s ease;
}

.sidebar-expanded .sidebar-toggle {
  left: calc(var(--app-sidebar-width) - 16px);
}

.sidebar-expanded .sidebar-toggle .bi::before {
  transform: rotate(180deg);
}

.app-sidebar .nav-link {
  color: var(--app-muted);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-weight: 500;
  white-space: nowrap;
  position: relative;
}

.app-sidebar .nav-link .bi {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.app-sidebar .nav-link span {
  opacity: 0;
  transition: opacity 0.12s ease;
}

.sidebar-expanded .app-sidebar .nav-link span {
  opacity: 1;
}

.app-sidebar .nav-link:hover {
  background: var(--app-primary-soft);
  color: var(--app-primary);
}

.app-sidebar .nav-link.active {
  color: var(--app-text);
  font-weight: 700;
}

.app-sidebar .nav-link.active::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: var(--app-text);
}

.app-sidebar .nav-link .menu-ai {
  color: var(--app-primary-2);
}

.app-sidebar .app-version {
  margin-top: auto;
  color: var(--app-muted);
  font-size: 0.72rem;
  padding: 8px 14px;
  white-space: nowrap;
  opacity: 0;
}

.sidebar-expanded .app-sidebar .app-version {
  opacity: 1;
}

.app-content {
  margin-left: var(--app-rail-width);
  padding: calc(var(--app-navbar-height) + 32px) 40px 40px;
  min-height: 100vh;
}

.page-title {
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 0;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0;
}

.greeting {
  font-size: 1.08rem;
}

.greeting strong {
  text-transform: uppercase;
}

.card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 14px;
  box-shadow: var(--app-shadow);
}

.card-header {
  background: transparent;
  border-bottom-color: var(--app-border);
}

.nav-tabs .nav-link.active {
  color: var(--app-primary);
  font-weight: 600;
}

/* Eğitim kartları */
.training-card {
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
  box-shadow: var(--app-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  color: var(--app-text);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  background: var(--app-surface);
}

.training-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--app-shadow-hover);
  color: var(--app-text);
}

.training-cover {
  height: 150px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.95);
  font-size: 3.6rem;
  overflow: hidden;
}

.training-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.25) 0 18%, transparent 19%),
                    radial-gradient(circle at 85% 90%, rgba(255, 255, 255, 0.18) 0 22%, transparent 23%);
}

.cover-0 { background: linear-gradient(135deg, #8e44ad, #c86dd7); }
.cover-1 { background: linear-gradient(135deg, #f7971e, #ffd200); }
.cover-2 { background: linear-gradient(135deg, #11998e, #38ef7d); }
.cover-3 { background: linear-gradient(135deg, #2b5876, #4e9af1); }
.cover-4 { background: linear-gradient(135deg, #e0218a, #ff7eb3); }
.cover-5 { background: linear-gradient(135deg, #ff512f, #f09819); }
.cover-6 { background: linear-gradient(135deg, #5f2c82, #49a09d); }
.cover-7 { background: linear-gradient(135deg, #c79081, #dfa579); }

.cover-badges {
  position: absolute;
  left: 12px;
  bottom: 10px;
  display: flex;
  gap: 6px;
  z-index: 1;
}

.tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  padding: 5px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  line-height: 1;
}

.tag-blue { background: var(--app-blue); }
.tag-green { background: var(--app-green); }
.tag-red { background: var(--app-red); }
.tag-orange { background: var(--app-orange); }
.tag-purple { background: var(--app-primary); }
.tag-gray { background: #8a90a2; }

.training-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.training-title {
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.training-meta {
  margin-top: auto;
  padding-top: 14px;
  color: var(--app-muted);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.training-progress {
  height: 5px;
  border-radius: 5px;
  background: var(--app-border);
  margin-top: 10px;
}

.training-progress .progress-bar {
  background: linear-gradient(90deg, var(--app-primary), var(--app-primary-2));
}

.card-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

/* Sağ sütun göstergeler */
.side-panel {
  border-radius: 14px;
}

.side-panel .panel-title {
  font-weight: 700;
  font-size: 1.05rem;
}

.gauge-wrap {
  position: relative;
  height: 170px;
}

.gauge-center {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  text-align: center;
}

.gauge-center .value {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
}

.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
}

.metric-tile {
  background: var(--app-bg);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-tile .value {
  font-size: 1.5rem;
  font-weight: 800;
}

.metric-tile .bi {
  font-size: 1.7rem;
}

/* Yönetici özet kartları */
.stat-card {
  border: 0;
  overflow: hidden;
  color: #fff;
}

.stat-card .card-body {
  position: relative;
}

.stat-card .stat-icon {
  position: absolute;
  right: 14px;
  top: 12px;
  font-size: 2.2rem;
  opacity: 0.35;
}

.stat-card .stat-value {
  font-size: 1.9rem;
  font-weight: 800;
}

.stat-card .stat-label {
  font-size: 0.85rem;
  opacity: 0.92;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 14px;
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
  text-decoration: none;
  color: var(--app-text);
  border: 1px solid var(--app-border);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
  text-align: left;
}

.quick-action:hover {
  transform: translateY(-2px);
  box-shadow: var(--app-shadow-hover);
  color: var(--app-text);
}

.quick-action .qa-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.usage-info {
  background: var(--app-primary-soft);
  border-left: 4px solid var(--app-primary);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.9rem;
}

/* Adım listesi */
.step-list .list-group-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
}

.step-list .step-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-done .step-icon {
  background: #dcfce7;
  color: #15803d;
}

.step-open .step-icon {
  background: var(--app-primary-soft);
  color: var(--app-primary);
}

.step-locked {
  opacity: 0.6;
}

.step-locked .step-icon {
  background: var(--app-border);
  color: var(--app-muted);
}

.program-hero {
  border-radius: 16px;
  color: #fff;
  padding: 26px 28px;
  position: relative;
  overflow: hidden;
}

.program-hero .hero-icon {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 5rem;
  opacity: 0.25;
}

.lesson-text {
  white-space: pre-wrap;
  max-height: 60vh;
  overflow-y: auto;
  line-height: 1.75;
  padding: 20px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: var(--app-surface);
}

.pdf-stage {
  background: #525659;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.pdf-stage canvas {
  max-width: 100%;
  height: auto;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.lesson-media {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 12px;
}

.exam-question {
  border: 1px solid var(--app-border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.exam-timer {
  position: sticky;
  top: calc(var(--app-navbar-height) + 8px);
  z-index: 5;
}

/* Giriş ve davet sayfaları */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 10% 10%, rgba(224, 33, 138, 0.18), transparent 40%),
              radial-gradient(circle at 90% 90%, rgba(123, 44, 191, 0.2), transparent 45%),
              var(--app-bg);
}

.auth-card {
  width: 100%;
  max-width: 440px;
}

.auth-card .card {
  border-radius: 18px;
}

.table thead th {
  font-size: 0.76rem;
  text-transform: uppercase;
  color: var(--app-muted);
  font-weight: 600;
  letter-spacing: 0.03em;
}

@media (max-width: 991.98px) {
  .app-search {
    display: none;
  }

  .app-sidebar {
    width: 0;
    padding: 18px 0;
  }

  .sidebar-toggle {
    left: 8px;
  }

  .sidebar-expanded .app-sidebar {
    width: var(--app-sidebar-width);
    padding: 18px 8px;
  }

  .app-content {
    margin-left: 0;
    padding: calc(var(--app-navbar-height) + 24px) 16px 24px;
  }
}
