/* Royax — Next.js (Manrope) tipografi & bileşen ölçeği */

:root {
  --brand: #0f766e;
  --brand-hover: #0d9488;
  --brand-dark: #0f2a3a;
  --bg: #eef2f6;
  --fg: #0f172a;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --font-sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --tracking-tight: -0.025em;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;

  /* Bootstrap overrides */
  --bs-font-sans-serif: var(--font-sans);
  --bs-body-font-family: var(--font-sans);
  --bs-body-font-size: var(--text-base);
  --bs-body-font-weight: 400;
  --bs-body-line-height: var(--leading-normal);
  --bs-body-color: var(--fg);
  --bs-heading-color: var(--slate-900);
  --bs-border-radius: var(--radius-lg);
  --bs-border-radius-sm: var(--radius-md);
  --bs-border-radius-lg: var(--radius-xl);
  --bs-link-color: var(--brand);
  --bs-link-hover-color: #0d9488;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
.antialiased {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html,
body {
  margin: 0;
  min-height: 100vh;
  color: var(--fg);
  background: radial-gradient(ellipse at top, #e8f1f5 0%, #f4f7f9 45%, #eef2f6 100%);
  font-family: var(--font-sans) !important;
  font-size: var(--text-base);
  font-weight: 400;
  line-height: var(--leading-normal);
  letter-spacing: 0;
}

button,
input,
select,
textarea,
.btn,
.form-control,
.form-select,
.form-label,
.nav-link,
.dropdown-menu,
.modal,
.table,
.badge,
.card,
.small,
small {
  font-family: var(--font-sans) !important;
}

/* Marka: Next AppShell’de Manrope; login hero’da display */
.brand-name {
  font-family: var(--font-sans) !important;
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  color: #fff;
}

.brand-display {
  font-family: var(--font-display) !important;
  font-size: var(--text-3xl);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
}

.brand-sub {
  font-size: var(--text-sm);
  color: rgba(204, 251, 241, 0.8);
  margin-top: 0.25rem;
  font-weight: 400;
}

/* Başlıklar — Next PageHeader / StatCard */
h1, .h1 {
  font-family: var(--font-sans) !important;
  font-size: var(--text-2xl) !important;
  font-weight: 600 !important;
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  color: var(--slate-900);
  margin: 0;
}

h2, .h2 {
  font-family: var(--font-sans) !important;
  font-size: var(--text-xl) !important;
  font-weight: 600 !important;
  letter-spacing: var(--tracking-tight);
  color: var(--slate-900);
}

h3, .h3, h4, .h4, h5, .h5 {
  font-family: var(--font-sans) !important;
  font-size: var(--text-base) !important;
  font-weight: 600 !important;
  letter-spacing: var(--tracking-tight);
  color: var(--slate-900);
}

p {
  margin: 0;
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.small, small {
  font-size: var(--text-xs) !important;
}

.text-muted {
  color: var(--slate-500) !important;
}

.fw-semibold {
  font-weight: 600 !important;
}

.fw-medium {
  font-weight: 500 !important;
}

/* Shell */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 18rem; /* w-72 */
  background: var(--brand-dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  align-self: stretch;
  z-index: 40;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.55rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

.menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--slate-800);
  border-radius: 2px;
}

.sidebar-backdrop {
  display: none;
}

.sidebar-brand {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.sidebar-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.sidebar-close:hover {
  background: rgba(255, 255, 255, 0.16);
}

.sidebar-nav {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  overflow: auto;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
}

.sidebar-logout {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
}

.sidebar-logout:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.notif-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.notif-btn-icon {
  display: inline-flex;
  line-height: 0;
}

.notif-btn-text {
  display: inline;
}

.sidebar-nav .nav-link {
  color: #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 0.65rem 0.75rem;
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: var(--leading-snug);
}

.sidebar-nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.sidebar-nav .nav-link.active {
  background: rgba(20, 184, 166, 0.2);
  color: #fff;
}

.main-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--slate-200);
}

.topbar .fw-semibold {
  font-size: var(--text-sm);
  color: var(--slate-800);
}

.topbar .text-muted {
  font-size: var(--text-xs) !important;
  margin-top: 0.1rem;
}

.content {
  padding: 1.5rem 2rem;
}

/* Cards — rounded-2xl border slate-200/80 bg-white/90 shadow-sm */
.card-soft {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-2xl);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.card-soft .card-title,
.card-section-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--slate-900);
  letter-spacing: var(--tracking-tight);
}

.stat-card {
  padding: 1.25rem; /* p-5 */
  text-align: center;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--slate-500);
  font-weight: 400;
  line-height: var(--leading-snug);
}

.stat-value {
  font-size: var(--text-2xl);
  font-weight: 600;
  margin-top: 0.5rem;
  color: var(--slate-900);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  font-family: var(--font-sans) !important;
}

.stat-hint {
  margin-top: 0.25rem;
  font-size: var(--text-xs);
  color: var(--slate-400);
}

/* Page header */
.page-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 576px) {
  .page-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.page-header h1 {
  font-size: var(--text-2xl) !important;
  font-weight: 600 !important;
  letter-spacing: var(--tracking-tight);
  color: var(--slate-900);
  margin: 0;
}

.page-header p {
  margin: 0.25rem 0 0;
  color: var(--slate-500);
  font-size: var(--text-sm);
  font-weight: 400;
}

/* Badges — text-xs font-medium rounded-md px-2 py-0.5 */
.badge-soft {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-md);
  padding: 0.125rem 0.5rem;
  font-size: var(--text-xs);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0;
}

.badge-slate { background: #f1f5f9; color: #334155; }
.badge-teal { background: #f0fdfa; color: #115e59; }
.badge-amber { background: #fffbeb; color: #92400e; }
.badge-rose { background: #fff1f2; color: #9f1239; }
.badge-green { background: #ecfdf5; color: #065f46; }

.bg-teal { background: var(--brand) !important; }
.text-teal { color: var(--brand) !important; }

/* Buttons — px-4 py-2.5 text-sm font-medium rounded-lg */
.btn {
  font-size: var(--text-sm) !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
  border-radius: var(--radius-lg) !important;
  padding: 0.625rem 1rem !important; /* py-2.5 px-4 */
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.btn:disabled,
.btn.disabled {
  opacity: 0.5;
}

.btn-sm {
  padding: 0.375rem 0.75rem !important;
  font-size: var(--text-xs) !important;
  border-radius: var(--radius-md) !important;
}

.btn-teal {
  background: #0f766e;
  border: 1px solid #0f766e;
  color: #fff;
}

.btn-teal:hover,
.btn-teal:focus {
  background: #115e59;
  border-color: #115e59;
  color: #fff;
}

.btn-outline-secondary {
  background: #fff;
  border: 1px solid var(--slate-200);
  color: var(--slate-800);
}

.btn-outline-secondary:hover {
  background: var(--slate-50);
  border-color: var(--slate-200);
  color: var(--slate-800);
}

.btn-link {
  font-weight: 500 !important;
  text-decoration: none;
  padding: 0 !important;
}

/* Forms — text-sm rounded-lg px-3 py-2.5 */
.form-label {
  display: block;
  font-size: var(--text-sm) !important;
  font-weight: 500 !important;
  color: var(--slate-700);
  margin-bottom: 0.375rem;
}

.form-control,
.form-select {
  font-size: var(--text-sm) !important;
  font-weight: 400 !important;
  line-height: var(--leading-normal) !important;
  color: var(--slate-900) !important;
  background-color: #fff !important;
  border: 1px solid var(--slate-200) !important;
  border-radius: var(--radius-lg) !important;
  padding: 0.625rem 0.75rem !important; /* py-2.5 px-3 */
  box-shadow: none !important;
  min-height: calc(0.625rem * 2 + 1.5em);
}

.form-control:focus,
.form-select:focus {
  border-color: #0d9488 !important;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2) !important;
  outline: none;
}

.form-control::placeholder {
  color: var(--slate-400);
}

textarea.form-control {
  min-height: auto;
}

/* Tables — text-sm; th uppercase tracking-wide text-xs */
table.table-soft {
  width: 100%;
  font-size: var(--text-sm);
  margin: 0;
  border-collapse: collapse;
}

table.table-soft th {
  text-align: left;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-500);
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--slate-100);
  background: transparent;
}

table.table-soft td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--slate-50);
  color: var(--slate-700);
  vertical-align: middle;
  font-size: var(--text-sm);
  font-weight: 400;
}

table.table-soft tbody tr:last-child td {
  border-bottom: none;
}

table.table-soft a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
}

table.table-soft a:hover {
  text-decoration: underline;
}

table.table-soft a.btn {
  text-decoration: none;
  font-weight: 500;
}

table.table-soft a.btn-teal,
table.table-soft a.btn-teal:hover {
  color: #fff !important;
  text-decoration: none;
}

table.table-soft a.btn-outline-secondary,
table.table-soft a.btn-outline-secondary:hover {
  color: var(--slate-800) !important;
  text-decoration: none;
}

/* Toast */
.toast-root {
  position: fixed;
  top: 1rem;
  right: 1.5rem;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 22rem;
  width: 100%;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  border-radius: 5px;
  padding: 0.75rem 1rem;
  border: 1px solid;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  animation: toast-in 0.25s ease-out;
  font-size: var(--text-sm);
}

.toast-item .toast-title {
  font-weight: 600;
  font-size: var(--text-sm);
}

.toast-item .toast-msg {
  font-size: var(--text-xs);
  margin-top: 0.15rem;
  opacity: 0.9;
}

.toast-item.ok { background: #ecfdf5; border-color: #a7f3d0; color: #064e3b; }
.toast-item.err { background: #fff1f2; border-color: #fecdd3; color: #881337; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* Notifications */
.notif-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  width: 20rem;
  max-height: 24rem;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  padding: 0.5rem;
  z-index: 30;
}

.notif-item {
  border-radius: var(--radius-lg);
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.25rem;
  background: var(--slate-50);
  font-size: var(--text-sm);
}

.notif-item.unread { background: #f0fdfa; }

.notif-item .font-medium,
.notif-item .fw-semibold {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--slate-800);
}

#notif-dropdown { position: relative; }

/* Login */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 992px) {
  .login-wrap { grid-template-columns: 1fr 1fr; }
}

.login-hero {
  display: none;
  position: relative;
  color: #fff;
  padding: 3rem;
  overflow: hidden;
  background-color: #0f2a3a;
  background-image:
    linear-gradient(165deg, rgba(15, 42, 58, 0.78) 0%, rgba(15, 42, 58, 0.55) 50%, rgba(15, 90, 85, 0.42) 100%),
    url("https://royax.com.tr/images/4c1b4959-5bed-4e10-ae52-47ba5c6dd69dslider2.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@media (min-width: 992px) {
  .login-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 4rem 3.5rem;
  }
}

.login-hero-copy {
  width: 100%;
  max-width: 24rem;
  text-align: center;
}

.login-hero .brand-display {
  font-size: 2.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
  text-shadow: none;
}

.login-hero-rule {
  width: 2.5rem;
  height: 1px;
  margin: 1.25rem auto 1.5rem;
  background: rgba(255, 255, 255, 0.45);
}

.login-hero-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.login-hero-lines li {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.88);
}

.login-hero p,
.login-hero .login-hero-foot {
  display: none;
}

.login-panel {
  position: relative;
  display: grid;
  place-items: center;
  padding: 2rem 1.5rem;
  overflow: hidden;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, transparent 35%),
    linear-gradient(135deg, #fbfcfd 0%, #f0f5f7 42%, #e4eef0 100%);
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: auto -20% -30% auto;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.14) 0%, transparent 68%);
  pointer-events: none;
}

.login-panel::after {
  content: "";
  position: absolute;
  inset: -15% auto auto -25%;
  width: 55%;
  height: 55%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(148, 163, 184, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 26rem;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 1.25rem;
  padding: 2.25rem 2rem 2rem;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.03),
    0 18px 48px rgba(15, 42, 58, 0.08);
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.5rem;
  right: 1.5rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #0f766e 35%, #14b8a6 65%, transparent);
}

.login-card h1 {
  font-size: var(--text-2xl) !important;
  font-weight: 600 !important;
  letter-spacing: var(--tracking-tight);
  margin-bottom: 0.25rem;
}

.login-card > .text-muted {
  font-size: var(--text-sm) !important;
  margin-bottom: 1.5rem;
}

.login-demo {
  margin-top: 1.5rem;
  padding: 0.75rem;
  border-radius: var(--radius-lg);
  background: var(--slate-50);
  font-size: var(--text-xs);
  color: var(--slate-500);
  line-height: 1.5;
}

.login-demo b {
  font-weight: 600;
  color: var(--slate-700);
}

/* Mock bank */
.mock-bank {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: linear-gradient(160deg, #0b3b2e 0%, #14532d 40%, #166534 100%);
  color: #fff;
  font-family: var(--font-sans) !important;
}

.mock-bank h1 {
  color: #fff !important;
  font-size: var(--text-2xl) !important;
}

/* Modal */
.modal-content {
  border-radius: var(--radius-2xl) !important;
  border: 1px solid var(--slate-200) !important;
  font-family: var(--font-sans) !important;
}

.modal-header {
  border-bottom-color: var(--slate-100);
  padding: 1rem 1.25rem;
}

.modal-title {
  font-size: var(--text-lg) !important;
  font-weight: 600 !important;
  letter-spacing: var(--tracking-tight);
}

.modal-body {
  padding: 1.25rem;
  font-size: var(--text-sm);
}

.modal-footer {
  border-top-color: var(--slate-100);
  padding: 0.875rem 1.25rem;
}

/* List rows in dashboard cards */
.list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--slate-50);
  font-size: var(--text-sm);
}

.list-row:last-child { border-bottom: none; }

.list-row a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
}

/* Charts */
.chart-box { position: relative; width: 100%; }
.chart-box-line { height: 420px; }
.chart-donut-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
}
.chart-box-donut {
  position: relative;
  width: 500px;
  max-width: 100%;
  height: 360px;
}

/* Card section headings used with fw-semibold mb-3 */
.card-soft > .fw-semibold,
.card-soft .fw-semibold.mb-3 {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--slate-900);
  letter-spacing: var(--tracking-tight);
}

@media (max-width: 991px) {
  .menu-toggle { display: flex; }
  .sidebar-close { display: inline-flex; }

  .notif-btn-text { display: none; }
  .notif-btn {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    justify-content: center;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    height: 100vh;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: 8px 0 30px rgba(15, 23, 42, 0.2);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(15, 23, 42, 0.45);
    border: 0;
    padding: 0;
  }

  .sidebar-backdrop[hidden] {
    display: none !important;
  }

  .content { padding: 1.25rem 1rem; }

  body.sidebar-open {
    overflow: hidden;
  }

  .stat-card {
    padding: 0.85rem 0.65rem;
  }

  .stat-label {
    font-size: 0.7rem;
    line-height: 1.25;
  }

  .stat-value {
    font-size: 1.15rem;
    margin-top: 0.35rem;
  }
}
