:root {
  --admin-sidebar-width: 280px;
  --admin-topbar-height: 72px;
  --admin-bg: #faf7f5;
  --admin-surface: #ffffff;
  --admin-border: #eadfda;
  --admin-text: #352832;
  --admin-muted: #75636d;
  --admin-primary: #7b2147;
  --admin-primary-dark: #5b1735;
  --admin-accent: #f39200;
  --admin-accent-dark: #c97500;
  --admin-sidebar: #5b1735;
  --admin-sidebar-muted: #e2bccb;
  --admin-sidebar-hover: rgba(255, 255, 255, 0.08);
  --admin-sidebar-active: rgba(243, 146, 0, 0.22);
  --bs-primary-rgb: 123, 33, 71;
  --bs-link-color: #7b2147;
  --bs-link-hover-color: #5b1735;
}

.btn-primary {
  --bs-btn-bg: var(--admin-primary);
  --bs-btn-border-color: var(--admin-primary);
  --bs-btn-hover-bg: var(--admin-primary-dark);
  --bs-btn-hover-border-color: var(--admin-primary-dark);
  --bs-btn-active-bg: var(--admin-primary-dark);
  --bs-btn-active-border-color: var(--admin-primary-dark);
  --bs-btn-disabled-bg: #a67589;
  --bs-btn-disabled-border-color: #a67589;
}

.btn-outline-primary {
  --bs-btn-color: var(--admin-primary);
  --bs-btn-border-color: var(--admin-primary);
  --bs-btn-hover-bg: var(--admin-primary);
  --bs-btn-hover-border-color: var(--admin-primary);
  --bs-btn-active-bg: var(--admin-primary-dark);
  --bs-btn-active-border-color: var(--admin-primary-dark);
}

.text-primary { color: var(--admin-primary) !important; }
.text-bg-primary,
.bg-primary { background-color: var(--admin-primary) !important; }
.border-primary { border-color: var(--admin-primary) !important; }
.form-check-input:checked { background-color: var(--admin-primary); border-color: var(--admin-primary); }
.page-link { color: var(--admin-primary); }
.page-link:hover { color: var(--admin-primary-dark); }
.active > .page-link,
.page-link.active { background-color: var(--admin-primary); border-color: var(--admin-primary); }

html,
body {
  min-height: 100%;
  max-width: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  background: var(--admin-bg);
  color: var(--admin-text);
}

.admin-shell {
  min-height: 100vh;
  padding-left: var(--admin-sidebar-width);
  overflow-x: hidden;
  max-width: 100%;
}

.admin-shell.admin-shell-public,
body.sidebar-collapsed .admin-shell.admin-shell-public {
  padding-left: 0;
}

.admin-sidebar {
  background: var(--admin-sidebar);
  bottom: 0;
  color: #fff;
  display: flex;
  flex-direction: column;
  left: 0;
  position: fixed;
  top: 0;
  width: var(--admin-sidebar-width);
  z-index: 1040;
}

.user-sidebar {
  background: linear-gradient(180deg, #651a3c 0%, #411027 100%);
}

.admin-sidebar {
  background: linear-gradient(180deg, #651a3c 0%, #411027 100%);
}

.sidebar-brand {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
  padding: 18px 20px;
}

.brand-link {
  align-items: center;
  color: #fff;
  display: flex;
  gap: 12px;
  text-decoration: none;
}

.brand-link:hover {
  color: #fff;
}

.brand-text-link {
  color: #fff;
  min-width: 0;
  text-decoration: none;
}

.brand-text-link:hover {
  color: #fff;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #fff0d8 100%);
  border-radius: 12px;
  border: 0;
  color: var(--admin-accent-dark);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.95rem;
  font-weight: 700;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.brand-text > span {
  font-size: 0.96rem;
  letter-spacing: -0.01em;
}

.brand-text small {
  max-width: 175px;
}

.dashboard-hero {
  background: linear-gradient(125deg, #5b1735 0%, #7b2147 58%, #b34d37 100%);
  border-radius: 18px;
  box-shadow: 0 18px 36px rgba(91, 23, 53, 0.2);
  color: #fff;
  overflow: hidden;
  padding: 28px 30px;
  position: relative;
}

.dashboard-hero::after {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  content: "";
  height: 240px;
  position: absolute;
  right: -60px;
  top: -105px;
  width: 240px;
}

.dashboard-hero > * { position: relative; z-index: 1; }
.dashboard-eyebrow { color: #ffd79a; font-size: .72rem; font-weight: 800; letter-spacing: .12em; margin-bottom: 8px; }
.dashboard-hero-copy { color: rgba(255,255,255,.78); }
.dashboard-hero .btn-primary { background: #fff; border-color: #fff; color: #5b1735; }
.dashboard-hero .btn-outline-secondary { border-color: rgba(255,255,255,.45); color: #fff; }
.dashboard-hero .btn-outline-secondary:hover { background: rgba(255,255,255,.12); border-color: #fff; }

.metric-card {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(15, 42, 61, .06);
  border-radius: 15px;
  box-shadow: 0 8px 22px rgba(30, 55, 80, .07);
  display: flex;
  gap: 14px;
  height: 100%;
  padding: 18px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.metric-card:hover { box-shadow: 0 12px 28px rgba(30,55,80,.12); transform: translateY(-2px); }
.metric-card i { align-items: center; border-radius: 12px; display: flex; font-size: 1.25rem; height: 44px; justify-content: center; width: 44px; }
.metric-card div { display: flex; flex-direction: column; min-width: 0; }
.metric-card span { color: var(--admin-muted); font-size: .78rem; }
.metric-card strong { color: #132c3d; font-size: 1.65rem; line-height: 1.15; }
.metric-blue i { background:#e4f1fa; color:#2878a3; } .metric-amber i { background:#fff3d8; color:#bd7b08; }
.metric-violet i { background:#eee9ff; color:#7657ca; } .metric-cyan i { background:#ddf5f5; color:#158185; }
.metric-green i { background:#e1f4e9; color:#268250; }

.dashboard-chart-card { border-radius: 16px; box-shadow: 0 8px 24px rgba(30,55,80,.07); }
.dashboard-chart-card .card-body { padding: 24px; }
.chart-heading { align-items: start; display:flex; justify-content:space-between; margin-bottom:22px; }
.chart-heading p { color:var(--admin-muted); font-size:.84rem; margin:0; }
.chart-total { background:#edf5f7; border-radius:20px; color:#176b87; font-size:.76rem; font-weight:700; padding:6px 10px; }
.application-chart-wrap { align-items:center; display:flex; gap:30px; justify-content:center; }
.donut-chart { align-items:center; background:conic-gradient(#32a36b 0 var(--accepted), #e2a82d var(--accepted) calc(var(--accepted) + var(--review)), #d75a63 calc(var(--accepted) + var(--review)) calc(var(--accepted) + var(--review) + var(--rejected)), #7b8da2 calc(var(--accepted) + var(--review) + var(--rejected)) 100%); border-radius:50%; display:flex; flex:0 0 154px; height:154px; justify-content:center; position:relative; width:154px; }
.donut-chart::after { background:#fff; border-radius:50%; content:""; height:105px; position:absolute; width:105px; }
.donut-chart > div { align-items:center; display:flex; flex-direction:column; position:relative; z-index:1; }
.donut-chart strong { color:#173247; font-size:1.45rem; }.donut-chart span { color:var(--admin-muted); font-size:.75rem; }
.chart-legend { display:flex; flex:1; flex-direction:column; gap:10px; }
.chart-legend > div { align-items:center; display:grid; font-size:.82rem; gap:8px; grid-template-columns:10px 1fr auto; }
.legend-dot { border-radius:50%; height:9px; width:9px; }.legend-dot.accepted{background:#32a36b}.legend-dot.review{background:#e2a82d}.legend-dot.rejected{background:#d75a63}.legend-dot.payment{background:#7b8da2}
.operation-bars { display:flex; flex-direction:column; gap:17px; }
.operation-row > div:first-child { display:flex; font-size:.83rem; justify-content:space-between; margin-bottom:7px; }
.operation-track { background:#edf1f5; border-radius:8px; height:10px; overflow:hidden; }
.operation-track span { border-radius:8px; display:block; height:100%; min-width:3px; }
.bar-blue{background:#3289b3}.bar-amber{background:#e2a82d}.bar-violet{background:#8065ce}.bar-cyan{background:#27a0a1}

@media (max-width: 575.98px) {
  .dashboard-hero { padding:22px 20px; }
  .application-chart-wrap { align-items:stretch; flex-direction:column; }
  .donut-chart { align-self:center; }
}

.brand-toggle-button {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.brand-toggle-button:hover,
.brand-toggle-button:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.14);
  transform: scale(1.02);
}

.brand-text {
  display: flex;
  flex-direction: column;
  font-weight: 700;
  line-height: 1.15;
}

.brand-text small {
  color: var(--admin-sidebar-muted);
  font-size: 0.78rem;
  font-weight: 500;
  margin-top: 3px;
}

.sidebar-nav {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 12px 24px;
}

.sidebar-section {
  color: var(--admin-sidebar-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 18px 10px 8px;
  text-transform: uppercase;
}

.sidebar-group {
  margin-top: 4px;
}

.sidebar-subnav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-left: 6px;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-subnav .sidebar-link {
  min-height: 36px;
  padding: 8px 10px;
}

.sidebar-subnav .sidebar-link i {
  font-size: 0.94rem;
}

.sidebar-link {
  align-items: center;
  border-radius: 8px;
  color: #d7e1ec;
  display: flex;
  gap: 10px;
  min-height: 40px;
  padding: 9px 10px;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-link i {
  color: #aac0d4;
  flex: 0 0 22px;
  font-size: 1rem;
  text-align: center;
}

.sidebar-link span {
  overflow-wrap: anywhere;
}

.sidebar-link:hover,
.sidebar-link:focus {
  background: var(--admin-sidebar-hover);
  color: #fff;
}

.sidebar-link.active {
  background: var(--admin-sidebar-active);
  color: #fff;
  font-weight: 600;
}

.admin-main {
  min-height: 100vh;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  transition: width 0.2s ease, max-width 0.2s ease;
}

.admin-main-full {
  width: 100%;
  max-width: 100%;
}

.admin-topbar {
  align-items: center;
  background: var(--admin-surface);
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  gap: 18px;
  height: var(--admin-topbar-height);
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.topbar-left,
.topbar-actions {
  align-items: center;
  display: flex;
  gap: 14px;
  min-width: 0;
}

.topbar-title {
  color: var(--admin-text);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

.topbar-title:empty::before {
  content: "Yönetim Paneli";
}

.topbar-subtitle {
  color: var(--admin-muted);
  font-size: 0.82rem;
  margin-top: 2px;
}

.topbar-search {
  align-items: center;
  background: #f7f9fc;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  display: flex;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  width: min(28vw, 320px);
}

.topbar-search i {
  color: var(--admin-muted);
}

.topbar-search .form-control {
  background: transparent;
  border: 0;
  box-shadow: none;
  font-size: 0.92rem;
  padding: 0;
}

.icon-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  color: var(--admin-text);
  display: inline-flex;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.icon-button:hover {
  background: #f8fafc;
}

.user-menu {
  align-items: center;
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  color: var(--admin-text);
  display: inline-flex;
  gap: 9px;
  min-height: 40px;
  padding: 5px 10px 5px 6px;
}

.user-avatar {
  align-items: center;
  background: var(--admin-primary);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 700;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.user-name {
  font-size: 0.9rem;
  font-weight: 600;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-content {
  padding: 28px;
  min-width: 0;
  max-width: 100%;
}

.admin-content .table-responsive {
  max-width: 100%;
}

.sinav-details-table {
  table-layout: fixed;
  width: 100%;
}

.sinav-details-table th,
.sinav-details-table td {
  overflow-wrap: anywhere;
  vertical-align: top;
}

.sinav-col-bina {
  width: 31%;
}

.sinav-col-sinif {
  width: 24%;
}

.sinav-col-mini {
  width: 6%;
  white-space: normal;
}

.sinav-col-actions {
  width: 21%;
}

.sinav-details-table td .d-flex.flex-wrap.gap-2 {
  gap: 0.4rem !important;
}

.sinav-details-table td .btn.btn-sm {
  padding: 0.35rem 0.55rem;
  white-space: nowrap;
}

.sinav-ozet-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-home {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dashboard-home-header {
  align-items: flex-end;
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  padding: 24px;
}

.module-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.module-card {
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  color: var(--admin-text);
  display: flex;
  gap: 16px;
  min-height: 150px;
  padding: 20px;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.module-card:hover,
.module-card:focus {
  border-color: rgba(31, 95, 139, 0.45);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  color: var(--admin-text);
  transform: translateY(-2px);
}

.module-card-primary {
  border-color: rgba(31, 95, 139, 0.4);
}

.module-icon {
  align-items: center;
  background: #e7f2fb;
  border-radius: 8px;
  color: var(--admin-primary-dark);
  display: inline-flex;
  flex: 0 0 52px;
  font-size: 1.45rem;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.module-card-primary .module-icon {
  background: var(--admin-primary);
  color: #fff;
}

.module-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.module-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.module-text {
  color: var(--admin-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.sidebar-backdrop {
  background: rgba(15, 23, 42, 0.44);
  display: none;
  inset: 0;
  position: fixed;
  z-index: 1035;
}

body.sidebar-collapsed .admin-sidebar {
  width: 88px;
}

body.sidebar-collapsed .admin-shell {
  padding-left: 88px;
}

body.sidebar-collapsed .admin-main {
  width: 100%;
  max-width: 100%;
}

body.sidebar-collapsed .sidebar-section,
body.sidebar-collapsed .sidebar-link span,
body.sidebar-collapsed .brand-text {
  display: none;
}

body.sidebar-collapsed .sidebar-brand {
  padding: 18px 14px;
}

body.sidebar-collapsed .brand-link {
  justify-content: center;
}

body.sidebar-collapsed .sidebar-nav {
  padding-left: 10px;
  padding-right: 10px;
}

body.sidebar-collapsed .sidebar-subnav {
  border-left: 0;
  margin-left: 0;
  padding-left: 0;
}

body.sidebar-collapsed .sidebar-link,
body.sidebar-collapsed .sidebar-subnav .sidebar-link {
  justify-content: center;
  min-height: 42px;
  padding: 10px;
}

body.sidebar-collapsed .sidebar-link i {
  flex: 0 0 auto;
  font-size: 1.05rem;
}

@media (max-width: 991.98px) {
  .admin-shell {
    padding-left: 0;
  }

  .admin-sidebar {
    box-shadow: 18px 0 36px rgba(15, 23, 42, 0.18);
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

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

  body.sidebar-open .sidebar-backdrop {
    display: block;
  }

  .admin-main {
    width: 100%;
    max-width: 100%;
  }

  .admin-topbar {
    padding: 0 18px;
  }

  .topbar-search {
    display: none;
  }
}

@media (max-width: 575.98px) {
  :root {
    --admin-sidebar-width: 268px;
    --admin-topbar-height: 64px;
  }

  .admin-content {
    padding: 18px 14px;
  }

  .topbar-subtitle,
  .user-name,
  .user-menu .bi-chevron-down {
    display: none;
  }

  .admin-topbar {
    gap: 10px;
    padding: 0 12px;
  }

  .topbar-left,
  .topbar-actions {
    gap: 8px;
  }
}

@media (max-width: 1199.98px) {
  .sinav-col-bina {
    width: 28%;
  }

  .sinav-col-sinif {
    width: 24%;
  }

  .sinav-col-actions {
    width: 24%;
  }
}

@media (max-width: 991.98px) {
  .sinav-details-table {
    min-width: 960px;
  }

  .sinav-ozet-grid {
    grid-template-columns: 1fr;
  }
}

/* Dosya yönetimi */
.files-table {
  table-layout: fixed;
  width: 100%;
}

.files-col-id { width: 76px; }
.files-col-uid { width: 230px; }
.files-col-name { width: auto; }
.files-col-mime { width: 165px; }
.files-col-ext { width: 82px; }
.files-col-status { width: 112px; }
.files-col-actions { width: 270px; }

.files-table th,
.files-table td {
  padding: 0.85rem 0.75rem;
  vertical-align: middle;
}

.files-uid,
.files-name,
.files-mime {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.files-uid {
  color: #334155;
  font-size: 0.82rem;
}

.files-actions-cell {
  text-align: right;
}

.files-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.files-actions .btn {
  align-items: center;
  display: inline-flex;
  gap: 0.3rem;
  justify-content: center;
  white-space: nowrap;
}

@media (max-width: 1199.98px) {
  .files-table {
    min-width: 1040px;
  }
}

@media (max-width: 767.98px) {
  .files-table-wrap {
    overflow: visible;
  }

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

  .files-table {
    min-width: 0;
  }

  .files-table colgroup,
  .files-table thead {
    display: none;
  }

  .files-table tbody {
    display: grid;
    gap: 0.85rem;
    padding: 0.85rem;
  }

  .files-table tbody tr {
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(30, 41, 59, 0.05);
    overflow: hidden;
  }

  .files-table tbody td {
    align-items: flex-start;
    border: 0;
    border-bottom: 1px solid #edf1f6;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 96px minmax(0, 1fr);
    padding: 0.7rem 0.85rem;
    text-align: left;
  }

  .files-table tbody td::before {
    color: var(--admin-muted);
    content: attr(data-label);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }

  .files-table tbody td:last-child {
    border-bottom: 0;
  }

  .files-actions-cell {
    display: block !important;
  }

  .files-actions-cell::before {
    display: block;
    margin-bottom: 0.65rem;
  }

  .files-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .files-actions .btn {
    min-height: 38px;
  }

  .files-empty-row td {
    display: block;
  }

  .files-empty-row td::before {
    display: none;
  }
}

@media (max-width: 479.98px) {
  .files-upload-button {
    width: 100%;
  }

  .files-table tbody td {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .files-actions {
    grid-template-columns: 1fr;
  }
}
.notification-badge {
    position: absolute;
    top: -5px;
    right: -7px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 15px;
    text-align: center;
}

.notification-menu {
    width: min(390px, calc(100vw - 24px));
    max-height: 520px;
    overflow: hidden;
}

.notification-list {
    max-height: 440px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 3px;
    padding: 12px 16px;
    border: 0;
    border-bottom: 1px solid #e9ecef;
    background: #fff;
    color: #172033;
    text-align: left;
    text-decoration: none;
}

.notification-item:hover {
    background: #f8f9fa;
    color: #172033;
}

.notification-unread {
    border-left: 4px solid #0d6efd;
    background: #eef5ff;
}

.notification-title { font-weight: 700; }
.notification-message { color: #526075; font-size: .875rem; }
.notification-date { color: #7a8699; font-size: .75rem; }

.notification-popup-modal .modal-dialog {
    max-width: 620px;
}

.notification-popup-header {
    border-bottom: 0;
    background: linear-gradient(135deg, #7d173f, #a61e4d);
    color: #fff;
}

.notification-popup-item {
    padding: 18px 22px;
    border-bottom: 1px solid #e9ecef;
    background: #fff;
}

.notification-popup-item:last-child {
    border-bottom: 0;
}

.notification-popup-item-return {
    border-left: 5px solid #a61e4d;
    background: linear-gradient(90deg, #fff1f4 0, #fff 42%);
}

.notification-popup-item-return h3 {
    color: #86163e;
}

.notification-popup-message {
    color: #3f4b5e;
    line-height: 1.55;
    white-space: pre-line;
}
