/* ═══════════════════════════════════════════════════════
   Micro Platform — Bileşen Kütüphanesi
   ═══════════════════════════════════════════════════════ */

/* Font Awesome webfont — all.min.css içindeki ../webfonts yolu /m/ altında kırılıyor */
@font-face {
  font-family: "Font Awesome 6 Free";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("../vendor/fontawesome/webfonts/fa-regular-400.woff2") format("woff2");
}
@font-face {
  font-family: "Font Awesome 6 Free";
  font-style: normal;
  font-weight: 900;
  font-display: block;
  src: url("../vendor/fontawesome/webfonts/fa-solid-900.woff2") format("woff2");
}
@font-face {
  font-family: "Font Awesome 6 Brands";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("../vendor/fontawesome/webfonts/fa-brands-400.woff2") format("woff2");
}

/* ── Tipografi Değişkenleri ── */
:root {
  --font-base: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --text-2xs: 0.625rem;   /* 10px */
  --text-xs:  0.6875rem;  /* 11px */
  --text-sm:  0.75rem;    /* 12px */
  --text-md:  0.8125rem;  /* 13px */
  --text-base:0.875rem;   /* 14px */
  --text-lg:  0.9375rem;  /* 15px */
  --text-xl:  1rem;       /* 16px */
  --text-2xl: 1.25rem;    /* 20px */
  --text-3xl: 1.75rem;    /* 28px */
  --text-display: 3rem;   /* 48px — hero rakam (exec) */

  /* Spacing — 8'in katları sistemi (UI-KILAVUZU §4) */
  --space-1: 4px;   --space-2: 8px;   --space-3: 12px;
  --space-4: 16px;  --space-5: 20px;  --space-6: 24px;
  --space-8: 32px;  --space-10: 40px;

  /* Metin renk hiyerarşisi (§2) */
  --text-strong:   #0f172a;
  --text-default:  #1e293b;
  --text-muted:    #475569;
  --text-subtle:   #64748b;
  --text-disabled: #94a3b8;

  /* Marka rengi (§3) */
  --color-primary:        #4f46e5;
  --color-primary-hover:  #4338ca;
  --color-primary-soft:   #eef2ff;
  --color-accent:         #8b5cf6;

  /* Anlam renkleri */
  --color-success:      #10b981;  --color-success-soft: #d1fae5;
  --color-warning:      #f59e0b;  --color-warning-soft: #fef3c7;
  --color-danger:       #ef4444;  --color-danger-soft:  #fee2e2;
  --color-info:         #0ea5e9;  --color-info-soft:    #e0f2fe;

  /* Yüzeyler */
  --surface-page:    #f8fafc;
  --surface-card:    #ffffff;
  --surface-hover:   #f1f5f9;
  --border-default:  #e2e8f0;
  --border-strong:   #cbd5e1;

  /* Geçişler */
  --transition-fast: 120ms ease-out;
  --transition-base: 200ms ease-out;
  --transition-slow: 320ms ease-out;

  /* Gölgeler */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.1);
}

/* Skeleton loader (§7) */
@keyframes mc-shimmer {
  0%   { background-position: -1000px 0; }
  100% { background-position:  1000px 0; }
}
.mc-skeleton {
  background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
  background-size: 1000px 100%;
  animation: mc-shimmer 1.5s linear infinite;
  border-radius: 8px;
  min-height: 16px;
}

/* Empty state (§7) */
.mc-empty {
  padding: 60px 20px;
  text-align: center;
}
.mc-empty-icon  { font-size: 48px; color: var(--border-strong); }
.mc-empty-title { margin: 16px 0 4px; color: var(--text-muted); font-size: 15px; font-weight: 600; }
.mc-empty-text  { color: var(--text-disabled); font-size: 13px; margin: 0 0 20px; }

/* Sayısal tablo hücresi — exec sayfaları için tabular-nums (§5) */
.mc-num { font-variant-numeric: tabular-nums; text-align: right; }

/* Karanlık mod desteği — değişkenler */
html.dark {
  --surface-page:  #0f172a;
  --surface-card:  #1e293b;
  --surface-hover: #334155;
  --border-default: #334155;
  --border-strong:  #475569;
  --text-strong:   #f1f5f9;
  --text-default:  #e2e8f0;
  --text-muted:    #cbd5e1;
  --text-subtle:   #94a3b8;
}

html {
  font-size: 16px; /* rem tabanı */
}

body {
  font-family: var(--font-base);
  font-size: var(--text-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Kart ── */
.mc-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    overflow: hidden;
}

.mc-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.mc-card-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.dark .mc-card {
    background: #1e293b;
    border-color: #334155;
}

/* ── Kart anlamlı vurgu şeridi (sol kenar) ──────────────────────────────
   Standart kart ŞERİTSİZDİR. Şerit yalnızca öne çıkan/durum bildiren kartlarda
   kullanılır ve renk ANLAM taşır (dekoratif değil). Tek kalınlık: 4px.
   Kullanım: <div class="mc-card mc-card--accent-info"> … inline border-left YOK.
     info    = bilgi / nötr vurgu        (indigo)
     success = olumlu / skor / tamamlandı (yeşil)
     warning = dikkat / eksik veri        (amber)
     danger  = uyarı / risk / kritik      (kırmızı) */
.mc-card--accent-info,
.mc-card--accent-success,
.mc-card--accent-warning,
.mc-card--accent-danger { border-left-width: 4px; border-left-style: solid; }
.mc-card--accent-info    { border-left-color: var(--color-primary, #6366f1); }
.mc-card--accent-success { border-left-color: var(--color-success, #10b981); }
.mc-card--accent-warning { border-left-color: var(--color-warning, #f59e0b); }
.mc-card--accent-danger  { border-left-color: var(--color-danger,  #ef4444); }

.mc-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.dark .mc-card-header {
    border-bottom-color: #334155;
}

.mc-card-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: #1e293b;
}

.dark .mc-card-title {
    color: #f1f5f9;
}

.mc-card-body {
    padding: 20px;
}

/* ── İstatistik Kartı ── */
.mc-stat-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.mc-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--stat-color, #6366f1);
}

.mc-stat-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.dark .mc-stat-card {
    background: #1e293b;
    border-color: #334155;
}

.mc-stat-label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.dark .mc-stat-label {
    color: #94a3b8;
}

.mc-stat-value {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
    margin-bottom: 4px;
}

.dark .mc-stat-value {
    color: #f1f5f9;
}

.mc-stat-sub {
    font-size: var(--text-sm);
    color: #94a3b8;
}

.mc-stat-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-2xl);
    background: var(--stat-bg, #eef2ff);
    color: var(--stat-color, #6366f1);
}

/* Inter font ailesi ::before gliflerini ezmesin; FA webfont yüklü olmalı */
.mc-stat-icon > i[class*="fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free";
    font-weight: 900;
    font-style: normal;
    font-variant: normal;
    line-height: 1;
    display: inline-block;
    -webkit-font-smoothing: antialiased;
}

/* Renk varyantları */
.mc-stat-indigo  { --stat-color: #6366f1; --stat-bg: #eef2ff; }
.mc-stat-emerald { --stat-color: #10b981; --stat-bg: #d1fae5; }
.mc-stat-amber   { --stat-color: #f59e0b; --stat-bg: #fef3c7; }
.mc-stat-red     { --stat-color: #ef4444; --stat-bg: #fee2e2; }
.mc-stat-blue    { --stat-color: #3b82f6; --stat-bg: #dbeafe; }
.mc-stat-purple  { --stat-color: #8b5cf6; --stat-bg: #ede9fe; }

/* ── Butonlar ── */
.mc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: var(--text-md);
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}

.mc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mc-btn-sm {
    padding: 5px 10px;
    font-size: var(--text-sm);
    border-radius: 6px;
}

.mc-btn-lg {
    padding: 11px 22px;
    font-size: var(--text-lg);
}

.mc-btn-primary {
    background: #6366f1;
    color: white;
    box-shadow: 0 1px 3px rgba(99,102,241,0.3);
}

.mc-btn-primary:hover {
    background: #4f46e5;
    box-shadow: 0 4px 12px rgba(99,102,241,0.4);
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

.mc-btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.mc-btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
    text-decoration: none;
}

.dark .mc-btn-secondary {
    background: #334155;
    color: #cbd5e1;
    border-color: #475569;
}

.dark .mc-btn-secondary:hover {
    background: #475569;
    color: #f1f5f9;
}

.mc-btn-danger {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.mc-btn-danger:hover {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
    text-decoration: none;
}

.mc-btn-success {
    background: #d1fae5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.mc-btn-success:hover {
    background: #059669;
    color: white;
    border-color: #059669;
    text-decoration: none;
}

.mc-btn-ghost {
    background: transparent;
    color: #64748b;
    border: 1px solid transparent;
}

.mc-btn-ghost:hover {
    background: #f1f5f9;
    color: #1e293b;
    text-decoration: none;
}

/* ── Tablo ── */
.mc-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.dark .mc-table-wrap {
    border-color: #334155;
}

.mc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-md);
    background: white;
}

.dark .mc-table {
    background: #1e293b;
}

.mc-table thead tr {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.dark .mc-table thead tr {
    background: #0f172a;
    border-bottom-color: #334155;
}

.mc-table th {
    padding: 11px 16px;
    text-align: left;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    white-space: nowrap;
}

.dark .mc-table th {
    color: #94a3b8;
}

.mc-table td {
    padding: 13px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.dark .mc-table td {
    border-bottom-color: #1e293b;
    color: #cbd5e1;
}

.mc-table tbody tr:last-child td {
    border-bottom: none;
}

.mc-table tbody tr:hover td {
    background: #f8fafc;
}

.dark .mc-table tbody tr:hover td {
    background: #0f172a;
}

/* ── Form ── */
.mc-form-group {
    margin-bottom: 16px;
}

.mc-label {
    display: block;
    font-size: var(--text-md);
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.dark .mc-label {
    color: #d1d5db;
}

.mc-input {
    width: 100%;
    padding: 9px 12px;
    font-size: var(--text-md);
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    color: #1e293b;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.mc-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.mc-input::placeholder {
    color: #9ca3af;
}

.dark .mc-input {
    background: #1e293b;
    border-color: #475569;
    color: #f1f5f9;
}

.dark .mc-input:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
}

.mc-select {
    width: 100%;
    padding: 9px 12px;
    font-size: var(--text-md);
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    color: #1e293b;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.mc-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.dark .mc-select {
    background: #1e293b;
    border-color: #475569;
    color: #f1f5f9;
}

.mc-textarea {
    width: 100%;
    padding: 9px 12px;
    font-size: var(--text-md);
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    color: #1e293b;
    outline: none;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.mc-textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.dark .mc-textarea {
    background: #1e293b;
    border-color: #475569;
    color: #f1f5f9;
}

/* ── Badge ── */
.mc-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: 600;
    white-space: nowrap;
}

.mc-badge-success  { background: #d1fae5; color: #065f46; }
.mc-badge-warning  { background: #fef3c7; color: #92400e; }
.mc-badge-danger   { background: #fee2e2; color: #991b1b; }
.mc-badge-info     { background: #dbeafe; color: #1e40af; }
.mc-badge-gray     { background: #f1f5f9; color: #475569; }
.mc-badge-indigo   { background: #eef2ff; color: #4338ca; }
.mc-badge-purple   { background: #ede9fe; color: #6d28d9; }
.mc-badge-emerald  { background: #d1fae5; color: #065f46; }

.dark .mc-badge-gray { background: #334155; color: #94a3b8; }

/* ── Progress Bar ── */
.mc-progress {
    height: 8px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
}

.dark .mc-progress {
    background: #334155;
}

.mc-progress-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width 0.5s ease;
}

.mc-progress-fill.success { background: linear-gradient(90deg, #10b981, #059669); }
.mc-progress-fill.warning { background: linear-gradient(90deg, #f59e0b, #d97706); }
.mc-progress-fill.danger  { background: linear-gradient(90deg, #ef4444, #dc2626); }

/* ── Modal ── */
.mc-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(2px);
}

.mc-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    animation: mc-modal-in 0.2s ease;
}

.dark .mc-modal {
    background: #1e293b;
    border: 1px solid #334155;
}

@keyframes mc-modal-in {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.mc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.dark .mc-modal-header {
    border-bottom-color: #334155;
}

.mc-modal-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: #1e293b;
}

.dark .mc-modal-title {
    color: #f1f5f9;
}

.mc-modal-close {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    background: #f1f5f9;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: var(--text-base);
    transition: all 0.15s;
}

.mc-modal-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.mc-modal-body {
    padding: 20px 24px;
}

.mc-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px 20px;
    border-top: 1px solid #f1f5f9;
}

.dark .mc-modal-footer {
    border-top-color: #334155;
}

/* ── Breadcrumb ── */
.mc-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: #64748b;
    margin: 0 0 12px;
    padding: 6px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
}
.mc-breadcrumb-home {
    display: inline-flex;
    align-items: center;
    color: #6366f1;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.15s;
}
.mc-breadcrumb-home:hover { background: #eef2ff; }
.mc-breadcrumb-sep { color: #cbd5e1; font-weight: 500; user-select: none; }
.mc-breadcrumb-link {
    color: #475569;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}
.mc-breadcrumb-link:hover { background: #eef2ff; color: #4f46e5; }
.mc-breadcrumb-current {
    color: #0f172a;
    font-weight: 600;
    padding: 2px 6px;
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
}
@media (max-width: 640px) {
    .mc-breadcrumb { font-size: 11.5px; }
    .mc-breadcrumb-link:not(:nth-last-child(-n+3)) { display: none; }
    .mc-breadcrumb-current { max-width: 180px; }
}
[data-theme="dark"] .mc-breadcrumb { background: #0f172a; border-color: #334155; color: #94a3b8; }
[data-theme="dark"] .mc-breadcrumb-home { color: #818cf8; }
[data-theme="dark"] .mc-breadcrumb-home:hover { background: #1e293b; }
[data-theme="dark"] .mc-breadcrumb-link { color: #cbd5e1; }
[data-theme="dark"] .mc-breadcrumb-link:hover { background: #1e293b; color: #a5b4fc; }
[data-theme="dark"] .mc-breadcrumb-current { color: #f1f5f9; }
[data-theme="dark"] .mc-breadcrumb-sep { color: #475569; }

/* ── Page Header ── */
.mc-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.mc-page-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: #1e293b;
}

.dark .mc-page-title {
    color: #f1f5f9;
}

.mc-page-subtitle {
    font-size: var(--text-md);
    color: #64748b;
    margin-top: 2px;
}

/* ── Year Mini Selector ── */
.mc-year-mini {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: #475569;
    white-space: nowrap;
    flex-wrap: nowrap;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 5px 10px;
}
.mc-year-mini i { color: #6366f1; }
.mc-year-mini span { font-weight: 600; }
.mc-year-sel {
    padding: 2px 6px;
    font-size: 12.5px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #0f172a;
    min-width: 80px;
    cursor: pointer;
    font-weight: 700;
}
.mc-year-sel:focus { outline: none; border-color: #6366f1; }
.dark .mc-year-mini { background: #1e293b; border-color: #334155; color: #cbd5e1; }
.dark .mc-year-sel { background: #0f172a; color: #f1f5f9; border-color: #334155; }

/* ── Empty State ── */
.mc-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.mc-empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.mc-empty-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: #64748b;
    margin-bottom: 6px;
}

.mc-empty-text {
    font-size: var(--text-md);
    color: #94a3b8;
    margin-bottom: 20px;
}

/* ── Alert Banner ── */
.mc-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: var(--text-base);
    margin-bottom: 16px;
}

.mc-alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.mc-alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.mc-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.mc-alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* ── Divider ── */
.mc-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 16px 0;
}

.dark .mc-divider {
    border-top-color: #334155;
}

/* ── Avatar ── */
.mc-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-md);
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.mc-avatar-sm {
    width: 28px;
    height: 28px;
    font-size: var(--text-xs);
}

.mc-avatar-lg {
    width: 48px;
    height: 48px;
    font-size: var(--text-2xl);
}

.mc-avatar-xl {
    width: 96px;
    height: 96px;
    font-size: var(--text-2xl);
}

.profil-avatar-img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* ── Animations ── */
[x-cloak] { display: none !important; }

.mc-fade-in {
    animation: mc-fade-in 0.2s ease;
}

@keyframes mc-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive Grid ── */
.mc-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.mc-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mc-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

@media (max-width: 1024px) {
    .mc-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .mc-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .mc-grid-4, .mc-grid-3, .mc-grid-2 { grid-template-columns: 1fr; }
}

/* ── Scrollbar ── */
.mc-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.mc-scroll::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 3px; }
.mc-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.mc-scroll::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Bildirim Listesi ── */
.bildirim-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
}
.bildirim-unread { background: #eff6ff; }

.bildirim-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
}
.bildirim-icon-unread { background: #dbeafe; }

.bildirim-bell { font-size: var(--text-base); color: #94a3b8; }
.bildirim-bell-unread { color: #3b82f6; }

.bildirim-title { font-size: var(--text-base); font-weight: 400; color: #1e293b; }
.bildirim-title-unread { font-weight: 600; }

/* ── API Metod Badge'leri ── */
.api-method {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: var(--text-xs);
    font-weight: 700;
    font-family: ui-monospace, monospace;
}
.api-method-get    { background: #dbeafe; color: #1d4ed8; }
.api-method-post   { background: #d1fae5; color: #065f46; }
.api-method-patch  { background: #fef3c7; color: #92400e; }
.api-method-put    { background: #fef3c7; color: #92400e; }
.api-method-delete { background: #fee2e2; color: #991b1b; }
.api-method-other  { background: #f1f5f9; color: #475569; }

/* ── Topbar Bildirim Badge ── */
.topbar-notif-btn { position: relative; }
.topbar-notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #ef4444;
    color: #fff;
    font-size: var(--text-2xs);
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    pointer-events: none;
}

/* ── Bildirim Sayfası ── */
.bildirim-page-wrap { max-width: 760px; margin: 0 auto; }

.bildirim-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.15s;
    border-radius: 8px;
}
.bildirim-row:last-child { border-bottom: none; }
.bildirim-row:hover { background: #f8fafc; }
.bildirim-row.bildirim-unread { background: #eff6ff; }
.bildirim-row.bildirim-unread:hover { background: #dbeafe; }

.bildirim-icon-wrap { flex-shrink: 0; }
.bildirim-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bildirim-icon.bildirim-icon-unread { background: #dbeafe; }

.bildirim-bell { font-size: var(--text-base); color: #94a3b8; }
.bildirim-bell.bildirim-bell-unread { color: #3b82f6; }

.bildirim-body { flex: 1; min-width: 0; }
.bildirim-title { font-size: var(--text-base); color: #374151; }
.bildirim-title.bildirim-title-unread { font-weight: 600; color: #1e40af; }
.bildirim-message { font-size: var(--text-sm); color: #64748b; margin-top: 3px; }
.bildirim-time { font-size: var(--text-xs); color: #94a3b8; margin-top: 4px; }
.bildirim-time i { margin-right: 4px; }

.bildirim-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3b82f6;
    flex-shrink: 0;
    margin-top: 6px;
}

.bildirim-empty { padding: 60px 20px; }

/* ── E-posta Ayarları Sayfası ── */
.eposta-page-wrap { max-width: 760px; margin: 0 auto; }
.eposta-card { margin-bottom: 20px; }
.eposta-info-banner { margin-bottom: 20px; }

.eposta-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.eposta-section-title { font-size: var(--text-base); font-weight: 600; color: #1e293b; }
.eposta-section-title i { margin-right: 8px; color: #6366f1; }
.eposta-section-sub { font-size: var(--text-sm); color: #64748b; margin-top: 3px; }

/* Toggle switch */
.eposta-toggle { position: relative; display: inline-block; width: 44px; height: 24px; cursor: pointer; }
.eposta-toggle input { opacity: 0; width: 0; height: 0; }
.eposta-toggle-slider {
    position: absolute; inset: 0;
    background: #cbd5e1; border-radius: 24px; transition: background 0.2s;
}
.eposta-toggle-slider::before {
    content: ''; position: absolute;
    width: 18px; height: 18px; left: 3px; top: 3px;
    background: #fff; border-radius: 50%; transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.eposta-toggle input:checked + .eposta-toggle-slider { background: #6366f1; }
.eposta-toggle input:checked + .eposta-toggle-slider::before { transform: translateX(20px); }

/* SMTP alanları */
.eposta-smtp-fields { margin-top: 4px; }
.eposta-hidden { display: none; }
.eposta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 600px) { .eposta-grid { grid-template-columns: 1fr; } }

.eposta-tls-row {
    display: flex; gap: 24px; margin-top: 14px; flex-wrap: wrap;
}
.eposta-check-label {
    display: flex; align-items: center; gap: 8px;
    font-size: var(--text-md); color: #374151; cursor: pointer;
}
.eposta-check-label input { width: 15px; height: 15px; cursor: pointer; }

.eposta-test-row { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.eposta-test-result { font-size: var(--text-md); }
.eposta-test-ok   { color: #16a34a; font-weight: 600; }
.eposta-test-fail { color: #dc2626; font-weight: 600; }

/* Bildirim tercihleri */
.eposta-pref-list { display: flex; flex-direction: column; gap: 2px; }
.eposta-pref-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; border-radius: 8px; cursor: pointer;
    transition: background 0.15s;
}
.eposta-pref-item:hover { background: #f8fafc; }
.eposta-pref-name { font-size: var(--text-base); font-weight: 500; color: #1e293b; }
.eposta-pref-desc { font-size: var(--text-sm); color: #64748b; margin-top: 2px; }
.eposta-pref-check { width: 16px; height: 16px; cursor: pointer; flex-shrink: 0; }

/* Alt butonlar */
.eposta-actions {
    display: flex; justify-content: flex-end; gap: 12px; margin-top: 8px;
}

/* ── Ayarlar Hub Sayfası ── */
.ayarlar-hub-section-label {
    font-size: var(--text-xs); font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: #94a3b8; padding: 0 4px 10px;
}
.ayarlar-hub-item {
    display: flex; align-items: center; gap: 14px;
    padding: 13px 10px; border-radius: 10px;
    text-decoration: none; transition: background 0.15s;
    cursor: pointer;
}
.ayarlar-hub-item:hover { background: #f8fafc; }
.ayarlar-hub-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: var(--text-xl); flex-shrink: 0;
}
.ayarlar-hub-icon-cyan {
    background: #ecfeff;
    color: #0891b2;
}
.ayarlar-hub-body { flex: 1; min-width: 0; }
.ayarlar-hub-title { font-size: var(--text-base); font-weight: 600; color: #1e293b; }
.ayarlar-hub-desc  { font-size: var(--text-sm); color: #64748b; margin-top: 2px; }
.ayarlar-hub-arrow { font-size: var(--text-xs); color: #cbd5e1; flex-shrink: 0; }

/* ── Native Modal ─────────────────────────────────────────────────────────── */
.mc-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  z-index: 9998;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.mc-modal-overlay.open,
.mc-modal-overlay.active { display: flex; }

/* SweetAlert2 — her zaman en üstte; VGS gibi inline z-index:2147483000 olan modalların üstünde */
.swal2-container {
  z-index: 2147483647 !important;
}

.mc-modal,
.mc-modal-sm,
.mc-modal-md,
.mc-modal-lg,
.mc-modal-xl {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: mc-modal-in 0.2s ease;
}
.mc-modal-sm  { max-width: 440px; }
.mc-modal-md  { max-width: 600px; }
.mc-modal-lg  { max-width: 760px; }
.mc-modal-xl  { max-width: 960px; }
@keyframes mc-modal-in {
  from { opacity: 0; transform: translateY(-16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.mc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #f1f5f9;
}
.mc-modal-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 10px;
}
.mc-modal-title i {
  width: 32px; height: 32px;
  background: #ede9fe;
  color: #7c3aed;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-base);
}
.mc-modal-close {
  width: 32px; height: 32px;
  border: none; background: #f8fafc;
  border-radius: 8px; cursor: pointer;
  color: #64748b; font-size: var(--text-base);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.mc-modal-close:hover { background: #fee2e2; color: #dc2626; }

.mc-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}
.mc-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Form grid */
.mc-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.mc-form-grid .full { grid-column: 1 / -1; }

.mc-form-group { display: flex; flex-direction: column; gap: 5px; }
.mc-form-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.02em;
}
.mc-form-label .req { color: #dc2626; margin-left: 2px; }

.mc-form-input {
  height: 38px;
  padding: 0 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: var(--text-base);
  color: #1e293b;
  background: #f8fafc;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}
.mc-form-input:focus {
  border-color: #7c3aed;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}
.mc-form-input::placeholder { color: #94a3b8; }

textarea.mc-form-input {
  min-height: 120px;
  height: auto;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.45;
}

select.mc-form-input {
  cursor: pointer;
  appearance: auto;
}

.mc-modal-form-validation {
  font-size: var(--text-sm);
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.mc-modal-form-validation[hidden] {
  display: none !important;
}

/* Salt okunur bilgi modalı (openMcInfoModal) */
.mc-modal-info-body {
  font-size: var(--text-base);
  color: #475569;
  line-height: 1.55;
}
.mc-modal-info-body .mc-modal-info-p {
  margin: 0 0 12px;
}
.mc-modal-info-body .mc-modal-info-p:last-child {
  margin-bottom: 0;
}
.mc-modal-info-body ul.mc-modal-info-list {
  margin: 8px 0 0;
  padding-left: 1.25rem;
}
.mc-modal-info-body ul.mc-modal-info-list li {
  margin-bottom: 6px;
}

.mc-form-section {
  font-size: var(--text-xs);
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 0 4px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 4px;
  grid-column: 1 / -1;
}

/* ── Geniş Modal (modal-lg) ── */
.mc-modal-lg {
  max-width: 780px;
}

/* ── SweetAlert2 Geniş Popup ── */
.mc-swal-wide {
  width: 780px !important;
  max-width: 780px !important;
}

/* ── Sayfa İçerik Sarmalayıcı ── */
.mc-page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 10px 0;
}

/* ── Outline Buton ── */
.mc-btn-outline {
  background: transparent;
  color: #6366f1;
  border: 1.5px solid #6366f1;
}
.mc-btn-outline:hover {
  background: #6366f1;
  color: white;
  text-decoration: none;
}

/* ── HGS Kullanıcı Satırı ── */
.hgs-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  transition: background 0.15s;
}
.hgs-user-row:hover {
  background: #f8fafc;
}
.hgs-user-row:last-child {
  border-bottom: none;
}
.hgs-user-row.hgs-user-active {
  background: #eef2ff;
  border-left: 3px solid #6366f1;
  padding-left: 17px;
}
.hgs-user-name {
  font-size: var(--text-md);
  font-weight: 500;
  color: #1e293b;
}
.hgs-user-email {
  font-size: var(--text-sm);
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Tenant Modal Form Grid ── */
.tm-section-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
  padding: 14px 0 8px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 12px;
}
.tm-section-label:first-child { padding-top: 0; }

.tm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px 16px;
  margin-bottom: 4px;
}

/* 2-kolon grid — tenant modal için */
.tm-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin-bottom: 4px;
}

.tm-field { display: flex; flex-direction: column; gap: 5px; }
.tm-full  { grid-column: 1 / -1; }

@media (max-width: 640px) {
  .tm-grid  { grid-template-columns: 1fr 1fr; }
  .tm-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .tm-grid, .tm-grid-2 { grid-template-columns: 1fr; }
  .tm-full { grid-column: 1; }
}
