/* =========================================================
   RainBow Panel – görsel katman (Material Dashboard üzerine)
   ========================================================= */

:root {
  --rb-bg: #f4f6fb;
  --rb-surface: #ffffff;
  --rb-border: #e6e9f2;
  --rb-text: #1f2437;
  --rb-muted: #6b7289;
  --rb-primary: #4f46e5;
  --rb-primary-hover: #4338ca;
  --rb-primary-soft: #eef0ff;
  --rb-success: #12a150;
  --rb-success-soft: #e7f7ee;
  --rb-danger: #e5484d;
  --rb-danger-soft: #fdecec;
  --rb-warning: #d97706;
  --rb-warning-soft: #fdf3e3;
  --rb-sidebar: #151827;
  --rb-sidebar-2: #1d2135;
  --rb-sidebar-text: #aab0c6;
  --rb-radius: 14px;
  --rb-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06);
  --rb-rainbow: linear-gradient(90deg, #ff5f6d, #ffa94d, #ffd43b, #51cf66, #339af0, #845ef7);
}

html, body {
  font-family: "Inter", "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.rb-app {
  background: var(--rb-bg) !important;
  color: var(--rb-text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { color: var(--rb-text); font-family: inherit; letter-spacing: -.01em; }

/* ---------- İkonlar ---------- */
.material-icons,
.material-icons-round {
  font-family: "Material Icons Round" !important;
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
}

/* ---------- Marka ---------- */
.rb-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -.02em;
  color: #fff;
  text-decoration: none;
}
.rb-wordmark:hover { color: #fff; }
.rb-logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--rb-rainbow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  box-shadow: 0 4px 14px rgba(132, 94, 247, .35);
}
.rb-wordmark small {
  display: block;
  font-size: .68rem;
  font-weight: 500;
  color: var(--rb-sidebar-text);
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.2;
}
.rb-wordmark span.rb-name { line-height: 1.1; }

/* ---------- Kenar menü ---------- */
.sidenav.rb-sidenav {
  background: var(--rb-sidebar) !important;
  border-radius: 18px !important;
  box-shadow: 0 10px 30px rgba(21, 24, 39, .25);
  overflow: hidden;
}
.rb-sidenav::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--rb-rainbow);
}
.rb-sidenav .sidenav-header {
  height: auto !important;
  padding: 22px 20px 12px;
}

.rb-user-card {
  margin: 6px 14px 14px;
  padding: 12px;
  border-radius: 12px;
  background: var(--rb-sidebar-2);
  display: flex;
  align-items: center;
  gap: 12px;
}
.rb-avatar {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}
.rb-user-meta { min-width: 0; }
.rb-user-meta .rb-user-name {
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rb-user-meta .rb-user-role {
  color: var(--rb-sidebar-text);
  font-size: .75rem;
}

.rb-nav-label {
  padding: 14px 24px 6px;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6c7390;
}

.rb-sidenav .navbar-nav .nav-link {
  color: var(--rb-sidebar-text) !important;
  margin: 2px 14px !important;
  padding: 10px 12px !important;
  border-radius: 10px !important;
  font-size: .875rem;
  font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
.rb-sidenav .navbar-nav .nav-link .material-icons {
  font-size: 20px;
  color: inherit !important;
  opacity: .9;
}
.rb-sidenav .navbar-nav .nav-link:hover {
  background: rgba(255, 255, 255, .06) !important;
  color: #fff !important;
}
.rb-sidenav .navbar-nav .nav-link.active {
  background: var(--rb-primary) !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(79, 70, 229, .35) !important;
}
.rb-sidenav .navbar-nav .nav-link.rb-logout:hover {
  background: rgba(229, 72, 77, .15) !important;
  color: #ff8a8e !important;
}

.rb-sidenav .sidenav-footer { padding-bottom: 16px; }
.rb-support {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  color: var(--rb-sidebar-text);
  font-size: .8rem;
  text-decoration: none;
  transition: border-color .15s ease, color .15s ease;
}
.rb-support:hover { color: #fff; border-color: rgba(255, 255, 255, .2); }
.rb-support img { width: 22px; height: 22px; }

/* ---------- Üst bar ---------- */
.rb-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 6px;
}
.rb-topbar h1 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
}
.rb-breadcrumb {
  font-size: .8rem;
  color: var(--rb-muted);
  margin-bottom: 2px;
}
.rb-breadcrumb a { color: var(--rb-muted); }
.rb-breadcrumb a:hover { color: var(--rb-primary); }
.rb-topbar-actions { display: flex; align-items: center; gap: 10px; }

.rb-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--rb-surface);
  border: 1px solid var(--rb-border);
  font-size: .8rem;
  font-weight: 600;
  color: var(--rb-text);
  white-space: nowrap;
}
.rb-chip .material-icons { font-size: 18px; color: var(--rb-warning); }

.rb-menu-toggle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--rb-border);
  background: var(--rb-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rb-text);
}

/* ---------- Kartlar ---------- */
.rb-app .card {
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius);
  box-shadow: var(--rb-shadow);
}
.rb-app .card.card-plain { border: 0; box-shadow: none; }

.rb-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px 22px;
  border-bottom: 1px solid var(--rb-border);
}
.rb-card-header h2 {
  font-size: 1rem;
  font-weight: 650;
  margin: 0;
}
.rb-card-header p {
  margin: 2px 0 0;
  font-size: .8rem;
  color: var(--rb-muted);
}
.rb-card-body { padding: 22px; }
.rb-form { max-width: 640px; }

/* ---------- Butonlar ---------- */
.rb-app .btn { text-transform: none; letter-spacing: 0; font-weight: 600; border-radius: 10px; }
.btn.btn-brand {
  background: var(--rb-primary);
  color: #fff;
  border: 0;
  box-shadow: 0 4px 12px rgba(79, 70, 229, .25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn.btn-brand:hover, .btn.btn-brand:focus {
  background: var(--rb-primary-hover);
  color: #fff;
  box-shadow: 0 6px 16px rgba(79, 70, 229, .35);
}
.btn.btn-brand .material-icons { font-size: 18px; }
.btn.btn-ghost {
  background: transparent;
  border: 1px solid var(--rb-border);
  color: var(--rb-text);
  box-shadow: none;
}
.btn.btn-ghost:hover { background: #f1f3f9; color: var(--rb-text); }

.rb-actions { display: inline-flex; gap: 6px; justify-content: flex-end; }
.rb-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rb-muted);
  background: transparent;
  border: 1px solid var(--rb-border);
  transition: all .15s ease;
}
.rb-icon-btn .material-icons { font-size: 18px; }
.rb-icon-btn:hover { color: var(--rb-primary); border-color: #c7c9f7; background: var(--rb-primary-soft); }
.rb-icon-btn.is-danger:hover { color: var(--rb-danger); border-color: #f5c2c4; background: var(--rb-danger-soft); }

/* ---------- Tablolar ---------- */
.rb-table { margin: 0; width: 100%; }
.rb-table thead th {
  background: #f8f9fc;
  color: var(--rb-muted);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 12px 22px !important;
  border-bottom: 1px solid var(--rb-border) !important;
  white-space: nowrap;
  opacity: 1;
}
.rb-table tbody td {
  padding: 14px 22px !important;
  border-bottom: 1px solid var(--rb-border);
  font-size: .875rem;
  color: var(--rb-text);
  vertical-align: middle;
}
.rb-table tbody tr:last-child td { border-bottom: 0; }
.rb-table tbody tr:hover td { background: #fafbfe; }
.rb-table .text-end { text-align: right; }
.rb-strong { font-weight: 600; }
.rb-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; }
.rb-sub { color: var(--rb-muted); font-size: .8rem; }

.rb-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
}
.rb-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.rb-badge.is-success { color: var(--rb-success); background: var(--rb-success-soft); }
.rb-badge.is-danger { color: var(--rb-danger); background: var(--rb-danger-soft); }
.rb-badge.is-neutral { color: var(--rb-primary); background: var(--rb-primary-soft); }

.rb-empty {
  text-align: center;
  padding: 48px 20px !important;
  color: var(--rb-muted);
}
.rb-empty .material-icons { font-size: 40px; color: #c3c8d8; display: block; margin: 0 auto 8px; }

/* ---------- Form alanları ---------- */
.rb-field { display: block; }
.rb-label {
  display: block;
  margin: 0 0 6px 2px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--rb-text);
}
.rb-app .rb-field .form-control {
  display: block;
  width: 100%;
  height: auto;
  padding: 10px 14px;
  font-size: .9rem;
  color: var(--rb-text);
  background: #fff;
  border: 1px solid #d5d9e5 !important;
  border-radius: 10px !important;
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.rb-app .rb-field .form-control:focus {
  outline: 0;
  border-color: var(--rb-primary) !important;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, .12) !important;
}
.rb-app .rb-field .form-control::placeholder { color: #a0a6b8; }
.rb-app .form-control[readonly] { background: #f6f7fb !important; color: var(--rb-muted); }
.rb-app .form-check-input:checked { background-color: var(--rb-primary); border-color: var(--rb-primary); }
.rb-help { font-size: .78rem; color: var(--rb-muted); margin: -8px 0 16px 2px; }

.rb-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--rb-primary-soft);
  color: #3730a3;
  font-size: .85rem;
  margin-bottom: 20px;
}
.rb-note .material-icons { font-size: 20px; }

/* ---------- Ana sayfa ---------- */
.rb-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--rb-radius);
  padding: 28px;
  background: var(--rb-sidebar);
  color: #fff;
  margin-bottom: 24px;
}
.rb-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: var(--rb-rainbow);
  opacity: .25;
  filter: blur(40px);
}
.rb-hero h2 { color: #fff; font-size: 1.5rem; font-weight: 700; margin: 0 0 6px; }
.rb-hero p { color: var(--rb-sidebar-text); margin: 0; }

.rb-app .card.rb-stat {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 20px;
  height: 100%;
}
.rb-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
}
.rb-stat-icon .material-icons { font-size: 24px; }
.rb-stat-icon.is-primary { background: var(--rb-primary-soft); color: var(--rb-primary); }
.rb-stat-icon.is-success { background: var(--rb-success-soft); color: var(--rb-success); }
.rb-stat-icon.is-warning { background: var(--rb-warning-soft); color: var(--rb-warning); }
.rb-stat-label { font-size: .8rem; color: var(--rb-muted); margin: 0; }
.rb-stat-value { font-size: 1.5rem; font-weight: 700; margin: 0; line-height: 1.2; color: var(--rb-text); }

.rb-quick {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--rb-border);
  background: var(--rb-surface);
  color: var(--rb-text);
  transition: all .15s ease;
  height: 100%;
}
.rb-quick:hover { border-color: #c7c9f7; box-shadow: var(--rb-shadow); color: var(--rb-text); transform: translateY(-1px); }
.rb-quick .material-icons { color: var(--rb-primary); font-size: 22px; }
.rb-quick strong { display: block; font-size: .9rem; }
.rb-quick span.rb-sub { display: block; }

/* ---------- Alt bilgi ---------- */
.rb-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 24px 4px 8px;
  font-size: .8rem;
  color: var(--rb-muted);
}
.rb-footer a { color: var(--rb-muted); display: inline-flex; align-items: center; gap: 6px; }
.rb-footer a:hover { color: var(--rb-primary); }
.rb-footer img { width: 18px; height: 18px; }

/* ---------- Giriş / Kurulum ---------- */
.rb-auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background:
    radial-gradient(900px 500px at 10% 0%, rgba(99, 102, 241, .35), transparent 60%),
    radial-gradient(800px 500px at 100% 100%, rgba(168, 85, 247, .28), transparent 60%),
    #0f1220;
}
.rb-auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  overflow: hidden;
}
.rb-auth-card::before { content: ""; display: block; height: 4px; background: var(--rb-rainbow); }
.rb-auth-head { padding: 32px 32px 8px; text-align: center; }
.rb-auth-head .rb-wordmark { color: var(--rb-text); font-size: 1.5rem; }
.rb-auth-head .rb-logo-mark { width: 42px; height: 42px; font-size: 22px; }
.rb-auth-head p { color: var(--rb-muted); font-size: .9rem; margin: 14px 0 0; }
.rb-auth-body { padding: 16px 32px 32px; }
.rb-alert {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--rb-danger-soft);
  color: #b42318;
  font-size: .85rem;
  margin-bottom: 16px;
}
.rb-alert .material-icons { font-size: 18px; }
.rb-auth-foot { text-align: center; color: rgba(255, 255, 255, .5); font-size: .8rem; margin-top: 20px; }

/* ---------- Mobil ---------- */
@media (max-width: 1199.98px) {
  .rb-topbar { padding: 16px 12px 4px; }
}
@media (max-width: 575.98px) {
  .rb-topbar h1 { font-size: 1.15rem; }
  .rb-topbar .rb-chip .rb-chip-text { display: none; }
  .rb-card-header, .rb-card-body { padding: 16px; }
  .rb-table thead th, .rb-table tbody td { padding: 12px 14px !important; }
}
.rb-alert.is-success { background: var(--rb-success-soft); color: #067647; }
