/* PHP Teach UI — overlays / completes shared style.css */

.panel.php-page {
  display: block !important;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 20px 24px;
  margin-bottom: 18px;
}

a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.btn.tiny {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.panel-head h2 {
  font-size: 16px;
  letter-spacing: -0.02em;
}
.hint {
  color: var(--mute);
  font-size: 12px;
}

.tabs a.tab {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--dim);
  font-weight: 600;
  font-size: 13px;
}
.tabs a.tab:hover {
  color: var(--text);
  background: #1c222b;
}
.tabs a.tab.active {
  color: #1a1205;
  background: var(--accent);
}
.tabs a.tab.ghost {
  border: 1px solid var(--border);
  color: var(--mute);
}
.tabs a.tab.ghost:hover {
  color: var(--text);
}

.flash {
  padding: 11px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-weight: 600;
  font-size: 13px;
}
.flash.ok {
  background: rgba(47, 191, 113, 0.12);
  border: 1px solid rgba(47, 191, 113, 0.35);
  color: #9dffc2;
}
.flash.err {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #ffb4b4;
}

.badge-php {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(245, 146, 11, 0.15);
  color: var(--accent);
  border: 1px solid rgba(245, 146, 11, 0.3);
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.dropzone {
  position: relative;
  overflow: hidden;
}

.teach-meta input[type="text"] {
  height: 38px;
}

.teach-result .result-codes .code-chip small {
  display: block;
  margin-top: 2px;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patch-table-wrap {
  max-height: 300px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 12px;
}
.patch-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 12px;
}
.patch-table-wrap th,
.patch-table-wrap td {
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.patch-table-wrap th {
  position: sticky;
  top: 0;
  background: var(--panel-2);
  color: var(--mute);
  font-weight: 600;
}
.patch-table-wrap td:nth-child(2) { color: var(--green); }
.patch-table-wrap td:nth-child(3) { color: var(--red); }

.table-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: auto;
  max-height: 420px;
  background: #101318;
}
.table-wrap.short { max-height: 240px; }
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table-wrap th,
.table-wrap td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.table-wrap th {
  color: var(--mute);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--panel-2);
  position: sticky;
  top: 0;
  z-index: 1;
}
.table-wrap tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}
.mono { font-family: var(--mono); }

.apply-hit-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #101318;
  margin-bottom: 8px;
}
.apply-hit-meta { display: flex; flex-direction: column; gap: 4px; }
.apply-hit-meta strong { font-size: 14px; }
.apply-hit-meta span { color: var(--mute); font-size: 12px; }
.apply-hit-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.apply-hit-form input[type="file"] {
  max-width: 180px;
  font-size: 12px;
  color: var(--dim);
}

.records-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 960px) {
  .records-grid.two {
    grid-template-columns: 1.4fr 1fr;
  }
}

.compat-bar {
  display: inline-block;
  height: 6px;
  width: 72px;
  border-radius: 99px;
  background: #1c222b;
  overflow: hidden;
  vertical-align: middle;
  margin-right: 6px;
}
.compat-bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--green));
  border-radius: 99px;
}

.empty-state {
  padding: 28px 16px;
  text-align: center;
  color: var(--mute);
  font-size: 13px;
}

.top-actions .hint {
  font-family: var(--mono);
  font-size: 11px;
}

.solution-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.solution-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 110px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #101318;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.solution-chip strong { font-size: 13px; }
.solution-chip span { font-size: 11px; color: var(--mute); }
.solution-chip:hover {
  border-color: rgba(245, 146, 11, 0.5);
  background: #16120c;
}
.solution-chip.active {
  border-color: rgba(245, 146, 11, 0.75);
  background: linear-gradient(180deg, rgba(245, 146, 11, 0.18), #14181e 70%);
  box-shadow: 0 0 0 1px rgba(245, 146, 11, 0.2);
}

.easy-advanced {
  margin: 4px 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  background: #101318;
}
.easy-advanced summary {
  cursor: pointer;
  color: var(--dim);
  font-size: 13px;
  font-weight: 600;
}
.knowledge-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 8px 0 16px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: rgba(255, 255, 255, 0.02);
  font-size: 12px;
  color: var(--dim);
}
.knowledge-strip strong { color: var(--accent); font-family: var(--mono); }

/* Öğretme sırasında tam ekran ilerleme */
.teach-loading {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 8, 12, 0.72);
  backdrop-filter: blur(4px);
  padding: 24px;
}
.teach-loading[hidden] { display: none !important; }
.teach-loading-card {
  width: min(420px, 100%);
  padding: 22px 22px 18px;
  border-radius: 14px;
  border: 1px solid rgba(245, 146, 11, 0.35);
  background: linear-gradient(180deg, #1a1f28 0%, #12161c 100%);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}
.teach-loading-title {
  font-size: 18px;
  font-weight: 700;
  color: #f5f7fa;
  letter-spacing: 0.01em;
}
.teach-loading-sub {
  margin: 6px 0 16px;
  font-size: 13px;
  color: var(--dim);
}
.teach-loading-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  border: 1px solid var(--border);
}
.teach-loading-fill {
  height: 100%;
  width: 8%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c46e08, #f5920b 55%, #ffd089);
  box-shadow: 0 0 12px rgba(245, 146, 11, 0.45);
  transition: width 0.45s ease;
}
.teach-loading-dtc-now {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(245, 146, 11, 0.28);
  background: rgba(245, 146, 11, 0.08);
  display: grid;
  gap: 4px;
}
.teach-loading-dtc-now strong {
  font-family: var(--mono);
  font-size: 15px;
  color: #ffd089;
}
.teach-loading-dtc-now span {
  font-size: 12px;
  color: #e8ecf2;
  line-height: 1.35;
}
.teach-loading-dtcs {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  max-height: 160px;
  overflow: hidden;
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--dim);
}
.teach-loading-dtcs li {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 8px;
  align-items: baseline;
  padding: 4px 6px;
  border-radius: 6px;
  opacity: 0.55;
}
.teach-loading-dtcs li strong {
  font-family: var(--mono);
  font-weight: 600;
  color: #c9d0da;
}
.teach-loading-dtcs li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.teach-loading-dtcs li.active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.05);
  color: #ffd089;
}
.teach-loading-dtcs li.active strong {
  color: #f5920b;
}
.teach-loading-dtcs li.done {
  opacity: 0.85;
  color: #9ad4a0;
}
.teach-loading-dtcs li.done strong {
  color: #6ecf8a;
}
body.teach-busy {
  overflow: hidden;
}
body.teach-busy .teach-form {
  pointer-events: none;
  opacity: 0.55;
}

/* Harita / A2L eğitim */
.maps-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin: 12px 0 10px;
}
.maps-toolbar label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--dim);
}
.maps-toolbar .grow { flex: 1 1 220px; }
.maps-toolbar input,
.maps-toolbar select {
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #101318;
  color: #e8ecf2;
  padding: 0 10px;
  font: inherit;
}
.maps-table-wrap {
  max-height: min(60vh, 640px);
  overflow: auto;
}
.maps-kind-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--dim);
}
.maps-kind-tag.characteristic {
  color: #ffd089;
  background: rgba(245, 146, 11, 0.12);
}
.maps-kind-tag.measurement {
  color: #9ec5ff;
  background: rgba(80, 140, 255, 0.12);
}
.maps-kind-tag.axis_pts {
  color: #9ad4a0;
  background: rgba(61, 186, 106, 0.12);
}
.maps-addr { white-space: nowrap; }

.btn.tiny.ghost {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--mute);
}
.btn.tiny.ghost:hover {
  color: var(--text);
}

/* —— Login —— */
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(232, 168, 74, 0.14), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(80, 140, 255, 0.08), transparent 50%),
    var(--bg, #0a0c10);
}
.login-shell {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
  border: 1px solid var(--border, #262b33);
  border-radius: 16px;
  overflow: hidden;
  background: var(--panel, #12161c);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.login-brand {
  padding: 36px 32px;
  background: linear-gradient(160deg, #141820 0%, #0d1016 100%);
  border-right: 1px solid var(--border, #262b33);
}
.login-brand .brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: block;
  object-fit: cover;
  background: #0a0a0a;
  margin-bottom: 16px;
  box-shadow: 0 10px 28px -10px rgba(227, 30, 36, 0.55);
}
.login-brand .login-wordmark {
  display: block;
  height: 42px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin: 0 0 14px;
}
.login-brand h1 {
  font-size: 22px;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}
.login-brand p {
  color: var(--mute, #9aa3af);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 18px;
}
.login-brand ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.login-brand li {
  font-size: 13px;
  color: var(--dim, #c5ccd6);
  padding-left: 14px;
  position: relative;
}
.login-brand li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent, #e8a84a);
}
.login-panel {
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 36px 32px !important;
}
.login-form {
  display: grid;
  gap: 14px;
}
.login-form label {
  display: grid;
  gap: 6px;
}
.login-form label span {
  font-size: 12px;
  font-weight: 600;
  color: var(--mute, #9aa3af);
}
.login-form input {
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border, #262b33);
  background: #0c0f14;
  color: var(--text, #f3f5f7);
  padding: 0 12px;
  font-size: 14px;
}
.login-form input:focus {
  outline: none;
  border-color: rgba(232, 168, 74, 0.55);
  box-shadow: 0 0 0 3px rgba(232, 168, 74, 0.12);
}
.login-form .btn.primary {
  height: 42px;
  margin-top: 4px;
  border: 0;
  border-radius: 10px;
  background: var(--accent, #e8a84a);
  color: #1a1205;
  font-weight: 700;
  cursor: pointer;
}
.login-form .btn.primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .drop-grid { grid-template-columns: 1fr; }
  .stats.compact { grid-template-columns: 1fr 1fr; }
  .teach-meta label { min-width: 100%; }
  .apply-hit-row { grid-template-columns: 1fr; }
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { border-right: 0; border-bottom: 1px solid var(--border, #262b33); }
}
