/* Ortak arayüz bileşenleri. Şimdilik yalnızca işlevsel yerleşim; görsel cila sonraki adımda. */

/* ---------- Tarih seçici (js/components/date-picker.js) ---------- */
.dp-field { position: relative; display: flex; align-items: center; }
.dp-field input[data-dp-input] { width: 100%; padding-right: 42px; }
.dp-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-soft); cursor: pointer; }
.dp-toggle:hover { background: var(--info-soft); color: var(--blue); }
.dp-toggle:disabled { opacity: .5; cursor: not-allowed; }

.dp { position: fixed; z-index: 1000; width: 288px; padding: 12px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-lift); }
.dp[hidden] { display: none; }
.dp-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.dp-head select { flex: 1; min-width: 0; padding: 6px 28px 6px 8px; font-size: .86rem; }
.dp-nav { width: 32px; height: 32px; flex: none; border: 0; border-radius: 8px; background: transparent; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.dp-nav:hover { background: var(--info-soft); }
.dp-week, .dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-week span { text-align: center; font-size: .72rem; font-weight: 600; color: var(--ink-soft); padding: 4px 0; text-transform: capitalize; }
.dp-day { aspect-ratio: 1; border: 0; border-radius: 8px; background: transparent; font-size: .86rem; cursor: pointer; }
.dp-day:hover { background: var(--info-soft); }
.dp-day.is-outside { color: #9AA8BA; }
.dp-day.is-today { box-shadow: inset 0 0 0 1px var(--blue); }
.dp-day.is-selected { background: var(--blue); color: #fff; }
.dp-day.is-disabled { opacity: .35; cursor: not-allowed; pointer-events: none; }
.dp-time { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; }
.dp-time input { width: 52px; text-align: center; padding: 6px; }
.dp-foot { display: flex; gap: 6px; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.dp-foot button { border: 0; background: transparent; color: var(--blue); font-weight: 600; font-size: .84rem; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.dp-foot button:hover { background: var(--info-soft); }
.dp button:focus-visible, .dp-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }

/* ---------- Özel açılır liste (js/components/custom-select.js) ---------- */
.cs-native { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; overflow: hidden; }
.cs-button {
  display: block; width: 100%; min-width: 0; padding: 11px 38px 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234C6079' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
  font-size: .92rem; line-height: 1.4; text-align: left; cursor: pointer; outline: none; transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.cs-button:focus-visible, .cs-button[aria-expanded="true"] { border-color: var(--blue); background-color: #fff; box-shadow: 0 0 0 3px rgba(30, 90, 168, .12); }
.cs-button:disabled { background-color: #EEF1F5; color: var(--ink-soft); cursor: not-allowed; }
.cs-button.is-placeholder .cs-value { color: var(--ink-soft); }
.cs-value { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cs-popup { position: fixed; z-index: 1000; display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-lift); overflow: hidden; }
.cs-popup[hidden] { display: none; }
.cs-search-wrap { padding: 8px; border-bottom: 1px solid var(--line); }
.cs-search-wrap[hidden] { display: none; }
.cs-list { overflow-y: auto; padding: 6px; overscroll-behavior: contain; }
.cs-option { padding: 9px 12px; border-radius: 8px; font-size: .9rem; cursor: pointer; }
.cs-option.is-active { background: var(--info-soft); }
.cs-option.is-selected { color: var(--blue); font-weight: 600; }
.cs-option.is-placeholder { color: var(--ink-soft); }
.cs-option.has-detail { padding: 10px 12px; }
.cs-option .cs-title { display: block; font-weight: 700; color: var(--blue-deep); }
.cs-option .cs-line { display: block; margin-top: 2px; font-size: .82rem; font-weight: 400; color: var(--ink); line-height: 1.35; }
.cs-option .cs-key { color: var(--ink-soft); font-weight: 600; }
.cs-option.is-disabled { opacity: .45; cursor: not-allowed; }
.cs-group { padding: 8px 12px 4px; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.cs-empty { padding: 12px; text-align: center; font-size: .86rem; color: var(--ink-soft); }

/* ---------- Form gönderim durumu (js/components/form-loading.js) ---------- */
.spinner { display: inline-block; width: 1em; height: 1em; flex: none; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -.15em; animation: spin .7s linear infinite; }
.is-loading .spinner + span { margin-left: .55em; }
.btn.is-loading, .icon-btn.is-loading, button.is-loading:disabled { opacity: .9; cursor: progress; }
.is-searching .spinner { border-style: dotted; animation-duration: 1.1s; } /* arama: noktalı, daha yavaş halka */
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Canlı liste (js/components/live-list.js): güncellenirken bölgeler soluklaşır, halka döner ---------- */
[data-live-region] { position: relative; }
[data-live-region].is-updating { pointer-events: none; }
[data-live-region].is-updating > * { opacity: .5; }
[data-live-region].is-updating::after { content: ''; position: absolute; top: 56px; left: 50%; width: 30px; height: 30px; margin-left: -15px; border: 3px solid var(--blue); border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }

.page-loading { position: fixed; inset: 0 0 auto 0; z-index: 2000; height: 3px; overflow: hidden; background: rgba(30, 90, 168, .14); }
.page-loading::before { content: ''; display: block; width: 40%; height: 100%; background: linear-gradient(90deg, var(--blue), var(--green)); animation: page-loading 1.1s ease-in-out infinite; }
@keyframes page-loading { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2s; }
  .page-loading::before { animation-duration: 2.4s; }
}

/* ---------- Firma özeti (Views/Shared/Panel/_FirmSummary.cshtml) ---------- */
.firm-summary { padding: 0; overflow: hidden; }
.firm-summary-head { display: flex; align-items: flex-start; gap: 14px; padding: 20px 20px 16px; border-bottom: 1px solid var(--line); }
.firm-summary-avatar { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--info-soft); color: var(--blue); }
.firm-summary-avatar .icon { width: 22px; height: 22px; }
.firm-summary-title { min-width: 0; }
.firm-summary h2 { margin: 0 0 3px; font-family: var(--font-body); font-size: .74rem; font-weight: 600; letter-spacing: .02em; color: var(--ink-soft); }
.firm-summary-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
.firm-summary-sector { display: inline-block; max-width: 100%; margin-top: 6px; padding: 3px 9px; border-radius: 8px; background: var(--bg); font-size: .74rem; font-weight: 600; line-height: 1.35; color: var(--ink-soft); }
.firm-summary-group { margin: 0; padding: 6px 20px; }
.firm-summary-group + .firm-summary-group { border-top: 1px solid var(--line); }
.firm-summary-row { display: grid; grid-template-columns: 32px minmax(0, 1fr); grid-template-areas: "icon label" "icon value"; column-gap: 12px; align-items: center; padding: 9px 0; }
.firm-summary-icon { grid-area: icon; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--bg); color: var(--blue); }
.firm-summary-icon .icon { width: 16px; height: 16px; }
.firm-summary-row dt { grid-area: label; font-size: .74rem; font-weight: 500; color: var(--ink-soft); line-height: 1.3; }
.firm-summary-row dd { grid-area: value; margin: 0; font-size: .9rem; font-weight: 600; color: var(--ink); line-height: 1.35; overflow-wrap: anywhere; }
.firm-summary-row dd a { color: var(--blue); }
.firm-summary-row dd a:hover { color: var(--blue-deep); text-decoration: underline; }
.firm-summary-row dd .badge { margin-top: 2px; }
.firm-summary-sub { display: block; font-size: .78rem; font-weight: 500; color: var(--ink-soft); }

/* Bildirim zili ve bildirim listesi */
.notif-bell { position: relative; }
.notif-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #C0392B; color: #fff; font-size: .68rem; font-weight: 700; line-height: 18px; text-align: center; }
.notif-card { padding: 8px; }
.notif-toolbar { display: flex; justify-content: flex-end; padding: 4px 8px 8px; }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-item + .notif-item { border-top: 1px solid var(--line); }
.notif-item.is-unread { background: color-mix(in srgb, var(--info-soft) 55%, transparent); }
.notif-link { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 12px; background: none; border: 0; text-align: left; cursor: pointer; color: var(--ink); font: inherit; border-radius: 10px; }
.notif-link:hover { background: var(--info-soft); }
.notif-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--info-soft); color: var(--blue-deep); }
.notif-icon .icon { width: 20px; height: 20px; }
.notif-icon-info { background: #EEF4FB; color: #2B5E99; }
.notif-icon-success { background: #E7F5EA; color: #2E7D3B; }
.notif-icon-warning { background: #FFF3DD; color: #A66A00; }
.notif-icon-muted { background: var(--bg); color: var(--ink-soft); }
.notif-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notif-type { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.notif-text { font-size: .95rem; }
.notif-item.is-unread .notif-text { font-weight: 600; }
.notif-meta { flex: none; display: flex; align-items: center; gap: 10px; }
.notif-chevron { flex: none; width: 18px; height: 18px; color: var(--ink-soft); }
.notif-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 16px; color: var(--ink-soft); }
.notif-empty .icon { width: 36px; height: 36px; }
@media (max-width: 700px) {
  .notif-link { flex-wrap: wrap; }
  .notif-meta { order: 3; width: 100%; padding-left: 54px; }
  .notif-chevron { display: none; }
}
