:root {
  color-scheme: light;
  --bg: #e8eef6;
  --panel: #ffffff;
  --ink: #002060;
  --muted: #4a5f7a;
  --line: rgba(0, 32, 96, 0.14);
  --accent: #002060;
  --accent-hover: #0a3d7a;
  --green: #9fd356;
  --green-light: #d4eea8;
  --danger: #b91c1c;
  --shadow: 0 18px 50px rgba(0, 32, 96, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

[hidden] {
  display: none !important;
}

button,
input {
  font: inherit;
}

/* —— Giriş ekranı (TBS benzeri) —— */
.login-view {
  position: relative;
  display: grid;
  min-height: 100vh;
  padding: 32px 20px;
  overflow: hidden;
  background: #083f47;
}

.login-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(8, 63, 71, 0.88), rgba(0, 32, 96, 0.72)),
    radial-gradient(circle at 20% 30%, rgba(159, 211, 86, 0.35), transparent 55%),
    radial-gradient(circle at 80% 70%, rgba(212, 238, 168, 0.25), transparent 50%);
  opacity: 0.95;
}

.login-content {
  position: relative;
  z-index: 1;
  align-self: center;
  width: min(460px, 100%);
  margin: 0 auto;
  padding: 22px 24px 26px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.login-brand {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: 14px;
  text-align: center;
}

.login-brand img {
  width: min(200px, 52vw);
  height: auto;
  object-fit: contain;
}

.login-brand h1 {
  margin: 0;
  color: var(--accent);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.15;
}

.login-brand__sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.login-heading {
  margin-bottom: 12px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.login-panels {
  display: flex;
  justify-content: center;
}

.login-card {
  width: 100%;
  display: grid;
  gap: 12px;
}

.login-card--unified {
  padding: 0;
  border: 0;
  background: transparent;
}

.login-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: left;
}

.login-card input[type="text"],
.login-card input[type="password"] {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: #fff;
  color: var(--ink);
}

.login-card input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 32, 96, 0.1);
}

.remember-row {
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 8px !important;
  font-weight: 700 !important;
}

.remember-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.login-message {
  min-height: 18px;
  margin: 0;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
}

.login-card button[type="submit"] {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.login-card button[type="submit"]:hover {
  background: var(--accent-hover);
}

.login-card button[type="submit"]:disabled {
  opacity: 0.65;
  cursor: wait;
}

.login-back-link {
  margin: 14px 0 0;
  text-align: center;
}

.login-back-link a {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.login-back-link a:hover {
  text-decoration: underline;
}

/* —— Hoş geldiniz —— */
.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 32, 96, 0.76);
  backdrop-filter: blur(8px);
}

.welcome-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(380px, 100%);
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  text-align: center;
}

.welcome-card img {
  width: min(180px, 48vw);
  height: auto;
  object-fit: contain;
}

.welcome-card h2 {
  margin: 6px 0 0;
  color: var(--accent);
  font-size: 28px;
}

.welcome-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.welcome-loader {
  position: relative;
  width: 100%;
  height: 6px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce8df;
}

.welcome-loader::after {
  content: "";
  position: absolute;
  inset: 0;
  transform-origin: left;
  background: var(--green);
  animation: welcomeLoad 1.4s linear forwards;
}

@keyframes welcomeLoad {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* —— Üst bar —— */
.imar-app-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  padding: 10px 16px;
  background: linear-gradient(90deg, var(--green) 0%, var(--green-light) 40%, #fff 100%);
  border-bottom: 1px solid var(--line);
}

.imar-app-bar__user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.imar-app-bar__avatar {
  border-radius: 50%;
  background: #fff;
}

.imar-app-bar__name {
  font-weight: 700;
  color: var(--accent);
}

.imar-app-bar__logout {
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.imar-app-bar__logout:hover {
  background: var(--accent-hover);
}

/* —— Panel (giriş sonrası) —— */
.imar-index-page.is-imar-authed .login-view {
  display: none;
}

.imar-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100vh - 56px);
  padding: 24px 16px 40px;
}

.imar-panel__stack {
  width: min(920px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.imar-panel__logo {
  width: auto;
  height: clamp(100px, 18vw, 160px);
  object-fit: contain;
}

.imar-panel__title {
  margin: 0;
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: 0.02em;
}

.imar-panel__subtitle {
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 600;
}

.imar-bars {
  width: 100%;
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.imar-bars-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}

.imar-bars-row .imar-bar {
  flex: 1 1 0;
  min-width: 0;
}

@media (max-width: 720px) {
  .imar-bars-row {
    flex-direction: column;
  }
}

.imar-bar {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  background: linear-gradient(90deg, var(--green-light) 0%, #fff 55%);
  color: var(--accent);
  font-weight: 800;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.imar-bar:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 32, 96, 0.12);
}

.imar-bar--dual {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.imar-bar__kicker,
.imar-bar__mid {
  font-size: 13px;
  opacity: 0.85;
}

.imar-bar__kicker {
  text-transform: none;
  letter-spacing: 0.06em;
}

.imar-bar__title {
  font-size: 15px;
}
