/* MadeByRain Admin Panel Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Fira+Code:wght@400;500&display=swap');

:root {
  --rose-primary: #bf7386;
  --rose-primary-hover: #ac5f73;
  --rose-light: #fbf0f2;
  --rose-soft: #f1d7dc;
  --rose-glow: rgba(191, 115, 134, 0.25);
  --rose-accent: #dca3af;
  --rose-dark: #8c4254;

  --bg-main: #f8f4f6;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.88);

  --text-main: #271a1f;
  --text-muted: #6f5d64;
  --text-light: #9f8c93;

  --border-subtle: rgba(191, 115, 134, 0.16);
  --border-strong: rgba(191, 115, 134, 0.32);

  --shadow-xs: 0 2px 6px rgba(135, 75, 95, 0.04);
  --shadow-sm: 0 4px 14px rgba(135, 75, 95, 0.06);
  --shadow-md: 0 10px 28px rgba(135, 75, 95, 0.08);
  --shadow-lg: 0 20px 40px rgba(135, 75, 95, 0.12);
  --shadow-rose: 0 8px 24px rgba(191, 115, 134, 0.28);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-code: 'Fira Code', monospace;

  --sidebar-width: 270px;
  --header-height: 72px;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 5% 10%, rgba(247, 233, 236, 0.7) 0%, transparent 40%),
    radial-gradient(circle at 95% 85%, rgba(241, 215, 220, 0.5) 0%, transparent 45%);
  background-attachment: fixed;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  transition: var(--transition);
}

input,
textarea,
select {
  font-family: inherit;
  border: none;
  outline: none;
}

/* ==========================================================
   LOGIN SCREEN
   ========================================================== */
.login-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 3.5vw, 1.75rem);
  position: relative;
  background: radial-gradient(circle at top right, #fbf0f2 0%, #f4e7ea 40%, #edd8dd 100%);
  overflow-x: hidden;
}

.login-backdrop-decor {
  position: absolute;
  width: min(480px, 90vw);
  height: min(480px, 90vw);
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(191, 115, 134, 0.25), rgba(220, 163, 175, 0.3));
  filter: blur(80px);
  pointer-events: none;
  animation: floatDecor 8s ease-in-out infinite alternate;
}

@keyframes floatDecor {
  0% { transform: translate(-30px, -20px) scale(0.95); }
  100% { transform: translate(30px, 30px) scale(1.05); }
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 5vw, 2.6rem) clamp(1.15rem, 4.5vw, 2.2rem);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-subtle);
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  animation: loginAppear 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes loginAppear {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-header {
  text-align: center;
  margin-bottom: 1.8rem;
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.login-brand-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px var(--rose-glow);
  flex-shrink: 0;
  overflow: hidden;
  border: 2.5px solid var(--rose-primary);
  background: var(--rose-light);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.login-brand:hover .login-brand-icon {
  transform: scale(1.06);
  box-shadow: 0 6px 20px var(--rose-glow);
}

.login-brand-avatar,
.login-brand-icon img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.login-brand-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
}

.login-badge {
  display: inline-block;
  background: var(--rose-light);
  color: var(--rose-primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
  border: 1px solid var(--border-subtle);
}

.login-title {
  font-size: clamp(1.3rem, 4vw, 1.55rem);
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0;
}

.login-form .form-group {
  margin-bottom: 1.25rem;
  width: 100%;
}

.login-form label:not(.remember-check) {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.45rem;
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  width: 100%;
}

.form-label-row label {
  margin-bottom: 0 !important;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
}

.forgot-password-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rose-primary);
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 1px 0;
}

.forgot-password-link:hover {
  color: var(--rose-dark);
  text-decoration: underline;
}

.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-icon-wrap i.input-icon {
  position: absolute;
  left: 1.05rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 1rem;
  pointer-events: none;
  transition: var(--transition);
}

.input-icon-wrap .form-control {
  width: 100%;
  padding: 0.82rem 2.8rem 0.82rem 2.7rem;
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  color: var(--text-main);
  box-sizing: border-box;
  transition: var(--transition);
}

.input-icon-wrap .form-control:focus {
  border-color: var(--rose-primary);
  box-shadow: 0 0 0 4px var(--rose-glow);
  background: #ffffff;
}

.input-icon-wrap .form-control:focus ~ i.input-icon {
  color: var(--rose-primary);
}

.btn-toggle-pwd {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  cursor: pointer;
  padding: 0.4rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: var(--transition);
}

.btn-toggle-pwd:hover {
  color: var(--rose-primary);
  background: var(--rose-light);
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 1.5rem;
}

.login-form label.remember-check,
.remember-check {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.65rem !important;
  cursor: pointer;
  color: var(--text-muted);
  user-select: none;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1;
  margin: 0 !important;
  white-space: nowrap !important;
  transition: var(--transition);
}

.remember-check:hover {
  color: var(--text-main);
}

.remember-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border-strong);
  border-radius: 5px;
  background: #ffffff;
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  margin: 0 !important;
  padding: 0;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(191, 115, 134, 0.08);
}

.remember-check input[type="checkbox"]::before {
  content: "";
  width: 10px;
  height: 10px;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  transform: scale(0);
  transition: 0.15s transform ease-in-out;
  background-color: #ffffff;
}

.remember-check input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--rose-primary), var(--rose-accent));
  border-color: var(--rose-primary);
  box-shadow: 0 2px 8px var(--rose-glow);
}

.remember-check input[type="checkbox"]:checked::before {
  transform: scale(1);
}

.remember-check input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--rose-primary);
  outline-offset: 2px;
}

.remember-check span {
  display: inline-block;
  line-height: 1.2;
  margin: 0;
  font-size: 0.88rem;
  color: inherit;
}

.btn-login {
  width: 100%;
  padding: 0.95rem 1.5rem;
  background: linear-gradient(135deg, var(--rose-primary) 0%, var(--rose-accent) 100%);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  box-shadow: var(--shadow-rose);
  transition: var(--transition);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(191, 115, 134, 0.4);
  background: linear-gradient(135deg, var(--rose-primary-hover) 0%, var(--rose-primary) 100%);
}

.btn-login:active {
  transform: translateY(0);
}

.login-alert {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  display: none;
  align-items: center;
  gap: 0.6rem;
  animation: shakeAlert 0.4s ease;
}

.login-alert.show {
  display: flex;
}

.login-alert.error {
  background: #fdf0f0;
  color: #c93b3b;
  border: 1px solid #f8cdcd;
}

@keyframes shakeAlert {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.login-demo-helper {
  margin-top: 1.8rem;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.65);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  text-align: center;
}

.login-demo-helper p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.demo-credentials-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #fff;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  font-family: var(--font-code);
  font-size: 0.82rem;
  color: var(--rose-dark);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition);
}

.demo-credentials-pill:hover {
  border-color: var(--rose-primary);
  background: var(--rose-light);
  transform: scale(1.02);
}

.login-back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
}

.login-back-link:hover {
  color: var(--rose-primary);
}

/* ==========================================================
   ADMIN LAYOUT & SIDEBAR (SOL MENÜ)
   ========================================================== */
.admin-app {
  display: flex;
  min-height: 100vh;
  position: relative;
}

.admin-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.sidebar-header {
  padding: 1.5rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--rose-glow);
  overflow: hidden;
  border: 2px solid var(--rose-primary);
  flex-shrink: 0;
  background: var(--rose-light);
  transition: transform 0.3s ease;
}

.admin-brand:hover .admin-brand-icon {
  transform: scale(1.05);
}

.admin-brand-avatar,
.admin-brand-icon img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.admin-brand-info h2 {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.admin-brand-info span {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--rose-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.btn-sidebar-close {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--rose-light);
  color: var(--rose-primary);
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.sidebar-nav-container {
  flex: 1;
  padding: 1.5rem 1rem;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 0.8rem;
  margin-bottom: 0.65rem;
}

.sidebar-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.8rem;
}

.sidebar-nav-item {
  width: 100%;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}

.sidebar-nav-link .nav-link-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.sidebar-nav-link i.nav-icon {
  font-size: 1.15rem;
  width: 22px;
  text-align: center;
  color: var(--text-light);
  transition: var(--transition);
}

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

.sidebar-nav-link:hover i.nav-icon {
  color: var(--rose-primary);
}

.sidebar-nav-link.active {
  background: linear-gradient(135deg, var(--rose-primary) 0%, var(--rose-accent) 100%);
  color: #ffffff;
  box-shadow: var(--shadow-rose);
  font-weight: 700;
}

.sidebar-nav-link.active i.nav-icon {
  color: #ffffff;
}

.nav-badge-count {
  background: var(--rose-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  min-width: 22px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(191, 115, 134, 0.4);
  transition: var(--transition);
}

.sidebar-nav-link.active .nav-badge-count {
  background: #ffffff;
  color: var(--rose-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.sidebar-footer {
  padding: 1.2rem 1rem;
  border-top: 1px solid var(--border-subtle);
  background: #fff;
}

.admin-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.8rem;
  background: var(--bg-main);
  border-radius: var(--radius-md);
  margin-bottom: 0.8rem;
  border: 1px solid var(--border-subtle);
}

.admin-user-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.admin-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--rose-primary);
}

.admin-user-details h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.admin-user-details span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sidebar-bottom-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-sidebar-action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-sidebar-site {
  background: var(--rose-light);
  color: var(--rose-primary);
  border: 1px solid var(--border-subtle);
}

.btn-sidebar-site:hover {
  background: var(--rose-soft);
  color: var(--rose-dark);
}

.btn-sidebar-logout {
  background: #fff;
  color: #c93b3b;
  border: 1px solid rgba(201, 59, 59, 0.2);
}

.btn-sidebar-logout:hover {
  background: #fdf0f0;
  border-color: #c93b3b;
}

/* ==========================================================
   MAIN CONTENT WRAPPER & TOP BAR
   ========================================================== */
.admin-main {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  max-width: calc(100% - var(--sidebar-width));
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  box-sizing: border-box;
}

.admin-topbar {
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 2.5vw, 2.2rem);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-toggle-sidebar {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-xs);
}

.btn-toggle-sidebar:hover {
  background: var(--rose-light);
  color: var(--rose-primary);
}

.topbar-title-group h1 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.topbar-breadcrumbs {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.topbar-status-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: #eef7f0;
  color: #2b7a42;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(43, 122, 66, 0.2);
}

.status-dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2b7a42;
  box-shadow: 0 0 0 0 rgba(43, 122, 66, 0.6);
  animation: dotPulse 1.8s infinite;
}

@keyframes dotPulse {
  0% { box-shadow: 0 0 0 0 rgba(43, 122, 66, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(43, 122, 66, 0); }
  100% { box-shadow: 0 0 0 0 rgba(43, 122, 66, 0); }
}

.btn-quick-site {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 1.5px solid var(--rose-soft);
  color: var(--rose-primary);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.btn-quick-site:hover {
  background: var(--rose-light);
  border-color: var(--rose-primary);
  transform: translateY(-2px);
}

/* ==========================================================
   ADMIN BODY & VIEWS
   ========================================================== */
.admin-body {
  padding: clamp(1.2rem, 2.5vw, 2.2rem);
  flex: 1;
}

.admin-view {
  display: none;
  animation: fadeInView 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-view.active {
  display: block;
}

@keyframes fadeInView {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================
   VIEW: DASHBOARD
   ========================================================== */
.dashboard-welcome-banner {
  background: linear-gradient(135deg, rgba(191, 115, 134, 0.15) 0%, rgba(247, 233, 236, 0.9) 100%), #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.8rem 2.2rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.dashboard-welcome-banner::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--rose-glow);
  filter: blur(40px);
  pointer-events: none;
}

.welcome-text h2 {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.3rem;
}

.welcome-text p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.welcome-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn-dash-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--rose-primary) 0%, var(--rose-accent) 100%);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: var(--shadow-rose);
  cursor: pointer;
  transition: var(--transition);
}

.btn-dash-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(191, 115, 134, 0.35);
}

.btn-dash-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.2rem;
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: var(--transition);
}

.btn-dash-secondary:hover {
  background: var(--rose-light);
  border-color: var(--rose-primary);
  color: var(--rose-primary);
}

/* ==========================================================
   STATS GRID & ULTRA-PREMIUM STAT CARDS
   ========================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
  width: 100%;
  box-sizing: border-box;
}

.stat-card {
  background: linear-gradient(165deg, #ffffff 0%, #faf6f8 100%);
  border: 1px solid rgba(191, 115, 134, 0.16);
  border-radius: 20px;
  padding: 1.5rem 1.4rem;
  box-shadow: 0 4px 20px rgba(135, 75, 95, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  min-width: 0;
  box-sizing: border-box;
}

/* Card Top Colored Accent Line */
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3.5px;
  opacity: 0.85;
  transition: height 0.3s ease, opacity 0.3s ease;
}

.stat-card-total::before {
  background: linear-gradient(90deg, #bf7386 0%, #e8a2b1 100%);
}

.stat-card-unread::before {
  background: linear-gradient(90deg, #f59e0b 0%, #fcd34d 100%);
}

.stat-card-read::before {
  background: linear-gradient(90deg, #10b981 0%, #6ee7b7 100%);
}

.stat-card-today::before {
  background: linear-gradient(90deg, #6366f1 0%, #a5b4fc 100%);
}

/* Card Hover States */
.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(135, 75, 95, 0.12);
}

.stat-card-total:hover {
  border-color: rgba(191, 115, 134, 0.4);
}

.stat-card-unread:hover {
  border-color: rgba(245, 158, 11, 0.45);
}

.stat-card-read:hover {
  border-color: rgba(16, 185, 129, 0.4);
}

.stat-card-today:hover {
  border-color: rgba(99, 102, 241, 0.4);
}

.stat-card:hover::before {
  height: 5px;
  opacity: 1;
}

/* Ambient Radial Glow */
.stat-card-glow {
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  opacity: 0.55;
  transition: opacity 0.35s ease;
}

.stat-card-total .stat-card-glow {
  background: rgba(191, 115, 134, 0.35);
}

.stat-card-unread .stat-card-glow {
  background: rgba(245, 158, 11, 0.4);
}

.stat-card-read .stat-card-glow {
  background: rgba(16, 185, 129, 0.35);
}

.stat-card-today .stat-card-glow {
  background: rgba(99, 102, 241, 0.35);
}

.stat-card:hover .stat-card-glow {
  opacity: 0.85;
}

/* Watermark Decorative Motif */
.stat-watermark {
  position: absolute;
  right: -6px;
  bottom: -10px;
  font-size: 5.5rem;
  opacity: 0.035;
  color: var(--text-main);
  pointer-events: none;
  transform: rotate(-10deg);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-card:hover .stat-watermark {
  transform: rotate(0deg) scale(1.1);
  opacity: 0.07;
}

/* Top Row: Icon + Badge */
.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}

.stat-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #ffffff;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.stat-icon-total {
  background: linear-gradient(135deg, #bf7386 0%, #dca3af 100%);
  box-shadow: 0 6px 18px rgba(191, 115, 134, 0.32);
}

.stat-icon-unread {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35);
}

.stat-icon-read {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.32);
}

.stat-icon-today {
  background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.32);
}

.stat-card:hover .stat-icon-wrap {
  transform: translateY(-2px) scale(1.08) rotate(4deg);
}

/* Pill Badges with Live Status Indicator */
.stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.28rem 0.65rem;
  border-radius: 9999px;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.badge-total {
  background: #fdf2f4;
  color: #ac5f73;
  border: 1px solid rgba(191, 115, 134, 0.22);
}

.badge-total .badge-dot {
  background: #bf7386;
}

.badge-unread {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-unread .badge-dot {
  background: #f59e0b;
}

.pulse-dot {
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  animation: badgePulse 1.8s infinite;
}

@keyframes badgePulse {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { box-shadow: 0 0 0 7px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.badge-read {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-read .badge-dot {
  background: #10b981;
}

.badge-today {
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.badge-today .badge-dot {
  background: #6366f1;
}

/* Card Number & Label */
.stat-info {
  position: relative;
  z-index: 1;
}

.stat-info h3 {
  font-size: 2.35rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
  margin-bottom: 0.45rem;
  letter-spacing: -0.04em;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  transition: color 0.2s ease;
}

.stat-info p {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.35;
  margin: 0;
}

/* DASHBOARD SPLIT GRID */
.dash-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  gap: 1.5rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.dash-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.4rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-subtle);
}

.panel-header-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.panel-header-icon {
  width: 32px;
  height: 32px;
  background: var(--rose-light);
  color: var(--rose-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.panel-header h3 {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-main);
}

.btn-link-action {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--rose-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-link-action:hover {
  color: var(--rose-dark);
  text-decoration: underline;
}

/* RECENT MESSAGES LIST (MINI) */
.dash-recent-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.recent-msg-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: pointer;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.recent-msg-item:hover {
  background: #ffffff;
  border-color: var(--rose-primary);
  transform: translateX(4px);
  box-shadow: var(--shadow-xs);
}

.recent-msg-item.unread {
  border-left: 4px solid var(--rose-primary);
  background: #ffffff;
}

.msg-sender-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.msg-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose-primary), var(--rose-accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.msg-text-group {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.msg-sender-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-subject-preview {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.msg-meta-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.msg-time {
  font-size: 0.78rem;
  color: var(--text-light);
}

.msg-status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.pill-unread {
  background: var(--rose-light);
  color: var(--rose-primary);
  border: 1px solid var(--border-subtle);
}

.pill-read {
  background: #f1f3f5;
  color: #6c757d;
}

/* TOPIC DISTRIBUTION & TIPS */
.topic-breakdown {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.topic-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.topic-row-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

.topic-name {
  font-weight: 600;
  color: var(--text-main);
}

.topic-percent {
  font-weight: 700;
  color: var(--rose-primary);
  font-family: var(--font-code);
}

.topic-bar-bg {
  height: 8px;
  background: var(--bg-main);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.topic-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--rose-primary), var(--rose-accent));
  transition: width 0.6s ease;
}

.quick-tip-card {
  margin-top: 1.6rem;
  padding: 1.1rem;
  background: var(--rose-light);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  gap: 0.8rem;
}

.quick-tip-card i {
  color: var(--rose-primary);
  font-size: 1.2rem;
  margin-top: 0.15rem;
}

.quick-tip-card p {
  font-size: 0.83rem;
  color: var(--text-main);
  line-height: 1.5;
}

/* ==========================================================
   VIEW: İLETİŞİM (CONTACTS / INBOX)
   ========================================================== */
.inbox-toolbar {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.inbox-toolbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.inbox-header-title h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
}

.inbox-header-title p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.inbox-batch-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.btn-inbox-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  color: var(--text-main);
  transition: var(--transition);
}

.btn-inbox-action:hover {
  background: var(--rose-light);
  border-color: var(--rose-primary);
  color: var(--rose-primary);
}

.btn-inbox-danger {
  color: #c93b3b;
  border-color: rgba(201, 59, 59, 0.2);
}

.btn-inbox-danger:hover {
  background: #fdf0f0;
  border-color: #c93b3b;
  color: #c93b3b;
}

.inbox-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.inbox-search-box {
  flex: 1;
  min-width: 260px;
  position: relative;
  display: flex;
  align-items: center;
}

.inbox-search-box i {
  position: absolute;
  left: 1rem;
  color: var(--text-light);
  font-size: 0.95rem;
}

.inbox-search-box input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.6rem;
  background: var(--bg-main);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--text-main);
  transition: var(--transition);
}

.inbox-search-box input:focus {
  background: #ffffff;
  border-color: var(--rose-primary);
  box-shadow: 0 0 0 3px var(--rose-glow);
}

.inbox-filter-tabs {
  display: flex;
  align-items: center;
  background: var(--bg-main);
  padding: 0.3rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.filter-tab-btn {
  padding: 0.45rem 0.95rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.filter-tab-btn.active {
  background: #ffffff;
  color: var(--rose-primary);
  box-shadow: var(--shadow-xs);
  font-weight: 700;
}

/* MESSAGES TABLE CONTAINER */
.messages-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.messages-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.messages-table th {
  background: #faf6f8;
  padding: 1rem 1.2rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.messages-table td {
  padding: 1.1rem 1.2rem;
  font-size: 0.9rem;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.messages-table tr {
  transition: var(--transition);
}

.messages-table tr:hover {
  background: #fdf8f9;
}

.messages-table tr.unread-row {
  background: #fff;
  font-weight: 600;
}

.messages-table tr.unread-row td {
  color: var(--text-main);
}

.messages-table tr.unread-row .td-sender-name {
  font-weight: 700;
  color: var(--rose-dark);
}

.btn-star-msg {
  color: #cbd5e1;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-star-msg:hover,
.btn-star-msg.starred {
  color: #f59e0b;
}

.cell-sender {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cell-sender-details {
  display: flex;
  flex-direction: column;
}

.td-sender-name {
  font-size: 0.92rem;
  font-weight: 600;
}

.td-sender-email {
  font-size: 0.78rem;
  color: var(--text-light);
}

.td-message-snippet {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.subject-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--rose-light);
  color: var(--rose-primary);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.td-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.btn-action-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  transition: var(--transition);
  cursor: pointer;
}

.btn-action-icon:hover {
  background: var(--rose-light);
  color: var(--rose-primary);
  border-color: var(--rose-primary);
}

.btn-action-danger:hover {
  background: #fdf0f0;
  color: #c93b3b;
  border-color: #c93b3b;
}

.btn-action-text {
  display: none;
}

.mobile-cell-label {
  display: none;
}

body.sidebar-open {
  overflow: hidden !important;
  touch-action: none;
}

/* EMPTY STATE */
.empty-messages-state {
  padding: 4rem 1.5rem;
  text-align: center;
  display: none;
}

.empty-messages-state.show {
  display: block;
}

.empty-icon-wrap {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.2rem auto;
  border-radius: 50%;
  background: var(--rose-light);
  color: var(--rose-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.empty-messages-state h4 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.empty-messages-state p {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 400px;
  margin: 0 auto 1.5rem auto;
}

/* ==========================================================
   MESSAGE DETAIL MODAL
   ========================================================== */
.admin-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(36, 24, 28, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.admin-modal-overlay.active {
  display: flex;
  animation: modalFadeIn 0.25s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.admin-modal-card {
  width: 100%;
  max-width: 680px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-strong);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  animation: modalCardScale 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalCardScale {
  from {
    transform: scale(0.95) translateY(15px);
  }
  to {
    transform: scale(1) translateY(0);
  }
}

.modal-header-bar {
  padding: 1.2rem 1.6rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #faf6f8;
}

.modal-header-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.modal-header-left i {
  color: var(--rose-primary);
  font-size: 1.2rem;
}

.modal-header-left h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.btn-close-modal {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.btn-close-modal:hover {
  background: var(--rose-light);
  color: var(--rose-primary);
}

.modal-scroll-body {
  padding: 1.8rem;
  overflow-y: auto;
  flex: 1;
}

.modal-sender-profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.4rem;
}

.sender-profile-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sender-large-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose-primary), var(--rose-accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.sender-profile-details h4 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.sender-profile-details a {
  font-size: 0.88rem;
  color: var(--rose-primary);
  font-weight: 600;
}

.sender-profile-details a:hover {
  text-decoration: underline;
}

.msg-date-chip {
  font-size: 0.8rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-main);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
}

.msg-subject-box {
  margin-bottom: 1.4rem;
}

.msg-subject-box label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.3rem;
}

.msg-subject-box h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
}

.msg-content-box {
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-main);
  white-space: pre-wrap;
  margin-bottom: 1.6rem;
}

/* QUICK REPLY TEMPLATES */
.quick-reply-box {
  background: #fdf8f9;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  margin-bottom: 1.5rem;
}

.quick-reply-box h5 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--rose-dark);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quick-reply-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-reply-template {
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.btn-reply-template:hover {
  background: var(--rose-light);
  color: var(--rose-primary);
  border-color: var(--rose-primary);
}

.modal-footer-bar {
  padding: 1.2rem 1.6rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #faf6f8;
}

.modal-footer-left {
  display: flex;
  gap: 0.5rem;
}

.btn-reply-direct {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--rose-primary) 0%, var(--rose-accent) 100%);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: var(--shadow-rose);
}

.btn-reply-direct:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(191, 115, 134, 0.35);
}

/* ==========================================================
   FORGOT PASSWORD MODAL (ORTALANMIŞ GÜVENLİ POPUP)
   ========================================================== */
.forgot-modal-card {
  max-width: 490px;
}

.forgot-modal-body {
  padding: 1.6rem;
}

.forgot-info-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  background: var(--rose-light);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.5;
}

.forgot-info-alert i {
  color: var(--rose-primary);
  font-size: 1.25rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.forgot-info-alert strong {
  display: block;
  font-size: 0.92rem;
  color: var(--rose-dark);
  margin-bottom: 0.2rem;
}

.forgot-modal-alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  margin-bottom: 1.2rem;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.forgot-modal-alert.error {
  background: #fdf2f2;
  border: 1px solid #f9d2d2;
  color: #dc2626;
}

.forgot-modal-alert.info {
  background: #eff6ff;
  border: 1px solid #dbeafe;
  color: #2563eb;
}

.forgot-success-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin: 0 auto 1.2rem auto;
  box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.12);
}

.forgot-ticket-box {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-main);
  border: 1px dashed var(--border-strong);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.forgot-ticket-box code {
  font-family: var(--font-code);
  font-weight: 700;
  color: var(--rose-dark);
  font-size: 0.95rem;
}

.forgot-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ==========================================================
   RATE LIMIT & LOCKOUT UI (GÜVENLİK KİLİDİ)
   ========================================================== */
.login-alert.lockout {
  background: #fff5f5;
  border: 1.5px solid #feb2b2;
  color: #c53030;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
  padding: 1.2rem;
}

.lockout-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #feb2b2;
  color: #742a2a;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lockout-timer {
  font-family: var(--font-code);
  font-size: 1.35rem;
  font-weight: 800;
  color: #9b2c2c;
  letter-spacing: 0.08em;
  background: #ffffff;
  padding: 0.35rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid #fbd5d5;
}

.form-control:disabled,
.btn-login:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.5);
}

/* ==========================================================
   TOAST NOTIFICATION
   ========================================================== */
.admin-toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.admin-toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 400px;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.2rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.9rem;
  color: var(--text-main);
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: var(--transition);
}

@keyframes toastIn {
  from {
    transform: translateY(20px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.toast-icon {
  font-size: 1.2rem;
}

.toast-success .toast-icon { color: #059669; }
.toast-info .toast-icon { color: var(--rose-primary); }
.toast-warning .toast-icon { color: #d97706; }
.toast-danger .toast-icon { color: #c93b3b; }

/* ==========================================================
   RESPONSIVE DESIGN (ALL SCREENS: MOBILE, TABLET, DESKTOP)
   ========================================================== */

/* 1. ULTRA-WIDE & LARGE MONITORS (>= 1440px) */
@media (min-width: 1440px) {
  :root {
    --sidebar-width: 280px;
  }

  .admin-body {
    max-width: 1680px;
    margin: 0 auto;
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .dash-split-grid {
    grid-template-columns: 2.2fr 1fr;
    gap: 1.8rem;
  }
}

/* 2. MEDIUM & LARGE TABLETS / COMPACT DESKTOPS (1025px - 1280px) */
@media (max-width: 1280px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }

  .dash-split-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 1.2rem;
  }
}

/* COMPACT DESKTOPS & LARGE TABLETS (<= 1100px) */
@media (max-width: 1100px) {
  .dash-split-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 1.2rem;
  }
}

/* 3. TABLETS (PORTRAIT & LANDSCAPE <= 992px) */
@media (max-width: 992px) {
  :root {
    --sidebar-width: 280px;
  }

  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    z-index: 1000;
    transform: translateX(-100%);
    box-shadow: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .admin-sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 14px 0 45px rgba(36, 24, 28, 0.28);
  }

  .admin-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(36, 24, 28, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
  }

  .admin-sidebar-backdrop.active {
    display: block;
    animation: backdropIn 0.25s ease;
  }

  @keyframes backdropIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  .btn-sidebar-close {
    display: flex;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
  }

  .btn-toggle-sidebar {
    display: flex;
    min-width: 42px;
    min-height: 42px;
    cursor: pointer;
  }

  .admin-app,
  .admin-main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .admin-body {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .dash-split-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 1.5rem;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .dashboard-welcome-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 1.2rem;
    padding: 1.6rem 1.8rem;
  }

  .welcome-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .welcome-actions button {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* 4. MOBİLE & KÜÇÜK TABLETLER (<= 768px) */
@media (max-width: 768px) {
  html, body {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .admin-app,
  .admin-main {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    margin-left: 0 !important;
    box-sizing: border-box !important;
  }

  .admin-topbar {
    height: 60px;
    padding: 0 0.85rem;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden;
  }

  .topbar-left {
    gap: 0.65rem;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }

  .btn-toggle-sidebar {
    display: flex;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    border-radius: 10px;
    flex-shrink: 0;
    cursor: pointer;
  }

  .topbar-title-group {
    min-width: 0;
    overflow: hidden;
  }

  .topbar-title-group h1 {
    font-size: 1.05rem;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar-breadcrumbs {
    display: none !important;
  }

  .topbar-right {
    gap: 0.5rem;
    flex-shrink: 0;
  }

  /* Mobil ekranda "API Senkronize" metnini gizle, sadece canlı nabız noktasını göster */
  .topbar-status-chip span:not(.status-dot-pulse) {
    display: none !important;
  }

  .topbar-status-chip {
    padding: 0.45rem;
    border-radius: var(--radius-full);
    width: 28px;
    height: 28px;
    justify-content: center;
    flex-shrink: 0;
  }

  /* Mobil ekranda "Ana Siteye Git" yazısını gizle, şık kompakt ikon yap */
  .btn-quick-site span {
    display: none !important;
  }

  .btn-quick-site {
    width: 38px;
    height: 38px;
    padding: 0 !important;
    justify-content: center;
    border-radius: 10px;
    font-size: 0.95rem;
    flex-shrink: 0;
  }

  .admin-body {
    padding: 0.95rem 0.85rem;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden;
  }

  .dashboard-welcome-banner {
    padding: 1.25rem 1rem;
    margin-bottom: 1.2rem;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .welcome-text h2 {
    font-size: 1.25rem;
  }

  .welcome-text p {
    font-size: 0.84rem;
    line-height: 1.45;
  }

  .welcome-actions {
    display: flex;
    flex-direction: column;
    width: 100% !important;
    gap: 0.6rem;
  }

  .welcome-actions a,
  .welcome-actions button {
    width: 100% !important;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    box-sizing: border-box !important;
  }

  /* Stats Grid: Mobil ve Tablette 2x2 Kompakt Izgara */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
    width: 100% !important;
    margin-bottom: 1.2rem !important;
    box-sizing: border-box;
  }

  .stat-card {
    padding: 1.1rem 0.95rem !important;
    border-radius: 16px !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .stat-top {
    margin-bottom: 0.75rem !important;
  }

  .stat-icon-wrap {
    width: 40px !important;
    height: 40px !important;
    font-size: 1.1rem !important;
    border-radius: 11px !important;
  }

  .stat-badge {
    font-size: 0.68rem !important;
    padding: 0.22rem 0.5rem !important;
  }

  .stat-info h3 {
    font-size: 1.65rem !important;
    margin-bottom: 0.2rem !important;
  }

  .stat-info p {
    font-size: 0.75rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .stat-watermark {
    font-size: 3.8rem !important;
    right: -4px !important;
    bottom: -6px !important;
  }

  .dash-panel {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-md);
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .panel-header {
    margin-bottom: 1rem;
    padding-bottom: 0.7rem;
    gap: 0.5rem;
    min-width: 0;
  }

  .panel-header h3 {
    font-size: 1.02rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Son mesajlar mobil stack (<= 768px için tam uyum) */
  .recent-msg-item {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.6rem !important;
    padding: 0.9rem 0.85rem !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .msg-sender-info {
    width: 100% !important;
    min-width: 0 !important;
  }

  .msg-text-group {
    width: 100% !important;
    min-width: 0 !important;
  }

  .msg-subject-preview {
    max-width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .msg-meta-group {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding-top: 0.5rem !important;
    border-top: 1px dashed var(--border-subtle) !important;
    gap: 0.5rem !important;
  }

  /* Mesaj Konuları & Bilgi Kutusu Mobil Uyum */
  .topic-row {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .topic-row-info {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    gap: 0.5rem !important;
    box-sizing: border-box !important;
  }

  .topic-name {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .topic-percent {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }

  .quick-tip-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    word-break: break-word !important;
  }

  .quick-tip-card p {
    min-width: 0 !important;
    word-break: break-word !important;
  }

  /* ==========================================================
     MESSAGES TABLE -> GÖZ ALICI MOBİL KART GÖRÜNÜMÜ (CARD VIEW)
     ========================================================== */
  .table-responsive {
    overflow-x: visible;
  }

  .messages-table-card {
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .messages-table,
  .messages-table tbody,
  .messages-table tr,
  .messages-table td {
    display: block;
    width: 100%;
  }

  .messages-table thead {
    display: none !important;
  }

  .messages-table tr {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.15rem 1rem 0.95rem 1rem;
    margin-bottom: 0.9rem;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
  }

  .messages-table tr.unread-row {
    border-left: 4.5px solid var(--rose-primary);
    background: #ffffff;
    box-shadow: 0 4px 18px rgba(191, 115, 134, 0.12);
  }

  .messages-table tr:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }

  .messages-table td {
    padding: 0.25rem 0;
    border: none;
  }

  /* Yıldız ikonu kartın sağ üst köşesinde */
  .cell-star {
    position: absolute;
    top: 1rem;
    right: 0.9rem;
    width: auto !important;
    text-align: right !important;
    z-index: 2;
    padding: 0 !important;
  }

  .btn-star-msg {
    font-size: 1.35rem;
    padding: 0.25rem;
    cursor: pointer;
  }

  /* Gönderen Bilgisi */
  .cell-sender-col {
    padding-right: 2.6rem !important;
  }

  .cell-sender {
    gap: 0.75rem;
  }

  .msg-avatar {
    width: 38px;
    height: 38px;
    font-size: 0.9rem;
    flex-shrink: 0;
  }

  .td-sender-name {
    font-size: 0.95rem;
    font-weight: 700;
  }

  .td-sender-email {
    font-size: 0.8rem;
  }

  /* Konu Etiketi */
  .cell-subject-col {
    margin: 0.35rem 0 0.2rem 0;
  }

  .subject-badge {
    font-size: 0.78rem;
    padding: 0.25rem 0.65rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Mesaj Önizlemesi (2 Satır Kırpma) */
  .cell-snippet-col .td-message-snippet {
    max-width: 100%;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.86rem;
    line-height: 1.45;
    color: var(--text-muted);
    margin: 0.4rem 0 0.55rem 0;
  }

  /* Tarih ve Durum Rozeti */
  .cell-date-col {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--text-light);
    margin-right: 0.65rem;
  }

  .mobile-cell-label {
    display: inline;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.78rem;
  }

  .cell-status-col {
    display: inline-block;
  }

  .msg-status-pill {
    font-size: 0.72rem;
    padding: 0.18rem 0.55rem;
  }

  /* Kart İşlem Butonları (Tam Dokunmatik Izgara) */
  .cell-actions-col {
    padding-top: 0.65rem !important;
  }

  .td-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
  }

  .btn-action-icon {
    width: 100%;
    height: 40px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    gap: 0.45rem;
    padding: 0 0.5rem;
    justify-content: center;
  }

  .btn-action-text {
    display: inline;
    font-size: 0.82rem;
    font-weight: 700;
  }

  /* Inbox Araç Çubuğu */
  .inbox-toolbar {
    padding: 1.15rem 1rem;
    border-radius: var(--radius-md);
    gap: 1rem;
  }

  .inbox-toolbar-top {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .inbox-header-title h2 {
    font-size: 1.22rem;
  }

  .inbox-header-title p {
    font-size: 0.82rem;
  }

  .inbox-batch-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
  }

  .btn-inbox-action {
    padding: 0.55rem 0.45rem;
    font-size: 0.78rem;
    justify-content: center;
    gap: 0.35rem;
  }

  .inbox-filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
    padding-top: 0.85rem;
  }

  .inbox-search-box {
    min-width: 100%;
  }

  .inbox-search-box input {
    padding: 0.65rem 0.85rem 0.65rem 2.4rem;
    font-size: 0.85rem;
  }

  .inbox-search-box i {
    left: 0.85rem;
    font-size: 0.88rem;
  }

  .inbox-filter-tabs {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    padding: 0.25rem;
  }

  .inbox-filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .filter-tab-btn {
    flex-shrink: 0;
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
  }

  /* Modal Mobil Düzeni */
  .admin-modal-overlay {
    padding: 0.75rem;
  }

  .admin-modal-card {
    border-radius: var(--radius-md);
    max-height: 94vh;
  }

  .modal-header-bar {
    padding: 1rem 1.2rem;
  }

  .modal-header-left h3 {
    font-size: 1.05rem;
  }

  .modal-scroll-body {
    padding: 1.2rem 1.1rem;
  }

  .modal-sender-profile {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
  }

  .sender-large-avatar {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }

  .sender-profile-details h4 {
    font-size: 1.05rem;
  }

  .msg-date-chip {
    width: 100%;
    justify-content: flex-start;
    font-size: 0.76rem;
  }

  .msg-subject-box {
    margin-bottom: 1rem;
  }

  .msg-subject-box h3 {
    font-size: 1.08rem;
  }

  .msg-content-box {
    padding: 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
  }

  .quick-reply-box {
    padding: 0.95rem;
    margin-bottom: 1.2rem;
  }

  .quick-reply-chips {
    gap: 0.4rem;
  }

  .btn-reply-template {
    font-size: 0.76rem;
    padding: 0.38rem 0.7rem;
  }

  .modal-footer-bar {
    flex-direction: column-reverse;
    gap: 0.65rem;
    padding: 1rem 1.15rem;
  }

  .modal-footer-left {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .modal-footer-left .btn-inbox-action {
    width: 100%;
    justify-content: center;
    height: 42px;
  }

  .btn-reply-direct {
    width: 100%;
    justify-content: center;
    height: 44px;
    font-size: 0.9rem;
  }

  /* Toast Mobil Uyumu */
  .admin-toast-container {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    pointer-events: none;
  }

  .admin-toast {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
  }
}

/* 5. KOMPAKT TELEFONLAR (<= 540px) */
@media (max-width: 540px) {
  .login-screen {
    padding: 0.85rem 0.65rem;
  }

  .login-card {
    padding: 1.65rem 1.15rem;
    border-radius: var(--radius-md);
    max-width: 100%;
  }

  .login-header {
    margin-bottom: 1.25rem;
  }

  .login-brand {
    margin-bottom: 0.9rem;
  }

  .login-brand-icon {
    width: 42px;
    height: 42px;
    font-size: 1.25rem;
  }

  .login-brand-text {
    font-size: 1.35rem;
  }

  .login-title {
    font-size: 1.3rem;
  }

  .login-subtitle {
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .form-label-row {
    gap: 0.35rem;
    margin-bottom: 0.4rem;
  }

  .form-label-row label {
    font-size: 0.82rem;
  }

  .forgot-password-link {
    font-size: 0.76rem;
  }

  .input-icon-wrap .form-control {
    padding: 0.75rem 2.5rem 0.75rem 2.4rem;
    font-size: 0.88rem;
  }

  .remember-check {
    font-size: 0.84rem;
  }

  .btn-login {
    padding: 0.85rem 1.2rem;
    font-size: 0.92rem;
  }

  .login-back-link {
    font-size: 0.82rem;
    margin-top: 1.1rem;
  }

  /* Forgot Password Modal Mobile */
  .forgot-modal-card {
    width: 100%;
    max-width: 100%;
    border-radius: var(--radius-md);
  }

  .forgot-modal-body {
    padding: 1.15rem 1rem;
  }

  .forgot-info-alert {
    padding: 0.8rem 0.85rem;
    font-size: 0.82rem;
    gap: 0.65rem;
  }

  .forgot-info-alert i {
    font-size: 1.1rem;
  }

  .forgot-modal-footer {
    flex-direction: column-reverse;
    gap: 0.55rem;
    width: 100%;
    padding: 0.85rem 0 0 0;
  }

  .forgot-modal-footer button {
    width: 100%;
    justify-content: center;
    height: 42px;
  }
}

/* 6. MİNİMAL VE DAR EKRANLAR (<= 380px - iPhone SE & Mini) */
@media (max-width: 380px) {
  .login-screen {
    padding: 0.65rem 0.45rem;
  }

  .login-card {
    padding: 1.35rem 0.95rem;
  }

  .form-label-row {
    gap: 0.25rem;
  }

  .form-label-row label {
    font-size: 0.76rem;
  }

  .forgot-password-link {
    font-size: 0.72rem;
  }

  .input-icon-wrap .form-control {
    padding: 0.7rem 2.2rem 0.7rem 2.2rem;
    font-size: 0.84rem;
  }

  .remember-check {
    font-size: 0.8rem;
    gap: 0.45rem !important;
  }

  .btn-login {
    font-size: 0.88rem;
    padding: 0.8rem 1rem;
  }


  /* Topbar Minimal Kompakt */
  .topbar-right {
    gap: 0.45rem;
  }

  .topbar-status-chip span:not(.status-dot-pulse) {
    display: none;
  }

  .topbar-status-chip {
    padding: 0.45rem;
    border-radius: var(--radius-full);
  }

  .btn-quick-site {
    padding: 0.45rem 0.7rem;
    font-size: 0.78rem;
    gap: 0.35rem;
  }

  .welcome-actions {
    flex-direction: column;
    gap: 0.55rem;
  }

  .btn-dash-primary,
  .btn-dash-secondary {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
  }

  .stats-grid {
    gap: 0.6rem;
  }

  .stat-card {
    padding: 0.95rem 0.8rem;
    border-radius: 14px;
  }

  .stat-icon-wrap {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    border-radius: 10px;
  }

  .stat-info h3 {
    font-size: 1.5rem;
  }

  .stat-info p {
    font-size: 0.72rem;
  }

  .stat-watermark {
    font-size: 3.2rem;
  }

  /* Son mesajlar mobil stack */
  .recent-msg-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.85rem;
  }

  .msg-sender-info {
    width: 100%;
  }

  .msg-meta-group {
    width: 100%;
    justify-content: space-between;
    padding-top: 0.45rem;
    border-top: 1px dashed var(--border-subtle);
  }

  .msg-subject-preview {
    max-width: 100%;
  }

  .inbox-batch-actions {
    grid-template-columns: 1fr;
  }

  .inbox-batch-actions button {
    width: 100%;
  }
}

/* 6. MİNİK EKRANLAR (<= 380px: iPhone SE & Katlanabilir Cihazlar) */
@media (max-width: 380px) {
  .admin-topbar {
    padding: 0 0.65rem;
  }

  .topbar-left {
    gap: 0.5rem;
  }

  .btn-toggle-sidebar {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  .btn-quick-site span {
    display: none;
  }

  .btn-quick-site {
    width: 38px;
    height: 38px;
    padding: 0;
    justify-content: center;
    border-radius: 10px;
  }

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

  .stat-info h3 {
    font-size: 1.38rem;
  }

  .btn-action-text {
    display: none;
  }

  .td-actions {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .td-actions .btn-action-icon {
    height: 36px;
  }
}

/* 7. YATAY MOBİL MODU (Cihaz çevrildiğinde: max-height: 540px) */
@media (max-height: 540px) and (orientation: landscape) {
  .admin-modal-card {
    max-height: 96vh;
  }

  .modal-scroll-body {
    max-height: 55vh;
  }

  .sidebar-nav-container {
    max-height: calc(100vh - 170px);
  }
}

/* ==========================================================
   LİNKLER & AYARLAR GÖRÜNÜM STİLLERİ
   ========================================================== */

/* Sayfa Başlığı */
.settings-page-header {
  margin-bottom: 1.75rem;
}

.settings-page-title {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
}

.settings-page-icon {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--rose-primary), var(--rose-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #fff;
  box-shadow: var(--shadow-rose);
  flex-shrink: 0;
}

.settings-page-title h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.2rem;
  line-height: 1.3;
}

.settings-page-title p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 560px;
}

/* Settings Grid */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

/* Settings Kart */
.settings-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.settings-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.settings-card-full {
  grid-column: 1 / -1;
}

.settings-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem 1.6rem;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, #ffffff 0%, rgba(248, 244, 246, 0.6) 100%);
}

.settings-card-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.15rem;
  letter-spacing: -0.01em;
}

.settings-card-header p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.settings-card-icon {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #fff;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.settings-card:hover .settings-card-icon {
  transform: scale(1.05);
}

.settings-icon-profile {
  background: linear-gradient(135deg, var(--rose-primary), var(--rose-dark));
  box-shadow: 0 4px 14px var(--rose-glow);
}

.settings-icon-security {
  background: linear-gradient(135deg, #b45309, #78350f);
  box-shadow: 0 4px 14px rgba(180, 83, 9, 0.25);
}

.settings-icon-session {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
}

.settings-icon-github {
  background: linear-gradient(135deg, #1c1c1e, #3a3a3c);
  box-shadow: 0 4px 14px rgba(28, 28, 30, 0.25);
}

.settings-icon-linkedin {
  background: linear-gradient(135deg, #0a66c2, #0553a1);
  box-shadow: 0 4px 14px rgba(10, 102, 194, 0.25);
}

.settings-card-body {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Form Group */
.settings-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.settings-form-group label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Input Wrapper */
.settings-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.settings-input-wrap > i:first-child {
  position: absolute;
  left: 1.05rem;
  color: var(--text-light);
  font-size: 0.95rem;
  pointer-events: none;
  z-index: 1;
  transition: color 0.25s ease, transform 0.25s ease;
}

.settings-input-wrap:focus-within > i:first-child {
  color: var(--rose-primary);
  transform: scale(1.1);
}

.settings-input {
  width: 100%;
  height: 46px;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1.5px solid rgba(191, 115, 134, 0.22);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  box-sizing: border-box;
}

.settings-input:hover {
  border-color: rgba(191, 115, 134, 0.45);
}

.settings-input:focus {
  border-color: var(--rose-primary);
  box-shadow: 0 0 0 3.5px var(--rose-glow);
  background: #ffffff;
}

.settings-input::placeholder {
  color: var(--text-light);
  font-weight: 400;
}

/* Password Toggle Button inside input */
.settings-input-toggle {
  position: absolute;
  right: 0.65rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  font-size: 0.95rem;
  border-radius: 8px;
  transition: var(--transition);
  z-index: 2;
}

.settings-input-toggle:hover {
  color: var(--rose-primary);
  background: var(--rose-light);
}

.settings-input-toggle:active {
  transform: scale(0.92);
}

.settings-input-wrap:has(.settings-input-toggle) .settings-input {
  padding-right: 2.85rem;
}

/* Form Actions */
.settings-form-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.35rem;
}

/* Save Button */
.btn-settings-save {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.72rem 1.6rem;
  border-radius: 12px;
  font-size: 0.89rem;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, var(--rose-primary), var(--rose-dark));
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px var(--rose-glow);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  font-family: var(--font-main);
  letter-spacing: 0.01em;
}

.btn-settings-save:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(140, 66, 84, 0.35);
  background: linear-gradient(135deg, var(--rose-primary-hover), var(--rose-dark));
}

.btn-settings-save:active:not(:disabled) {
  transform: translateY(0);
}

.btn-settings-save:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-settings-warning {
  background: linear-gradient(135deg, #b45309, #78350f);
  box-shadow: 0 4px 14px rgba(180, 83, 9, 0.25);
}

.btn-settings-warning:hover:not(:disabled) {
  box-shadow: 0 6px 20px rgba(180, 83, 9, 0.35);
  background: linear-gradient(135deg, #92400e, #632a0b);
  transform: translateY(-2px);
}

/* Settings Alert */
.settings-alert {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1.15rem;
  border-radius: 12px;
  margin-top: 1.25rem;
  margin-bottom: 0.85rem;
  animation: alertSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-sizing: border-box;
}

.settings-alert.success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.05) 100%);
  border: 1px solid rgba(16, 185, 129, 0.28);
  box-shadow: 0 4px 16px -2px rgba(16, 185, 129, 0.12);
}

.settings-alert.error {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
  border: 1px solid rgba(239, 68, 68, 0.28);
  box-shadow: 0 4px 16px -2px rgba(239, 68, 68, 0.12);
}

.settings-alert-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: #fff;
  flex-shrink: 0;
}

.settings-alert.success .settings-alert-icon {
  background: #10b981;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.settings-alert.error .settings-alert-icon {
  background: #ef4444;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
}

.settings-alert-content {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.settings-alert.success .settings-alert-content {
  color: #065f46;
}

.settings-alert.error .settings-alert-content {
  color: #991b1b;
}

.settings-alert > i:first-child {
  font-size: 1rem;
  flex-shrink: 0;
}

.settings-alert.success > i:first-child {
  color: #10b981;
}

.settings-alert.error > i:first-child {
  color: #ef4444;
}

@keyframes alertSlideDown {
  0% {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Links Preview Grid */
.links-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.link-preview-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.9rem 1rem;
  background: var(--bg-main);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.link-preview-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.link-preview-url {
  font-size: 0.82rem;
  color: var(--rose-primary);
  font-weight: 500;
  word-break: break-all;
  text-decoration: none;
  transition: color 0.2s;
}

.link-preview-url:hover {
  color: var(--rose-dark);
  text-decoration: underline;
}

/* Session Info Grid */
.session-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.session-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.9rem 1rem;
  background: var(--bg-main);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.session-info-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.session-info-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--rose-light), var(--rose-soft));
  color: var(--rose-dark);
  border: 1px solid var(--rose-soft);
}

/* Responsive: Settings Grid */
@media (max-width: 1100px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .settings-card-full {
    grid-column: unset;
  }
  .links-preview-grid,
  .session-info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .settings-page-title {
    gap: 0.8rem;
  }
  .settings-page-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    font-size: 1.1rem;
  }
  .settings-page-title h2 {
    font-size: 1.2rem;
  }
  .settings-card-header {
    padding: 1rem 1.1rem;
  }
  .settings-card-body {
    padding: 1.1rem;
  }
  .settings-form-actions {
    justify-content: stretch;
  }
  .btn-settings-save {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================
   ÖZEL ONAY MODALI (CUSTOM CONFIRM DIALOG)
   ========================================================== */

.confirm-modal-card {
  max-width: 420px;
  width: 90%;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  animation: confirmModalIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes confirmModalIn {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.confirm-modal-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 2rem 1.25rem;
}

.confirm-modal-icon-wrap .confirm-icon-inner {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
}

/* Danger variant (default) */
.confirm-modal-icon-wrap.danger .confirm-icon-inner {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 2px solid rgba(239, 68, 68, 0.2);
}

/* Warning variant */
.confirm-modal-icon-wrap.warning .confirm-icon-inner {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 2px solid rgba(245, 158, 11, 0.2);
}

.confirm-modal-body {
  padding: 0 2rem 1.5rem;
  text-align: center;
}

.confirm-modal-body h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.55rem;
  line-height: 1.3;
}

.confirm-modal-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.confirm-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-main);
}

/* Cancel button */
.btn-confirm-cancel {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1.5px solid var(--border-strong);
  cursor: pointer;
  font-family: var(--font-main);
  transition: var(--transition);
}

.btn-confirm-cancel:hover {
  background: var(--bg-main);
  color: var(--text-main);
  border-color: var(--rose-primary);
}

/* OK / Confirm button */
.btn-confirm-ok {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.35rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border: none;
  cursor: pointer;
  font-family: var(--font-main);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
  transition: var(--transition);
}

.btn-confirm-ok:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(239, 68, 68, 0.38);
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.btn-confirm-ok:active {
  transform: translateY(0);
}

/* Warning variant OK button */
.btn-confirm-ok.warning-ok {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.btn-confirm-ok.warning-ok:hover {
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.38);
  background: linear-gradient(135deg, #d97706, #b45309);
}

@media (max-width: 480px) {
  .confirm-modal-footer {
    flex-direction: column-reverse;
    padding: 1rem;
  }
  .btn-confirm-cancel,
  .btn-confirm-ok {
    width: 100%;
    justify-content: center;
  }
  .confirm-modal-body {
    padding: 0 1.25rem 1.25rem;
  }
}
