:root {
    /* Light Theme Colors */
    --bg-app: #f8fafc;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-header: rgba(255, 255, 255, 0.8);
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-on-primary: #ffffff;
    
    --border-color: #e2e8f0;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-soft: rgba(37, 99, 235, 0.1);
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --radius: 12px;
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --bg-app: #020617;
    --bg-sidebar: #0f172a;
    --bg-card: #1e293b;
    --bg-header: rgba(15, 23, 42, 0.8);
    
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    
    --border-color: #334155;
    --primary: #3b82f6;
    --primary-soft: rgba(59, 130, 246, 0.1);
    
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-app);
    color: var(--text-main);
    display: flex;
    height: 100vh;
    overflow: hidden;
    transition: background-color 0.3s, color 0.3s;
}

/* --- SIDEBAR --- */
.app-sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-brand {
    padding: 32px 24px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-brand span { color: var(--text-main); }

.sidebar-menu {
    flex: 1;
    padding: 0 12px;
    overflow-y: auto;
}

.menu-group {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 24px 16px 8px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-muted);
    border-radius: var(--radius);
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 2px;
}

.menu-item:hover, .menu-item.active {
    background: var(--primary-soft);
    color: var(--primary);
}

.menu-item .icon { font-size: 1.2rem; }

/* --- MAIN LAYOUT --- */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-header {
    height: 72px;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    flex-shrink: 0;
    position: sticky; /* Always visible */
    top: 0;
    z-index: 80;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.header-left h1,
.header-page-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
}

.header-page-title[hidden] {
    display: none !important;
}

.header-dashboard-welcome {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.header-dashboard-welcome[hidden] {
    display: none !important;
}

.header-welcome-greeting {
    flex-shrink: 0;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.3;
    white-space: nowrap;
}

.header-welcome-greeting strong {
    font-weight: 800;
}

.header-welcome-sep {
    flex-shrink: 0;
    color: var(--border-color);
    font-weight: 700;
    user-select: none;
}

.header-welcome-tagline-wrap {
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.header-welcome-tagline {
    display: block;
    min-width: 0;
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
    transition: opacity 0.55s ease, filter 0.55s ease, transform 0.55s ease;
}

.header-welcome-tagline-text {
    display: inline;
}

.header-welcome-tagline-cursor {
    display: inline-block;
    width: 2px;
    height: 0.92em;
    margin-left: 2px;
    vertical-align: -0.08em;
    border-radius: 1px;
    background: var(--primary);
    opacity: 0;
    transform: scaleY(0.85);
    transition: opacity 0.2s ease;
}

.header-welcome-tagline--typing .header-welcome-tagline-cursor {
    opacity: 0.65;
    animation: header-tagline-cursor-blink 1.05s step-end infinite;
}

.header-welcome-tagline--blur-out {
    opacity: 0;
    filter: blur(6px);
}

.header-welcome-tagline--blur-in {
    opacity: 0;
    filter: blur(6px);
}

.header-welcome-tagline--reveal-start {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(4px);
}

@keyframes header-tagline-cursor-blink {
    0%, 45% { opacity: 0.65; }
    50%, 100% { opacity: 0.12; }
}

@media (prefers-reduced-motion: reduce) {
    .header-welcome-tagline {
        transition: opacity 0.2s ease;
        filter: none !important;
        transform: none !important;
    }

    .header-welcome-tagline--blur-out,
    .header-welcome-tagline--blur-in,
    .header-welcome-tagline--reveal-start {
        filter: none !important;
        transform: none !important;
    }

    .header-welcome-tagline-cursor,
    .header-welcome-tagline--typing .header-welcome-tagline-cursor {
        display: none;
        animation: none;
    }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Theme Toggle */
.theme-toggle {
    background: var(--primary-soft);
    border: none;
    color: var(--primary);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-profile-wrap {
    position: relative;
    padding-left: 20px;
    border-left: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

button.user-profile-trigger {
    margin: 0;
    font: inherit;
    color: inherit;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 12px;
    padding: 6px 8px 6px 4px;
    transition: background 0.2s;
}

button.user-profile-trigger:hover {
    background: var(--primary-soft);
}

button.user-profile-trigger:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 200px;
    padding: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    z-index: 120;
}

.user-dropdown[hidden] {
    display: none !important;
}

.user-dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-main);
    font: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}

.user-dropdown-item:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.user-dropdown-icon {
    font-size: 1.1rem;
    line-height: 1;
}

/* Bildirimler sayfası üst şerit + okundu işareti */
.notifs-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.notifs-page-intro h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.notifs-page-intro p {
    color: var(--text-muted);
    margin: 0;
    max-width: 520px;
    line-height: 1.45;
}

.btn-mark-all-read {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--primary);
    background: var(--primary-soft);
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s, border-color 0.2s;
    white-space: nowrap;
}

[data-theme="dark"] .btn-mark-all-read {
    border-color: rgba(59, 130, 246, 0.35);
}

.btn-mark-all-read:hover {
    background: rgba(37, 99, 235, 0.16);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.btn-mark-all-read:active {
    transform: translateY(0);
}

.btn-mark-all-read-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--text-on-primary);
    font-size: 0.7rem;
    font-weight: 800;
}

/* Vitrin toast (snackbar) */
.sa-snackbar-host {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: min(420px, calc(100vw - 40px));
}

.sa-snackbar {
    pointer-events: auto;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-main);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    animation: saSnackbarIn 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.sa-snackbar.sa-snackbar-info {
    border-left: 4px solid var(--primary);
}

.sa-snackbar.sa-snackbar-success {
    border-left: 4px solid #10b981;
}

.sa-snackbar.sa-snackbar-warning {
    border-left: 4px solid #f59e0b;
}

.sa-snackbar.sa-snackbar-error {
    border-left: 4px solid #ef4444;
}

@keyframes saSnackbarIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 600px) {
    .sa-snackbar-host {
        right: 16px;
        left: 16px;
        bottom: 16px;
        max-width: none;
    }
    .notifs-page-header {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-mark-all-read {
        justify-content: center;
    }
}

.avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* --- CONTENT AREA --- */
.app-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

.content-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.welcome-msg { margin-bottom: 32px; }
.welcome-msg h2 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.welcome-msg p { color: var(--text-muted); }

/* --- FORM STANDARDI: tek satır alanlar + textarea + dosya --- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="datetime-local"],
select,
.form-control:not(textarea) {
    appearance: none;
    width: 100%;
    min-height: 48px;
    height: 48px;
    padding: 0 16px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    border-radius: 12px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: block;
    line-height: normal;

    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
}

textarea,
textarea.form-control {
    appearance: none;
    width: 100%;
    min-height: 120px;
    height: auto;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    line-height: 1.45;
    border-radius: 12px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    resize: vertical;
    display: block;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
}

input[type="file"],
input[type="file"].form-control {
    appearance: none;
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: 12px;
    outline: none;
    box-sizing: border-box;
    cursor: pointer;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 8px 14px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    cursor: pointer;
}

input[type="file"]:hover::file-selector-button {
    background: var(--primary);
    color: var(--text-on-primary);
}

/* Odak (tek tip) */
input:focus,
select:focus,
textarea:focus,
.tag-input-container:focus-within,
input[type="file"]:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* Disabled */
input:disabled,
textarea:disabled,
select:disabled,
.tag-input-container.disabled,
input[type="file"]:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed;
    background: var(--bg-app) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-muted) !important;
}

/* Opsiyonel: blok etiket + alan grupları */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-row {
    display: grid;
    gap: 16px;
}

.form-row--2 {
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 640px) {
    .form-row--2 {
        grid-template-columns: 1fr;
    }
}

.btn-primary--block {
    width: 100%;
}

.portal-belge-toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.portal-belge-toolbar-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    align-items: end;
}

.portal-belge-toolbar-upload-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.portal-belge-toolbar-upload-row .form-control[type="file"] {
    flex: 1 1 220px;
    min-width: 0;
}

.portal-belge-toolbar-upload-row .portal-card-toolbar-btn {
    flex-shrink: 0;
}

.customer-users-toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 720px;
    align-items: center;
}

.customer-users-toolbar .form-control {
    flex: 1;
    min-width: 220px;
}

.customer-users-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

/* Yenile + Kullanıcı Ekle: aynı font boyutu ve satır yüksekliği (chevron sonrası denge) */
.customer-users-actions .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 10px;
}

.customer-user-action-cell {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.customer-users-table th.customer-users-col-islem,
.customer-users-table td.customer-users-col-islem {
    text-align: center;
}

.customer-user-action-cell .btn-primary,
.customer-user-action-cell .btn-secondary {
    --customer-user-action-btn-width: 7.92rem;
    white-space: nowrap;
    flex: 0 0 var(--customer-user-action-btn-width);
    width: var(--customer-user-action-btn-width);
    min-width: var(--customer-user-action-btn-width);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    font-size: 0.82rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Yenile ile aynı ölçü; basılı (açık) iken hafif iç gölge — toggle hissi */
.btn-toolbar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary);
    color: var(--text-on-primary, #fff);
    padding: 12px 22px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
    min-height: 48px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s;
}

.btn-toolbar-toggle-chevron {
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

/* Kapalı: aşağı ok; açık: 180° — form altta / kapatma ipucu */
.btn-toolbar-toggle[aria-pressed="true"] .btn-toolbar-toggle-chevron,
.btn-toolbar-toggle.is-pressed .btn-toolbar-toggle-chevron {
    transform: rotate(180deg);
}

.btn-toolbar-toggle:hover {
    opacity: 0.94;
}

.btn-toolbar-toggle[aria-pressed="true"],
.btn-toolbar-toggle.is-pressed {
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.22);
    transform: scale(0.98);
}

[data-theme="dark"] .btn-toolbar-toggle[aria-pressed="true"],
[data-theme="dark"] .btn-toolbar-toggle.is-pressed {
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.45);
}

.invite-user-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 720px;
}

.invite-user-grid .form-control {
    min-width: 0;
}

.invite-user-grid__submit {
    justify-self: end;
    width: auto;
    min-width: 200px;
    max-width: 100%;
}

@media (min-width: 600px) {
    .invite-user-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: center;
    }

    .invite-user-grid__submit {
        justify-self: end;
    }
}

.odeme-bildirim-fields {
    display: grid;
    gap: 12px;
}

/* Tagbox - İç çerçeve ve farklı stil yasak */
.tag-input-container {
    appearance: none;
    width: 100%;
    height: auto;
    min-height: 48px;
    padding: 2px 12px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    border-radius: 12px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
}

.tags-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
}

.ui-tag {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tag-input-container input {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    height: 40px !important;
    box-shadow: none !important;
    min-width: 150px;
    flex: 1;
}

/* Limit Uyarısı */
.tag-input-container input.limit-reached::placeholder {
    color: #ef4444 !important;
    opacity: 1 !important;
}

/* Tema Değişkenleri Senkronu */
[data-theme="light"] {
    --border-color: #e2e8f0;
    --bg-card: #ffffff;
    --bg-app: #f8fafc;
}
[data-theme="dark"] {
    --border-color: #334155;
    --bg-card: #1e293b;
    --bg-app: #0f172a;
}

/* Grid Dashboard */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.card h4 { font-size: 0.9rem; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }
.card .value { font-size: 2rem; font-weight: 800; }

/* Table Style */
.table-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.table-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 16px 24px;
    background: var(--bg-app);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
}

.data-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

/* Son görevler — sütun filtreleri */
.son-gorevler-table .son-gorevler-filtre-row th {
    padding: 8px 12px 12px;
    vertical-align: top;
    background: var(--bg-app);
    border-bottom: 1px solid var(--border-color);
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
}

.son-gorev-filtre-input {
    width: 100%;
    min-width: 0;
    padding: 7px 10px;
    font-size: 0.82rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
}

@media (max-width: 900px) {
    .son-gorevler-table .son-gorevler-filtre-row {
        display: none;
    }

    .son-gorev-nav-action-btn--temizle {
        display: none;
    }
}

/* Son görevler — sayfalama */
.son-gorevler-pagination {
    padding: 14px 24px 18px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-app);
}

.son-gorevler-pagination-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.son-gorevler-pager-info {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.son-gorevler-pager-actions {
    display: flex;
    gap: 10px;
}

.son-gorev-pager-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
}

.son-gorev-pager-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.son-gorev-pager-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Local Setting & Required Styles */
.required-mark { color: var(--danger); margin-left: 4px; }
.local-toggle-wrap { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.local-toggle-wrap input { width: 16px; height: 16px; cursor: pointer; }

/* Global Save Area */
.settings-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    background: var(--bg-app);
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 12px var(--primary-soft); }

.btn-primary:disabled,
.btn-primary[disabled] {
    opacity: 0.48;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    pointer-events: none;
}

.btn-primary:disabled:hover,
.btn-primary[disabled]:hover {
    transform: none;
    box-shadow: none;
}

/* Kart başlığındaki Yenile, tablodaki Ödeme Bildir ve belge yükle — aynı minimum genişlik, hizalı görünüm */
.portal-card-toolbar-btn {
    min-width: 11rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Aboneliklerim: bekleyen ödemeler + belgeler — İşlem sütunu ve Belge yükle / İndir aynı genişlikte, üst üste hizalı */
#settings-list-view {
    --portal-islem-col: 8.25rem;
}

/* Yenile / Ödeme Bildir / Belge yükle / İndir — kompakt ve aynı ölçü */
#settings-list-view .portal-card-toolbar-btn {
    min-width: var(--portal-islem-col);
    width: var(--portal-islem-col);
    padding: 6px 8px;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.25;
    min-height: 32px;
    border-radius: 8px;
}

#settings-list-view .beklenen-odemeler-table,
#settings-list-view .portal-belgeler-table {
    table-layout: fixed;
}

/*
 * Bekleyen ödemeler: Dönem/Durum ~yarı genişlik, Kalan ~%25 dar, fazla alan Ürün’e (sabit px).
 * Referans ~160px sütunlar için: Dönem/Durum 80px, Kalan 120px; Son Bildirim tarih için 158px.
 */
#settings-list-view .beklenen-odemeler-table .col-urun {
    width: auto;
    min-width: 160px;
}

#settings-list-view .beklenen-odemeler-table .col-donem,
#settings-list-view .beklenen-odemeler-table .col-durum {
    width: 120px;
    max-width: 120px;
}

#settings-list-view .beklenen-odemeler-table .col-kalan {
    width: 120px;
    max-width: 120px;
}

#settings-list-view .beklenen-odemeler-table .col-son-bildirim {
    width: 210px;
    max-width: 210px;
}

#settings-list-view .beklenen-odemeler-table .col-donem,
#settings-list-view .beklenen-odemeler-table .col-durum,
#settings-list-view .beklenen-odemeler-table .col-kalan {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#settings-list-view .beklenen-odemeler-table th.col-islem,
#settings-list-view .beklenen-odemeler-table td.col-islem,
#settings-list-view .portal-belgeler-table th.col-islem,
#settings-list-view .portal-belgeler-table td.col-islem {
    width: var(--portal-islem-col);
    min-width: var(--portal-islem-col);
    max-width: var(--portal-islem-col);
    box-sizing: border-box;
    /* Üstteki Belge yükle ile aynı genişlik ve sağ hiza; önceki sütunun padding-right boslugu yeter */
    padding-top: 16px;
    padding-bottom: 16px;
    padding-left: 0;
    padding-right: 0;
}

#settings-list-view .beklenen-odemeler-table th.col-islem,
#settings-list-view .portal-belgeler-table th.col-islem {
    text-align: center;
}

#settings-list-view .beklenen-odemeler-table td.col-islem,
#settings-list-view .portal-belgeler-table td.col-islem {
    text-align: right;
    vertical-align: middle;
}

#settings-list-view .beklenen-odemeler-table td.col-islem .portal-card-toolbar-btn,
#settings-list-view .portal-belgeler-table td.col-islem .portal-card-toolbar-btn {
    width: 100%;
    min-width: 0;
}

#settings-list-view .portal-belge-toolbar-upload-row .portal-card-toolbar-btn {
    flex-shrink: 0;
}

/* Logout Button */
.logout-area {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.panel-version {
    position: fixed;
    right: 12px;
    bottom: 8px;
    z-index: 20;
    margin: 0;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    opacity: 0.55;
    user-select: none;
    pointer-events: none;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover { background: #ef4444; color: white; }

/* --- DRILL-DOWN & HIERARCHY --- */
.view-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.btn-back {
    background: var(--primary-soft);
    border: none;
    color: var(--primary);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.btn-back:hover { background: var(--primary); color: white; }

.hierarchy-titles { display: flex; flex-direction: column; }
.hierarchy-sub { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
.hierarchy-main { font-size: 1.25rem; font-weight: 800; }

/* Iconic Agent Grid — yuvarlak ikon strip + ortak hover detay */
.iconic-agent-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.iconic-agent-toolbar__hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
    max-width: 36rem;
    line-height: 1.45;
}

.iconic-agent-toolbar__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.iconic-agent-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 20px;
    align-items: flex-start;
    padding: 10px 4px 6px;
}

.agent-icon-card {
    appearance: none;
    background: transparent;
    border: none;
    padding: 0 0 8px;
    margin: 0;
    width: 92px;
    text-align: center;
    cursor: pointer;
    position: relative;
    border-radius: 0;
    box-shadow: none;
    transition: transform 0.18s ease;
}

.agent-icon-card:hover {
    transform: translateY(-2px);
    border-color: transparent;
    box-shadow: none;
}

.agent-icon-card::after {
    content: '';
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 0;
    height: 1.5px;
    background: transparent;
    border-radius: 2px;
    transition: background 0.18s ease, transform 0.18s ease;
    transform: scaleX(0.55);
}

.agent-icon-card:hover::after,
.agent-icon-card.is-previewed::after {
    background: var(--primary);
    transform: scaleX(1);
}

.agent-icon-card.is-previewed .agent-circle {
    box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 3.5px color-mix(in srgb, var(--primary) 55%, transparent);
}

.agent-icon-card .agent-circle {
    width: 84px;
    height: 84px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    border: 1px solid color-mix(in srgb, var(--border-color) 80%, transparent);
    transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.agent-icon-card .agent-circle__status {
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
    box-sizing: border-box;
}

.agent-circle__status--aktif { background: #22c55e; }
.agent-circle__status--duraklatildi { background: #f59e0b; }
.agent-circle__status--pasif { background: #94a3b8; }

.agent-icon-add {
    appearance: none;
    background: transparent;
    border: none;
    padding: 0 0 8px;
    margin: 0;
    width: 92px;
    min-width: 92px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: min-width 0.22s ease, width 0.22s ease;
}

.agent-icon-add .agent-circle {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--primary);
    border: 1.5px dashed color-mix(in srgb, var(--primary) 55%, var(--border-color));
    font-size: 2rem;
    font-weight: 500;
    line-height: 1;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.agent-icon-add__label {
    display: block;
    margin-top: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.18s ease, max-height 0.18s ease;
}

.agent-icon-add:hover .agent-circle,
.agent-icon-add:focus-visible .agent-circle {
    background: var(--primary-soft);
    border-style: solid;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 3.5px color-mix(in srgb, var(--primary) 40%, transparent);
}

.agent-icon-add:hover .agent-icon-add__label,
.agent-icon-add:focus-visible .agent-icon-add__label {
    opacity: 1;
    max-height: 2rem;
}

.agent-icon-add:disabled,
.agent-icon-add.is-disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.agent-icon-add:disabled:hover .agent-circle,
.agent-icon-add.is-disabled:hover .agent-circle {
    background: transparent;
    border-style: dashed;
    border-color: color-mix(in srgb, var(--primary) 55%, var(--border-color));
    box-shadow: none;
}

.agent-icon-add:disabled:hover .agent-icon-add__label,
.agent-icon-add.is-disabled:hover .agent-icon-add__label {
    opacity: 0;
    max-height: 0;
}

.iconic-agent-preview {
    margin-top: 18px;
    padding: 18px 20px;
    border: 1px solid var(--border-color);
    border-radius: calc(var(--radius) + 4px);
    background: color-mix(in srgb, var(--bg-card) 88%, var(--bg-app));
    min-height: 132px;
}

.iconic-agent-preview__empty {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 18px 4px;
    text-align: center;
}

.iconic-agent-preview__head {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.iconic-agent-preview__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.iconic-agent-preview__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.iconic-agent-preview__titles {
    flex: 1;
    min-width: 0;
}

.iconic-agent-preview__name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.25;
}

.iconic-agent-preview__role {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.iconic-agent-preview__badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.iconic-agent-preview__badge--aktif { background: #dcfce7; color: #166534; }
.iconic-agent-preview__badge--duraklatildi { background: #fef3c7; color: #92400e; }
.iconic-agent-preview__badge--pasif { background: #f3f4f6; color: #6b7280; }

[data-theme="dark"] .iconic-agent-preview__badge--aktif { background: rgba(34, 197, 94, 0.18); color: #86efac; }
[data-theme="dark"] .iconic-agent-preview__badge--duraklatildi { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
[data-theme="dark"] .iconic-agent-preview__badge--pasif { background: rgba(148, 163, 184, 0.18); color: #cbd5e1; }

.iconic-agent-preview__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
    margin: 0;
}

.iconic-agent-preview__meta-row {
    margin: 0;
}

.iconic-agent-preview__meta-row--block {
    grid-column: 1 / -1;
}

.iconic-agent-preview__meta dt {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.iconic-agent-preview__meta dd {
    margin: 0;
    font-size: 0.92rem;
    color: var(--text-main);
    line-height: 1.45;
    word-break: break-word;
}

.iconic-agent-preview__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.iconic-agent-preview__actions:empty {
    display: none;
}

@media (max-width: 640px) {
    .iconic-agent-preview__meta {
        grid-template-columns: 1fr;
    }
}

/* Eski kart içi etiket/aksiyon stilleri (detay paneli butonlari icin korunur) */
.agent-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
    margin-top: 0;
    width: auto;
}

.btn-agent-card-action {
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color, #e2e8f0);
    background: var(--bg-card, #fff);
    color: var(--text-main, #0f172a);
    cursor: pointer;
    line-height: 1.2;
}

.btn-agent-card-action:hover {
    border-color: var(--primary, #2563eb);
    background: var(--primary-soft, rgba(37, 99, 235, 0.06));
}

.btn-agent-card-action--primary {
    background: var(--primary, #2563eb);
    border-color: var(--primary, #2563eb);
    color: #fff;
}

.btn-agent-card-action--primary:hover {
    filter: brightness(1.05);
}

.agent-operasyonel-panel .agent-etkin-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.agent-etkin-badge--aktif { background: #dcfce7; color: #166534; }
.agent-etkin-badge--duraklatildi { background: #fef3c7; color: #92400e; }
.agent-etkin-badge--pasif { background: #f3f4f6; color: #6b7280; }

.agent-operasyonel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px 20px;
}

.agent-operasyonel-section-title {
    margin: 0 0 6px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

.agent-operasyonel-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 12px;
    line-height: 1.45;
}

.agent-machine-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.agent-machine-select {
    flex: 1;
    min-width: 200px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-app);
    color: var(--text-main);
}

.agent-operasyonel-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 16px 0;
}

.agent-operasyonel-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 20px;
    margin-bottom: 10px;
}

.agent-operasyonel-field {
    min-width: 0;
}

.agent-operasyonel-periyot-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 2px;
}

.agent-periyot-input {
    width: 88px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-app);
    color: var(--text-main);
}

.agent-operasyonel-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-bottom: 10px;
}

.agent-operasyonel-status-line {
    margin: 8px 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    min-height: 1.2em;
}

.agent-operasyonel-panel .agent-etkin-badge {
    align-self: center;
    margin-bottom: 2px;
}

.agent-durum-gecmisi-panel {
    margin-top: 14px;
}

.agent-durum-gecmisi-panel summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
}

.agent-durum-gecmisi-panel .table-wrapper {
    margin-top: 10px;
}

.agent-operasyonel-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 2px;
}

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

.agent-operasyonel-uyari {
    margin: 0 0 12px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
    font-size: 0.85rem;
}

.agent-operasyonel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.agent-durum-gecmisi-panel .data-table {
    font-size: 0.82rem;
}

/* Agent Detail Header */
.agent-info-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.agent-large-icon {
    width: 64px;
    height: 64px;
    background: var(--primary);
    color: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.agent-meta h3 { font-size: 1.5rem; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.agent-meta p { color: var(--text-muted); font-size: 0.9rem; font-weight: 600; }

/* Tab Container refinement for drill-down */
.drill-view { display: none; }
.drill-view.active { display: block; animation: slideIn 0.3s ease; }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* --- RESPONSIVE FIXES --- */
@media (max-width: 1024px) {
    body {
        height: auto;
        overflow-y: auto;
        display: block;
    }

    .app-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 200;
        background: var(--bg-sidebar);
    }

    .app-sidebar.open {
        transform: translateX(0);
        box-shadow: 20px 0 50px rgba(0,0,0,0.3);
    }

    .app-main {
        width: 100% !important;
        margin-left: 0 !important;
        min-height: 100vh;
    }

    .app-header {
        position: sticky;
        top: 0;
        z-index: 150;
        padding: 0 16px;
        background: var(--bg-card);
        height: 64px;
        display: flex;
    }

    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: var(--primary-soft);
        color: var(--primary);
        border: none;
        width: 38px;
        height: 38px;
        border-radius: 10px;
        font-size: 1.1rem;
        cursor: pointer;
        margin-right: 8px;
    }

    .app-content {
        padding: 24px 16px;
    }

    /* Table to Card Stack on Mobile */
    .data-table thead { display: none; }
    .data-table, .data-table tbody, .data-table tr, .data-table td {
        display: block;
        width: 100%;
    }
    .data-table tr {
        margin-bottom: 16px;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: var(--radius);
        padding: 8px;
        position: relative; /* For absolute checkbox positioning */
    }
    .data-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 12px 16px;
        border-bottom: 1px solid var(--border-color);
    }
    .data-table td:last-child { border-bottom: none; }

    /* İşlem sütunu: masaüstü sabit genişliği kart yığınında kaldır */
    #settings-list-view .beklenen-odemeler-table td.col-islem,
    #settings-list-view .portal-belgeler-table td.col-islem {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }
    #settings-list-view .beklenen-odemeler-table td.col-islem .portal-card-toolbar-btn,
    #settings-list-view .portal-belgeler-table td.col-islem .portal-card-toolbar-btn {
        width: auto;
        min-width: min(100%, var(--portal-islem-col, 8.25rem));
        max-width: 100%;
    }
    
    /* Header Row (Ayar Adı -> Name) */
    .data-table td[data-label="Ayar Adı"]::before { display: none; }
    .data-table td[data-label="Ayar Adı"] {
        text-align: left;
        display: block;
        font-size: 1.1rem;
        font-weight: 800;
        padding-top: 16px;
        border-bottom: 1px solid var(--border-color);
    }

    /* Hide Value label and expand input */
    .data-table td[data-label="Değer"]::before { display: none; }
    .data-table td[data-label="Değer"] {
        padding: 8px 16px 16px;
        display: block;
    }
    
    /* Fixed Value labeling for other fields if any */
    .data-table td::before {
        content: attr(data-label);
        font-weight: 700;
        text-align: left;
        color: var(--text-muted);
        font-size: 0.75rem;
        text-transform: uppercase;
    }

    /* Header Compactness */
    .header-right {
        gap: 12px;
    }
    .user-profile-wrap {
        padding-left: 12px;
    }
    .user-profile {
        gap: 8px;
    }
    .user-info {
        display: none; /* Hide name/role on mobile to save space */
    }
    .avatar {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    .theme-toggle {
        width: 36px;
        height: 36px;
    }

    /* Local Checkbox to the Top Right */
    .data-table td[data-label="Lokal"] {
        position: absolute;
        top: 20px;
        right: 16px;
        border: none;
        width: auto;
        padding: 0;
    }
    .data-table td[data-label="Lokal"]::before { display: none; }
    .local-toggle-wrap { color: var(--primary); }

    /* Kullanıcılarım: mobil kart düzeni */
    #customer-users .customer-users-table tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    #customer-users .customer-users-table td::before {
        display: none !important;
    }

    #customer-users .customer-users-table td[data-label="Ad Soyad"] {
        grid-column: 1 / -1;
        display: block;
        text-align: left;
        font-size: 1.05rem;
        font-weight: 800;
        padding: 14px 16px 10px;
        border-bottom: 1px solid var(--border-color);
    }

    #customer-users .customer-users-table td[data-label="E-Posta"] {
        grid-column: 1 / -1;
        display: block;
        text-align: left;
        font-size: 0.9rem;
        color: var(--text-muted);
        padding: 10px 16px;
        border-bottom: 1px solid var(--border-color);
        word-break: break-word;
    }

    #customer-users .customer-users-table td[data-label="Yönetici"] {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
        padding: 10px 16px;
        border-bottom: 1px solid var(--border-color);
    }

    #customer-users .customer-users-table td[data-label="İşlem"] {
        grid-column: 1 / -1;
        display: flex;
        justify-content: flex-end;
        padding: 12px 16px 14px;
        border-bottom: none;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #customer-users .customer-users-table td[data-label="İşlem"] .customer-user-action-cell {
        justify-content: flex-end;
        min-width: min-content;
    }
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 90;
    animation: fadeIn 0.2s ease;
}

.sidebar-overlay.active {
    display: block;
}

/* --- CHART CONTROLS --- */
.segmented-control {
    display: flex;
    background: var(--bg-app);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.segment-btn {
    padding: 8px 16px;
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.segment-btn.active {
    background: var(--bg-card);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* chart-sub-select: genel select kuralları ile aynı görünüm (ek sıkı stil yok) */

@media (max-width: 600px) {
    .chart-header { flex-direction: column; align-items: flex-start !important; }
    .chart-filters { width: 100%; flex-direction: column; align-items: stretch !important; }
}

/* --- NOTIFICATIONS --- */
.badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 10px;
    height: 10px;
    background: var(--danger);
    border: 2px solid var(--bg-card);
    border-radius: 50%;
}

.badge-count {
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 20px;
    margin-left: auto;
    font-weight: 800;
}

.notif-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: all 0.2s;
    cursor: pointer;
}
.notif-item:hover { transform: translateX(4px); border-color: var(--primary); }
.notif-item.unread { border-left: 4px solid var(--primary); background: var(--primary-soft); }

.notif-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.notif-content { flex: 1; }
.notif-content h4 { font-size: 1rem; margin-bottom: 4px; font-weight: 700; }
.notif-content p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 8px; line-height: 1.4; }
.notif-time { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }

.ni-info { background: rgba(37, 99, 235, 0.1); color: #2563eb; }
.ni-success { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.ni-warning { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.ni-error { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

/* --- SELECTION CARDS --- */
.selection-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
    padding: 40px 32px;
}

.selection-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-soft);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.selection-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 24px;
}

.premium-border {
    border: 2px solid var(--primary-soft);
    background: linear-gradient(180deg, var(--bg-card), var(--primary-soft) 300%);
    position: relative;
}

.card-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
}

/* --- NOTIF SETTINGS GRID --- */
.notif-settings-grid {
    display: grid;
    grid-template-columns: 200px repeat(2, 1fr) auto;
    gap: 16px;
    align-items: flex-end; /* Labels flow above, inputs align at bottom */
    background: var(--bg-card);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.notif-settings-grid .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Agent ayar tablosu — tablo içi input (genel form yüksekliği ile uyumlu) */
.notif-settings-grid .setting-value-input {
    min-height: 48px !important;
    height: 48px !important;
    box-sizing: border-box;
    padding: 0 16px !important;
    font-size: 0.95rem;
    font-weight: 700;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-card);
    color: var(--text-main);
    outline: none;
    transition: all 0.2s ease;
}

/* Button style separated but height-matched */
.btn-align-input {
    height: 48px !important;
    padding: 0 20px;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-settings-grid .setting-value-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

/* Hide/Show logic based on parent class */
.notif-settings-grid .tg-field {
    display: none;
}
.notif-settings-grid.show-telegram .tg-field {
    display: flex;
}

@media (max-width: 1200px) {
    .notif-settings-grid { grid-template-columns: 1fr 1fr; }
    .notif-settings-grid.show-telegram .tg-field { display: flex; }
}

@media (max-width: 768px) {
    .notif-settings-grid { grid-template-columns: 1fr; }
}

/* --- CUSTOM DIALOG --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: none; /* JS toggles display: flex */
    align-items: center;
    justify-content: center;
    /* #sa-auth-gate z-index: 200000 — modallar giris katmaninin ustunde olmali */
    z-index: 200001;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    display: flex;
}

.modal-card {
    background: var(--bg-card);
    width: 90%;
    max-width: 400px;
    padding: 32px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--border-color);
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.modal-card h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-main);
}

.modal-card p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
    white-space: pre-wrap;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* --- Agent ayar @editor yapilandirilmis editor --- */
.agent-ayar-editor-modal {
    max-width: 860px;
    width: 94%;
    max-height: 90vh;
    overflow: auto;
}

.agent-ayar-editor-body {
    margin-bottom: 16px;
}

.agent-ayar-editor-hata {
    color: var(--danger, #c62828);
    font-size: 0.9rem;
    margin: 0 0 12px;
}

.ayar-deger-wrap .ayar-editor-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    flex: 1;
    width: 100%;
    min-width: 0;
}

.ayar-deger-wrap:has(.ayar-editor-field) {
    align-items: flex-start;
}

.ayar-deger-wrap .ayar-editor-open-btn {
    margin-top: 4px;
}

.ayar-editor-preview {
    width: 100%;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.ayar-editor-preview-list {
    margin: 0;
    padding-left: 1.1rem;
}

.ayar-editor-preview-text--hata {
    color: var(--danger, #c62828);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.ayar-editor-kural-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 16px;
}

.ayar-editor-kural-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    margin: 0;
}

.ayar-editor-kural-card legend {
    font-weight: 700;
    padding: 0 6px;
}

.ayar-editor-kural-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ayar-editor-field-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.ayar-editor-field-label--wide {
    grid-column: 1 / -1;
}

@media (max-width: 640px) {
    .ayar-editor-kural-grid {
        grid-template-columns: 1fr;
    }
}

.ayar-editor-json-yardim {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 10px;
}

.ayar-editor-json-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

.ayar-editor-json-textarea {
    font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.82rem;
    line-height: 1.45;
    min-height: 280px;
    resize: vertical;
    white-space: pre;
    word-break: normal;
}

.modal-actions button {
    padding: 12px 24px;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

/* --- SUPPORT & FEEDBACK --- */
.support-tabs-card {
    margin-bottom: 0;
}

.support-taleplerim-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    align-items: stretch;
    min-height: 420px;
}

.support-conversation-panel {
    display: flex;
    flex-direction: column;
    min-height: 420px;
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-card);
}

.support-conversation-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px 24px;
    color: var(--text-muted);
}

.support-conversation-placeholder__icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.85;
}

.support-conversation-placeholder__title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
    margin: 0 0 8px;
}

.support-conversation-placeholder__desc {
    font-size: 0.88rem;
    line-height: 1.5;
    margin: 0;
    max-width: 320px;
}

.support-conversation-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.support-conversation-title {
    margin: 0 0 8px;
    font-size: 1rem;
}

.support-conversation-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0 0 16px;
}

.support-mesaj-akisi {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-height: 200px;
    max-height: min(52vh, 480px);
    overflow-y: auto;
    margin-bottom: 16px;
}

.support-yanit-wrap {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.support-list-panel {
    display: flex;
    flex-direction: column;
    min-height: 420px;
    max-height: min(68vh, 620px);
}

.support-list-panel__title {
    margin: 0 0 16px;
    font-size: 1rem;
}

.support-list-empty {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.support-talepleri-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.support-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 400px);
    gap: clamp(28px, 5vw, 56px);
    align-items: start;
    padding: 8px 0 16px;
}

.support-form-panel {
    max-width: 640px;
    width: 100%;
}

.support-form-wrap__title {
    margin: 0 0 24px;
}

.support-form-aside {
    padding-top: 4px;
}

.support-form-aside__lead {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0 0 28px;
    max-width: 36ch;
}

.support-form-aside__lead strong {
    color: var(--text-main);
    font-weight: 600;
}

.support-form-aside__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.support-form-aside__item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.support-form-aside__icon {
    flex-shrink: 0;
    width: 1.75rem;
    font-size: 1.05rem;
    line-height: 1.45;
    text-align: center;
    opacity: 0.92;
}

.support-form-aside__text {
    font-size: 0.86rem;
    line-height: 1.58;
    color: var(--text-muted);
}

.support-form-aside__text strong {
    display: block;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 5px;
    letter-spacing: 0.01em;
}

.support-feedback-intro {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0 0 24px;
}

.support-form-panel .form-label {
    margin-bottom: 0;
}

/* Geri bildirim yıldızları sol hizada kalsın */
.support-form-panel .star-rating-simple {
    justify-content: flex-start;
}

.support-emergency-card {
    max-width: 100%;
}

.support-email-link {
    display: inline-block;
    margin-top: 16px;
    font-size: 0.9rem;
    font-weight: 700;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.support-email-link:hover {
    text-decoration: underline;
}

.mini-ticket-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-app);
    margin-bottom: 0;
    cursor: pointer;
    color: var(--text-main);
    font-family: inherit;
    font-size: inherit;
    line-height: 1.4;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.mini-ticket-item:hover {
    border-color: color-mix(in srgb, var(--primary) 28%, var(--border-color));
    background: color-mix(in srgb, var(--bg-app) 65%, var(--bg-card));
}

.mini-ticket-item:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.mini-ticket-item__title {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.45;
    word-break: break-word;
}

.mini-ticket-item__status {
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 6px;
}

.mini-ticket-item__status--acik {
    color: var(--primary);
}

.mini-ticket-item__status--islemde {
    color: #d97706;
}

.mini-ticket-item__status--kapali {
    color: var(--text-muted);
}

.mini-ticket-item--selected {
    border-color: var(--primary) !important;
    background: var(--primary-soft) !important;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 22%, transparent);
}

[data-theme="dark"] .support-list-panel.card {
    background: var(--bg-card);
}

[data-theme="dark"] .mini-ticket-item {
    background: color-mix(in srgb, var(--bg-app) 88%, #000);
    border-color: color-mix(in srgb, var(--border-color) 85%, #64748b);
}

[data-theme="dark"] .mini-ticket-item:hover {
    background: color-mix(in srgb, var(--bg-card) 55%, var(--bg-app));
    border-color: color-mix(in srgb, var(--primary) 40%, var(--border-color));
}

[data-theme="dark"] .mini-ticket-item__status--acik {
    color: #60a5fa;
}

[data-theme="dark"] .mini-ticket-item__status--islemde {
    color: #fbbf24;
}

[data-theme="dark"] .mini-ticket-item__status--kapali {
    color: #cbd5e1;
}

[data-theme="dark"] .mini-ticket-item--selected {
    background: color-mix(in srgb, var(--primary) 14%, var(--bg-app)) !important;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 35%, transparent);
}

.star-rating-simple {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.star-rating-simple span {
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.star-rating-simple span:hover,
.star-rating-simple span.hovered,
.star-rating-simple span.selected {
    color: #f59e0b;
    transform: scale(1.2);
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

@media (max-width: 992px) {
    .support-taleplerim-grid {
        grid-template-columns: 1fr;
    }

    .support-list-panel {
        max-height: none;
        min-height: auto;
    }

    .support-conversation-panel {
        min-height: 320px;
    }

    .support-form-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .support-form-panel {
        max-width: none;
    }

    .support-form-aside__lead {
        max-width: none;
    }
}

.modal-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-main);
    padding: 12px 24px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    background: var(--bg-app);
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-secondary:disabled,
.btn-secondary[disabled] {
    opacity: 0.48;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    pointer-events: none;
}

.btn-secondary:disabled:hover,
.btn-secondary[disabled]:hover {
    transform: none;
    box-shadow: none;
}

[data-theme="dark"] .btn-secondary:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}

.pc-check-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.pc-kurulum-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.pc-check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

/* --- COMPONENT RESPONSIVENESS IMPROVEMENTS --- */

/* Subscription Detail Summary Grid */
.sub-detail-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 32px; 
    margin-bottom: 30px;
}

.detail-label {
    display: block; 
    font-size: 0.7rem; 
    color: var(--text-muted); 
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.detail-value {
    font-weight: 700; 
    font-size: 1.15rem;
    color: var(--text-main);
}

/* Notification Channels Layout */
.sub-settings-notif {
    border-top: 1px solid var(--border-color);
    margin-top: 24px;
    padding: 24px 0;
}

.sub-settings-notif__title {
    margin: 0 0 24px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.notif-channels-wrapper {
    display: flex; 
    flex-direction: column; 
    gap: 20px;
}

.notif-channel-row {
    display: flex; 
    align-items: center; 
    gap: 24px;
}

.channel-label {
    min-width: 180px; 
    padding-top: 0;
    flex-shrink: 0;
}

.channel-label label {
    display: flex; 
    align-items: center; 
    gap: 12px; 
    cursor: pointer;
}

.channel-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
}

.wpf-data-grid input[type="checkbox"]:disabled {
    opacity: 1;
    accent-color: var(--primary);
}

.channel-title {
    font-weight: 700;
    font-size: 1rem;
}

.channel-content {
    flex: 1;
    min-width: 0;
}

/* Bildirim alanlari: mail, bot token, chat id — ayni yukseklik */
.notif-channels-wrapper .notif-field-input,
.notif-channels-wrapper #tg-bot-token.notif-field-input {
    min-height: 48px;
    box-sizing: border-box;
}

.notif-channels-wrapper #tg-bot-token.notif-field-input {
    height: 48px;
    width: auto;
    margin: 0;
}

.notif-channels-wrapper .tag-input-container.notif-field-input {
    min-height: 48px;
    padding: 4px 12px;
    align-items: center;
}

.notif-channels-wrapper .tag-input-container.notif-field-input input {
    height: 38px !important;
    min-height: 38px;
}

.tg-input-group {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.tg-input-group #tg-bot-token {
    flex: 0 1 280px;
    min-width: 180px;
}

.tg-input-group .tag-input-container {
    flex: 1;
    min-width: 0;
}

.sub-settings-save-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    margin-top: 0;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.sub-settings-save-status {
    flex: 1;
    min-width: 200px;
    font-size: 0.88rem;
    color: var(--text-muted);
    text-align: right;
}

.save-actions {
    display: flex; 
    justify-content: flex-end; 
    margin-top: 0;
}

/* Responsive Mobile Adjustments */
@media (max-width: 768px) {
    .sub-detail-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .notif-channel-row {
        flex-direction: column;
        gap: 12px;
        background: var(--bg-app);
        padding: 16px;
        border-radius: 12px;
        border: 1px solid var(--border-color);
    }

    .channel-label {
        min-width: 100%;
        padding-top: 0;
    }

    .channel-content {
        width: 100%;
    }

    .tg-input-group {
        flex-direction: column;
        gap: 12px;
    }

    .tg-input-group #tg-bot-token {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
    }

    .sub-settings-save-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .sub-settings-save-status {
        text-align: left;
    }

    .save-actions {
        margin-top: 0;
    }

    .save-actions .btn-primary {
        width: 100%;
    }

    .tab-body {
        padding: 20px 16px !important;
    }
}

@media (max-width: 480px) {
    .welcome-msg h2 {
        font-size: 1.5rem;
    }
    
    .detail-value {
        font-size: 1rem;
    }

    .app-header h1 {
        font-size: 1rem;
    }
}

/* Vitrin ürün kartları (yeni abonelik) */
.vitrin-urun-card {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    text-align: left;
}

.vitrin-urun-card:hover {
    border-color: var(--border-color);
}

.vitrin-urun-card.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent);
}

.vitrin-urun-thumb {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--bg-app);
    margin-bottom: 12px;
}

.vitrin-urun-thumb.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--text-muted);
}

/* Aboneliklerim başlık özeti */
.subs-dates-summary {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 8px;
}

.subs-section-nav-bar {
    margin-top: 20px;
}

.subs-pane-card {
    padding: 20px;
}

.subs-pane-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.subs-pane-card__title {
    margin: 0;
    font-size: 1rem;
}

.subs-pane-card__desc {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.subs-pane-card__table-wrap {
    overflow-x: auto;
    margin-top: 14px;
}

/* Vitrin tür filtreleri */
.vitrin-tur-filtre-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.vitrin-filtre-btn {
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.vitrin-filtre-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.vitrin-filtre-btn.active {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary);
}

.vitrin-urun-card-inner {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.vitrin-urun-col-thumb {
    flex: 0 0 96px;
}

.vitrin-urun-col-thumb .vitrin-urun-thumb {
    width: 96px;
    height: 96px;
    margin-bottom: 0;
}

.vitrin-tip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.vitrin-tip-chip {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.vitrin-tip-saas {
    border-color: rgba(37, 99, 235, 0.35);
    color: var(--primary);
}

.vitrin-tip-agent {
    border-color: rgba(16, 185, 129, 0.45);
    color: #059669;
}

[data-theme="dark"] .vitrin-tip-agent {
    color: #34d399;
}

.vitrin-paket-mini {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.vitrin-paket-mini li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 0;
    border-bottom: 1px dashed var(--border-color);
}

.vitrin-paket-mini li:last-child {
    border-bottom: none;
}

.vitrin-paket-ad {
    font-weight: 600;
    color: var(--text-main);
}

.vitrin-urun-expanded {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    display: none;
}

.vitrin-urun-card.selected .vitrin-urun-expanded {
    display: block;
}

.vitrin-detail-snippet {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    line-height: 1.45;
}

.btn-vitrin-detaylar {
    width: 100%;
    margin-top: 4px;
}

/* Ürün detay sayfası */
.urun-detay-card {
    padding: 24px;
}

.urun-detay-hero {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.urun-detay-thumb-wrap .vitrin-urun-thumb {
    width: 120px;
    height: 120px;
    margin-bottom: 0;
}

.urun-detay-kisa {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.urun-detay-tipler {
    margin-top: 10px;
}

.urun-detay-paketler {
    margin-top: 14px;
}

.urun-detay-body {
    font-size: 0.92rem;
    color: var(--text-main);
    line-height: 1.55;
    margin-bottom: 20px;
}

.urun-detay-ozellikler h4 {
    margin-bottom: 10px;
}

.urun-detay-ozellik-list {
    margin: 0;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.urun-detay-cta {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

/* Abonelik kartı (liste) */
.sub-selector-card {
    flex-direction: row !important;
    align-items: stretch;
}

.sub-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sub-card-dates {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

.sub-card-thumb-wrap {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-app);
    align-self: center;
}

.sub-card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sub-card-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--text-muted);
}

/* Ödeme modal */
.payment-modal-card {
    max-width: 440px;
    width: 100%;
}

.pay-muted {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 12px;
}

.pay-tutar-block {
    background: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 16px;
}

.pay-tutar-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.pay-tutar-icerik {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.45;
}

.pay-method-intro {
    margin-bottom: 14px;
}

.pay-method-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pay-method-primary {
    width: 100%;
    padding: 12px 14px;
    font-weight: 700;
}

.pay-method-secondary {
    width: 100%;
    padding: 12px 14px;
    font-weight: 600;
}

.btn-outline-muted {
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--radius);
    cursor: not-allowed;
    opacity: 0.65;
}

.pay-banka-panel {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.pay-banka-intro {
    margin-bottom: 10px;
}

.pay-iban-list {
    margin: 0 0 12px;
    padding-left: 18px;
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.5;
}

.pay-aktivasyon-notu {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--border-color);
}

.pay-modal-footer {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
}

.pay-footer-cancel {
    min-width: 120px;
    padding: 10px 18px;
    font-weight: 600;
}

@media (max-width: 520px) {
    .pay-method-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Dashboard KPI özeti (4 kart) --- */
.status-grid.dashboard-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 1024px) {
    .status-grid.dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.dashboard-kpi-card {
    display: flex;
    flex-direction: column;
    min-height: 148px;
    padding: 22px 24px;
}

.dashboard-kpi-card .card-icon {
    margin-bottom: 12px;
    flex-shrink: 0;
}

.dashboard-kpi-card__label {
    min-height: 2.75em;
    margin-bottom: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dashboard-kpi-card__metrics {
    margin-top: auto;
    padding-top: 12px;
}

.dashboard-kpi-card .value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
}

.dashboard-kpi-card .value.value--kpi-compact {
    font-size: 1.65rem;
    line-height: 1.2;
}

.dashboard-kpi-card .kpi-sub {
    margin: 6px 0 0;
    min-height: 1.2em;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    line-height: 1.2;
}

.dashboard-kpi-card .kpi-sub--placeholder {
    visibility: hidden;
    user-select: none;
}

.dashboard-kpi-card .kpi-sub--hint {
    font-weight: 500;
    color: var(--text-muted);
    opacity: 0.85;
}

.dashboard-kpi-card--action {
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dashboard-kpi-card--action:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary-soft);
}

/* Mobil: 2 sütun kompakt KPI (temel stillerden sonra — cascade) */
@media (max-width: 639px) {
    .status-grid.dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 20px;
    }

    .dashboard-kpi-card {
        display: grid;
        grid-template-columns: 36px minmax(0, 1fr);
        grid-template-rows: auto auto;
        align-content: start;
        align-items: start;
        min-height: 0;
        padding: 12px 10px;
        column-gap: 8px;
        row-gap: 2px;
    }

    .dashboard-kpi-card:hover {
        transform: none;
    }

    .dashboard-kpi-card .card-icon {
        grid-column: 1;
        grid-row: 1 / -1;
        width: 36px;
        height: 36px;
        font-size: 1.05rem;
        border-radius: 8px;
        margin-bottom: 0;
        align-self: start;
    }

    .dashboard-kpi-card__label {
        grid-column: 2;
        grid-row: 1;
        min-height: 0;
        font-size: 0.72rem;
        line-height: 1.25;
        -webkit-line-clamp: 3;
    }

    .dashboard-kpi-card__metrics {
        grid-column: 2;
        grid-row: 2;
        margin-top: 0;
        padding-top: 4px;
        min-width: 0;
    }

    .dashboard-kpi-card .value {
        font-size: 1.5rem;
        line-height: 1.15;
    }

    .dashboard-kpi-card .value.value--kpi-compact {
        font-size: 1.35rem;
    }

    .dashboard-kpi-card .kpi-sub {
        margin-top: 3px;
        min-height: 0;
        font-size: 0.68rem;
        line-height: 1.15;
    }
}

.dashboard-kuyruk-ozet {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-bottom: 14px;
    padding: 12px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    background: var(--bg-app);
    font-size: 0.86rem;
    color: var(--text-muted);
}

.dashboard-kuyruk-ozet__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-main);
}

.dashboard-kuyruk-ozet__item strong {
    font-weight: 800;
}

.dashboard-kuyruk-ozet__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dashboard-kuyruk-ozet__dot--bekleyen {
    background: #f59e0b;
}

.dashboard-kuyruk-ozet__dot--isleniyor {
    background: #2563eb;
}

.dashboard-kuyruk-ozet__hint {
    margin-left: auto;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
}

.dashboard-kuyruk-card {
    margin-top: 0;
}

@media (max-width: 768px) {
    .dashboard-kuyruk-ozet__hint {
        width: 100%;
        margin-left: 0;
    }
}

.dashboard-abonelik-uyari {
    margin-bottom: 20px;
    padding: 14px 18px;
    border-radius: var(--radius);
    border: 1px solid #fcd34d;
    background: #fffbeb;
    color: #92400e;
    font-size: 0.88rem;
    line-height: 1.45;
}

[data-theme="dark"] .dashboard-abonelik-uyari {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
    color: #fcd34d;
}

.dashboard-api-durum {
    margin-bottom: 20px;
    padding: 14px 18px;
    border-radius: var(--radius);
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
    font-size: 0.88rem;
    line-height: 1.45;
}

[data-theme="dark"] .dashboard-api-durum {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.dashboard-tasarruf-card {
    margin-bottom: 24px;
    padding: 28px 32px;
}

.dashboard-tasarruf-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.dashboard-section-title {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.dashboard-section-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin: 0;
}

.tasarruf-varsayilan-notu {
    font-size: 0.78rem;
    color: var(--text-muted);
    max-width: 280px;
    text-align: right;
    margin: 0;
}

@media (max-width: 768px) {
    .dashboard-tasarruf-card .dashboard-section-desc,
    .dashboard-tasarruf-header .tasarruf-varsayilan-notu {
        display: none;
    }
}

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

.tasarruf-stat {
    padding: 18px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    background: var(--bg-app);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tasarruf-stat-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.tasarruf-stat-value {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.tasarruf-stat-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.tasarruf-stat--kazanc .tasarruf-stat-value { color: #10b981; }
.tasarruf-stat--isgucu .tasarruf-stat-value { color: #2563eb; }

.dashboard-agent-tasarruf-card {
    margin-bottom: 24px;
}

.dashboard-agent-tasarruf-table td,
.dashboard-agent-tasarruf-table th {
    font-size: 0.88rem;
}

.dashboard-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px 20px;
}

.dashboard-toolbar__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    min-width: 0;
}

.dashboard-toolbar__meta-primary {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.dashboard-toolbar__title-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-align: left;
    min-width: 0;
    flex-shrink: 0;
}

.dashboard-toolbar__title-chevron {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.22s ease;
    transform: rotate(45deg);
}

.dashboard-toolbar__title-toggle.is-pressed .dashboard-toolbar__title-chevron,
.dashboard-toolbar__title-toggle[aria-expanded="true"] .dashboard-toolbar__title-chevron {
    transform: rotate(90deg);
}

@media (min-width: 901px) {
    .dashboard-toolbar__title-toggle {
        pointer-events: none;
        cursor: default;
    }

    .dashboard-toolbar__title-chevron {
        display: none;
    }
}

.dashboard-toolbar__meta-status {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 12px;
}

.dashboard-toolbar__title {
    flex-shrink: 0;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.3;
    white-space: nowrap;
}

.dashboard-toolbar__desc {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.35;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-toolbar__desc::before {
    content: '·';
    margin-right: 10px;
    color: var(--border-color);
    font-weight: 700;
}

.dashboard-toolbar__controls {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    width: 100%;
}

.dashboard-toolbar__controls .segmented-control {
    flex-shrink: 0;
}

.dashboard-toolbar__selects {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 118px;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.dashboard-toolbar__selects .form-control,
.dashboard-toolbar__selects select {
    width: 100%;
    min-width: 0;
    max-width: none;
    display: block;
}

.dashboard-toolbar__select--refresh {
    width: 100%;
}

.dashboard-toolbar__controls--collapsible:not(.is-expanded) {
    display: none;
}

@media (min-width: 901px) {
    .dashboard-toolbar__controls--collapsible {
        display: grid !important;
    }
}

.dashboard-section-nav-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 16px;
    margin: 8px 0 20px;
    padding: 0 4px;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-section-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    margin: 0;
    padding: 0;
    border-bottom: none;
    flex: 1;
    min-width: 0;
}

.dashboard-section-nav-actions:not([hidden]) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding-bottom: 8px;
}

.dashboard-section-nav-actions[hidden] {
    display: none !important;
}

.son-gorev-nav-action-btn {
    padding: 5px 11px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    border-radius: 8px;
    white-space: nowrap;
}

.son-gorev-nav-action-btn--icon {
    min-width: 2rem;
    padding: 5px 8px;
    font-size: 1rem;
    line-height: 1;
}

.son-gorev-nav-action-btn--temizle .son-gorev-nav-action-btn__icon {
    display: none;
}

@media (max-width: 768px) {
    .dashboard-section-nav-bar {
        flex-wrap: nowrap;
        align-items: flex-end;
        gap: 8px;
    }

    .dashboard-section-nav {
        flex: 1;
        min-width: 0;
        gap: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .dashboard-section-nav::-webkit-scrollbar {
        display: none;
    }

    .dashboard-section-nav-actions:not([hidden]) {
        width: auto;
        flex-shrink: 0;
        padding-bottom: 8px;
    }
}

.dashboard-section-nav__btn {
    background: none;
    border: none;
    padding: 0 0 12px;
    margin: 0;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.2s, border-color 0.2s;
}

.dashboard-section-nav__btn:hover {
    color: var(--text-main);
}

.dashboard-section-nav__btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.dashboard-pane[hidden] {
    display: none !important;
}

.dashboard-pane .status-grid.dashboard-kpi-grid {
    margin-top: 0;
}

.son-gorev-durum-detay-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline dotted;
    text-underline-offset: 3px;
}

.son-gorev-durum-detay-btn:hover {
    opacity: 0.85;
}

.son-gorev-durum-detay-btn[aria-expanded="true"] {
    text-decoration-style: solid;
}

.son-gorev-aksiyon-grup {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.son-gorev-detay-row td {
    padding: 0 16px 14px 16px !important;
    border-top: none;
    background: var(--bg-muted, color-mix(in srgb, var(--bg-card, #fff) 94%, var(--primary) 6%));
}

.son-gorev-detay-panel {
    border: 1px solid var(--border-color, #e2e8f0);
    border-left-width: 3px;
    border-left-color: var(--border-color, #e2e8f0);
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--text-main);
    background: var(--bg-card, #fff);
    box-shadow: 0 1px 2px color-mix(in srgb, var(--text-main, #0f172a) 6%, transparent);
}

.son-gorev-detay-row--hata .son-gorev-detay-panel {
    border-left-color: #ef4444;
    background: color-mix(in srgb, var(--bg-card, #fff) 88%, #ef4444 12%);
}

.son-gorev-detay-row--bekliyor .son-gorev-detay-panel {
    border-left-color: #f59e0b;
    background: color-mix(in srgb, var(--bg-card, #fff) 88%, #f59e0b 12%);
}

.son-gorev-detay-row--isleniyor .son-gorev-detay-panel {
    border-left-color: #2563eb;
    background: color-mix(in srgb, var(--bg-card, #fff) 88%, #2563eb 12%);
}

.son-gorev-detay-row--basarili .son-gorev-detay-panel {
    border-left-color: #10b981;
    background: color-mix(in srgb, var(--bg-card, #fff) 88%, #10b981 12%);
}

.son-gorev-detay-row--iptal .son-gorev-detay-panel {
    border-left-color: var(--text-muted, #94a3b8);
    background: color-mix(in srgb, var(--bg-card, #fff) 92%, var(--text-muted, #94a3b8) 8%);
}

[data-theme="dark"] .son-gorev-detay-row--hata .son-gorev-detay-panel {
    background: color-mix(in srgb, var(--bg-card, #1e293b) 82%, #ef4444 18%);
}

[data-theme="dark"] .son-gorev-detay-row--bekliyor .son-gorev-detay-panel {
    background: color-mix(in srgb, var(--bg-card, #1e293b) 82%, #f59e0b 18%);
}

[data-theme="dark"] .son-gorev-detay-row--isleniyor .son-gorev-detay-panel {
    background: color-mix(in srgb, var(--bg-card, #1e293b) 82%, #2563eb 18%);
}

[data-theme="dark"] .son-gorev-detay-row--basarili .son-gorev-detay-panel {
    background: color-mix(in srgb, var(--bg-card, #1e293b) 82%, #10b981 18%);
}

[data-theme="dark"] .son-gorev-detay-row--iptal .son-gorev-detay-panel {
    background: color-mix(in srgb, var(--bg-card, #1e293b) 90%, var(--text-muted, #94a3b8) 10%);
}

.son-gorev-detay-baslik {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--text-main, #0f172a);
    font-weight: 600;
}

.son-gorev-detay-etiket {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 3px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg-muted, #f1f5f9) 80%, var(--text-muted) 20%);
    color: var(--text-muted);
}

.son-gorev-detay-row--hata .son-gorev-detay-etiket {
    background: color-mix(in srgb, #fee2e2 70%, var(--bg-card) 30%);
    color: #fca5a5;
}

.son-gorev-detay-row--bekliyor .son-gorev-detay-etiket {
    background: color-mix(in srgb, #fef3c7 70%, var(--bg-card) 30%);
    color: #fcd34d;
}

.son-gorev-detay-row--isleniyor .son-gorev-detay-etiket {
    background: color-mix(in srgb, #dbeafe 70%, var(--bg-card) 30%);
    color: #93c5fd;
}

.son-gorev-detay-row--basarili .son-gorev-detay-etiket {
    background: color-mix(in srgb, #d1fae5 70%, var(--bg-card) 30%);
    color: #6ee7b7;
}

.son-gorev-detay-row--iptal .son-gorev-detay-etiket {
    background: color-mix(in srgb, var(--bg-muted) 75%, var(--text-muted) 25%);
    color: var(--text-muted);
}

[data-theme="dark"] .son-gorev-detay-row--hata .son-gorev-detay-etiket {
    color: #fecaca;
}

[data-theme="dark"] .son-gorev-detay-row--bekliyor .son-gorev-detay-etiket {
    color: #fde68a;
}

[data-theme="dark"] .son-gorev-detay-row--isleniyor .son-gorev-detay-etiket {
    color: #bfdbfe;
}

[data-theme="dark"] .son-gorev-detay-row--basarili .son-gorev-detay-etiket {
    color: #a7f3d0;
}

.son-gorev-detay-ozet {
    margin: 0 0 6px 0;
}

.son-gorev-detay-list {
    margin: 0;
    padding-left: 1.15rem;
    color: var(--text-muted);
}

.son-gorev-detay-list li + li {
    margin-top: 4px;
}

.son-gorev-detay-zaman {
    margin: 8px 0 0 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.son-gorev-detay-bos {
    margin: 0;
    color: var(--text-muted);
    font-style: italic;
}

.son-gorev-detay-aksiyon {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid color-mix(in srgb, var(--border-color, #e2e8f0) 70%, transparent);
}

.son-gorev-detay-aksiyon .btn-secondary {
    padding: 6px 14px;
    font-size: 0.84rem;
}

.son-gorev-iptal-btn {
    color: #b91c1c;
    border-color: #fecaca;
}

.dashboard-son-gorevler-card {
    margin-top: 0;
}

.dashboard-insight-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.dashboard-insight-card {
    padding: 24px 28px;
    min-width: 0;
}

.dashboard-insight-card__header {
    margin-bottom: 16px;
}

.donem-sonuc-blocks {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.donem-sonuc-block__title {
    margin: 0 0 10px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.donem-sonuc-bar {
    display: flex;
    height: 18px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--bg-app);
    border: 1px solid var(--border-color);
    margin-bottom: 14px;
}

.donem-sonuc-bar__tam {
    background: #10b981;
    transition: width 0.35s ease;
    min-width: 0;
}

.donem-sonuc-bar__hata {
    background: #ef4444;
    transition: width 0.35s ease;
    min-width: 0;
}

.donem-sonuc-bar__bekleyen {
    background: #f59e0b;
    transition: width 0.35s ease;
    min-width: 0;
}

.donem-sonuc-bar__isleniyor {
    background: #2563eb;
    transition: width 0.35s ease;
    min-width: 0;
}

.donem-sonuc-legend--3col {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 16px;
    width: 100%;
    align-items: start;
}

.donem-sonuc-legend__item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.donem-sonuc-legend__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 1.25rem;
}

.donem-sonuc-legend__label {
    line-height: 1.35;
}

.donem-sonuc-legend__value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
}

.donem-sonuc-legend__value--oran {
    color: var(--primary);
}

.donem-sonuc-legend__dot {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.donem-sonuc-legend__dot--tam { background: #10b981; }
.donem-sonuc-legend__dot--hata { background: #ef4444; }
.donem-sonuc-legend__dot--bekleyen { background: #f59e0b; }
.donem-sonuc-legend__dot--isleniyor { background: #2563eb; }

.donem-sonuc-legend__dot--ghost {
    visibility: hidden;
}

@media (max-width: 400px) {
    .donem-sonuc-legend--3col {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.dashboard-chart-card {
    padding: 28px 32px;
    margin-bottom: 32px;
}

.dashboard-chart-card--full {
    width: 100%;
}

.dashboard-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.dashboard-chart-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.dashboard-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #059669;
}

.dashboard-live-indicator[data-state="connecting"],
.dashboard-live-indicator[data-state="reconnecting"] {
    color: #d97706;
}

.dashboard-live-indicator[data-state="disconnected"],
.dashboard-live-indicator[data-state="unavailable"] {
    color: var(--text-muted);
}

.dashboard-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.dashboard-live-indicator[data-state="connected"] .dashboard-live-dot {
    animation: dashboard-live-pulse 1.6s ease-in-out infinite;
}

@keyframes dashboard-live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.85); }
}

.dashboard-son-guncelleme {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}

.dashboard-chart-container {
    position: relative;
    height: 350px;
    width: 100%;
}

.dashboard-durum-chart-container {
    position: relative;
    width: 100%;
    min-width: 0;
    height: clamp(200px, 28vw, 300px);
    max-height: 300px;
}

.son-gorev-agent-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.son-gorev-agent-link:hover {
    color: var(--primary-hover);
}

/* Görevler + Kuyruk — mobil kart: agent üstte, altta durum + zaman/kuyrukta */
@media (max-width: 768px) {
    #dashboard-pane-son-gorevler .son-gorevler-table tbody tr.son-gorev-row,
    #dashboard-pane-kuyruk .son-gorevler-table tbody tr.son-gorev-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 0;
        padding: 0;
        overflow: hidden;
    }

    #dashboard-pane-son-gorevler .son-gorevler-table tbody tr.son-gorev-row {
        grid-template-areas:
            "agent agent"
            "durum zaman";
    }

    #dashboard-pane-kuyruk .son-gorevler-table tbody tr.son-gorev-row {
        grid-template-areas:
            "agent agent"
            "durum kuyrukta";
    }

    #dashboard-pane-son-gorevler .son-gorevler-table tbody tr.son-gorev-row > td,
    #dashboard-pane-kuyruk .son-gorevler-table tbody tr.son-gorev-row > td {
        display: flex !important;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 0;
        width: auto !important;
        text-align: left;
        padding: 10px 12px;
        border-bottom: none;
    }

    #dashboard-pane-son-gorevler .son-gorevler-table tbody tr.son-gorev-row > td::before,
    #dashboard-pane-kuyruk .son-gorevler-table tbody tr.son-gorev-row > td::before {
        display: none !important;
        content: none !important;
    }

    #dashboard-pane-son-gorevler .son-gorevler-table tbody tr.son-gorev-row > td[data-label="Agent Adı"],
    #dashboard-pane-kuyruk .son-gorevler-table tbody tr.son-gorev-row > td[data-label="Agent Adı"] {
        grid-area: agent;
        padding: 14px 14px 12px;
        border-bottom: 1px solid var(--border-color);
    }

    #dashboard-pane-son-gorevler .son-gorevler-table tbody tr.son-gorev-row > td[data-label="Agent Adı"]::before,
    #dashboard-pane-kuyruk .son-gorevler-table tbody tr.son-gorev-row > td[data-label="Agent Adı"]::before {
        display: none;
    }

    #dashboard-pane-son-gorevler .son-gorevler-table tbody tr.son-gorev-row > td[data-label="Agent Adı"] .son-gorev-agent-link,
    #dashboard-pane-son-gorevler .son-gorevler-table tbody tr.son-gorev-row > td[data-label="Agent Adı"] strong,
    #dashboard-pane-kuyruk .son-gorevler-table tbody tr.son-gorev-row > td[data-label="Agent Adı"] .son-gorev-agent-link,
    #dashboard-pane-kuyruk .son-gorevler-table tbody tr.son-gorev-row > td[data-label="Agent Adı"] strong {
        font-size: 1rem;
        line-height: 1.35;
        word-break: break-word;
    }

    #dashboard-pane-son-gorevler .son-gorevler-table tbody tr.son-gorev-row > td[data-label="İşlem"],
    #dashboard-pane-son-gorevler .son-gorevler-table tbody tr.son-gorev-row > td[data-label="Aksiyon"],
    #dashboard-pane-kuyruk .son-gorevler-table tbody tr.son-gorev-row > td[data-label="İşlem"],
    #dashboard-pane-kuyruk .son-gorevler-table tbody tr.son-gorev-row > td[data-label="Aksiyon"] {
        display: none !important;
    }

    #dashboard-pane-son-gorevler .son-gorevler-table tbody tr.son-gorev-row > td[data-label="Durum"],
    #dashboard-pane-kuyruk .son-gorevler-table tbody tr.son-gorev-row > td[data-label="Durum"] {
        grid-area: durum;
        font-size: 0.88rem;
        padding-bottom: 12px;
    }

    #dashboard-pane-son-gorevler .son-gorevler-table tbody tr.son-gorev-row > td[data-label="Zaman"] {
        grid-area: zaman;
        font-size: 0.82rem;
        color: var(--text-muted);
        word-break: break-word;
        padding-bottom: 12px;
        align-items: flex-end;
        text-align: right;
    }

    #dashboard-pane-kuyruk .son-gorevler-table tbody tr.son-gorev-row > td[data-label="Kuyrukta"] {
        grid-area: kuyrukta;
        font-size: 0.82rem;
        color: var(--text-muted);
        word-break: break-word;
        padding-bottom: 12px;
        align-items: flex-end;
        text-align: right;
    }

    #dashboard-pane-son-gorevler .son-gorevler-table tbody tr.son-gorev-row > td[data-label="Durum"] .son-gorev-durum-detay-btn,
    #dashboard-pane-kuyruk .son-gorevler-table tbody tr.son-gorev-row > td[data-label="Durum"] .son-gorev-durum-detay-btn {
        text-align: left;
        justify-content: flex-start;
        width: auto;
    }

    #dashboard-pane-son-gorevler .son-gorevler-table tbody tr.son-gorev-detay-row,
    #dashboard-pane-kuyruk .son-gorevler-table tbody tr.son-gorev-detay-row {
        display: block !important;
        margin-top: -8px;
        padding-top: 0;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }

    #dashboard-pane-son-gorevler .son-gorevler-table tbody tr.son-gorev-detay-row > td,
    #dashboard-pane-kuyruk .son-gorevler-table tbody tr.son-gorev-detay-row > td {
        display: block !important;
        width: 100% !important;
        padding: 0 10px 12px !important;
        border-bottom: none;
    }

    #dashboard-pane-son-gorevler .son-gorevler-table tbody tr.son-gorev-detay-row .son-gorev-detay-panel,
    #dashboard-pane-kuyruk .son-gorevler-table tbody tr.son-gorev-detay-row .son-gorev-detay-panel {
        border-radius: 0 0 10px 10px;
    }
}

@media (max-width: 900px) {
    .dashboard-toolbar__desc {
        display: none;
    }

    .dashboard-toolbar__desc::before {
        content: none;
    }

    .dashboard-toolbar__title {
        white-space: normal;
    }

    .dashboard-toolbar__meta {
        flex-wrap: wrap;
        align-items: center;
    }

    .dashboard-toolbar__meta-primary {
        flex: 1 1 auto;
        min-width: 0;
        flex-wrap: wrap;
    }

    .dashboard-toolbar__title-toggle {
        max-width: 100%;
    }

    .dashboard-toolbar__meta-status {
        flex: 1 1 100%;
        justify-content: flex-end;
        order: 3;
    }

    .dashboard-toolbar__controls {
        grid-template-columns: 1fr;
    }

    .dashboard-toolbar__selects {
        grid-template-columns: 1fr;
    }

    .segmented-control {
        width: 100%;
        justify-content: stretch;
    }

    .segmented-control .segment-btn {
        flex: 1;
    }
}

@media (max-width: 640px) {
    .dashboard-toolbar__meta {
        flex-wrap: wrap;
    }

    .dashboard-toolbar__meta-status {
        width: 100%;
        justify-content: flex-end;
    }

    .header-welcome-tagline-wrap,
    .header-welcome-sep {
        display: none;
    }

    .header-welcome-greeting {
        font-size: 0.92rem;
        max-width: min(100%, 220px);
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .dashboard-section-nav-bar {
        flex-wrap: wrap;
    }

    .dashboard-section-nav {
        gap: 14px;
    }

    .dashboard-section-nav__btn {
        font-size: 0.9rem;
    }

    .dashboard-chart-container {
        height: 260px;
    }

    .dashboard-durum-chart-container {
        height: 220px;
    }
}

@media (max-width: 640px) {
    .dashboard-tasarruf-card,
    .dashboard-chart-card {
        padding: 16px 14px;
    }

    .dashboard-tasarruf-header {
        margin-bottom: 14px;
        gap: 10px;
    }

    .dashboard-section-title {
        font-size: 1.05rem;
    }

    .dashboard-section-desc {
        font-size: 0.82rem;
    }

    .dashboard-tasarruf-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .tasarruf-stat {
        padding: 12px 10px;
        gap: 2px;
        min-width: 0;
    }

    .tasarruf-stat-label {
        font-size: 0.68rem;
        letter-spacing: 0.02em;
        line-height: 1.25;
        text-transform: none;
    }

    .tasarruf-stat-value {
        font-size: 1.35rem;
        line-height: 1.15;
    }

    .tasarruf-stat-hint {
        font-size: 0.65rem;
        line-height: 1.15;
    }

    .tasarruf-varsayilan-notu {
        text-align: left;
        max-width: none;
        font-size: 0.72rem;
    }
}

/* --- Ortak Agent Ayarlari (abonelik) --- */
.ortak-ayar-panel {
    margin-top: 24px;
    padding: 16px 20px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-app);
}

.ortak-ayar-panel__summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
    list-style-position: outside;
    user-select: none;
}

.ortak-ayar-panel__desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 12px 0 16px;
}

.ortak-ayar-panel__loading {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 0 12px;
}

.ortak-ayar-panel__error {
    color: #dc2626;
    font-size: 0.88rem;
    margin: 0 0 12px;
}

.ortak-ayar-grup {
    margin-bottom: 16px;
}

.ortak-ayar-grup:last-child {
    margin-bottom: 0;
}

.ortak-ayar-grup__baslik {
    margin: 0 0 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

.ortak-ayar-grup__header {
    display: grid;
    grid-template-columns: 300px minmax(140px, 1fr) 168px;
    gap: 12px 16px;
    padding: 0 0 6px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
}

.ortak-ayar-form-header {
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.ortak-ayar-setting-row {
    display: grid;
    grid-template-columns: 300px minmax(140px, 1fr) 168px;
    gap: 4px 12px;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid var(--border-color);
}

.ortak-ayar-grup__rows .ortak-ayar-setting-row:last-child {
    border-bottom: none;
}

.ortak-ayar-setting-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    min-width: 0;
    width: 300px;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ortak-ayar-setting-yerel {
    display: flex;
    justify-content: flex-start;
}

.ortak-ayar-yerel-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.ortak-ayar-yerel-badge--yerel {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fcd34d;
}

.ortak-ayar-yerel-badge--bulut {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.ortak-ayar-setting-input {
    min-width: 0;
}

.ortak-ayar-setting-depolama {
    min-width: 0;
    max-width: 168px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.ortak-ayar-setting-input .form-control,
.ortak-ayar-setting-input select.form-control {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
}

#ortak-ayar-form-container .ayar-deger-wrap input,
#ortak-ayar-form-container .ayar-deger-wrap select,
.agent-ayar-card .ayar-deger-wrap input,
.agent-ayar-card .ayar-deger-wrap select,
.agent-ayar-card .ayar-password-wrap .ayar-password-input {
    min-height: 36px;
    height: 36px;
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 10px;
    border-radius: 8px;
}

.agent-ayar-card .ayar-password-wrap .ayar-password-input {
    padding-right: 3.75rem;
}

.agent-ayar-table th,
.agent-ayar-table td {
    padding: 6px 10px;
    vertical-align: middle;
}

.ortak-ayar-bool-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.ortak-ayar-bool-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

@media (max-width: 720px) {
    .ortak-ayar-grup__header {
        display: none;
    }
}

@media (max-width: 480px) {
    .ortak-ayar-panel {
        padding: 12px 14px;
    }
}

/* --- Paylasilan ayar UI (vitrin agent + abonelik) --- */
.ayar-kaynak-nokta {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ayar-deger-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1;
}

.ayar-deger-wrap input,
.ayar-deger-wrap select {
    width: 100%;
    min-width: 0;
    padding-right: 2rem;
    box-sizing: border-box;
}

.ayar-deger-wrap input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.ayar-deger-wrap input[type="number"]::-webkit-inner-spin-button,
.ayar-deger-wrap input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ayar-deger-clear {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ayar-deger-clear:hover {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
}

.ayar-password-wrap {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.ayar-password-wrap .ayar-password-input {
    width: 100%;
    min-width: 0;
    padding-right: 3.75rem;
    box-sizing: border-box;
}

.ayar-password-wrap .ayar-deger-clear {
    right: 4px;
}

.ayar-password-toggle {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ayar-password-toggle:hover {
    color: var(--text-main);
    background: color-mix(in srgb, var(--text-muted) 18%, transparent);
}

[data-theme="dark"] .ayar-password-toggle:hover {
    background: color-mix(in srgb, var(--text-muted) 28%, transparent);
}

.ayar-depolama-seg {
    display: inline-flex;
    width: 100%;
    max-width: 168px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-app);
    box-sizing: border-box;
}

.ayar-depolama-btn {
    border: none;
    background: transparent;
    padding: 6px 4px;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    flex: 1 1 50%;
    min-width: 0;
    text-align: center;
    line-height: 1.2;
}

.ayar-depolama-btn.is-selected {
    background: #2563EB;
    color: #fff;
}

.ayar-depolama-sabit {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.ayar-yonetici-bilgi {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0 0 12px;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.agent-ayar-table {
    table-layout: fixed;
    width: 100%;
}

.agent-ayar-col-ad {
    width: 300px;
    max-width: 300px;
}

.agent-ayar-col-deger {
    width: auto;
}

.agent-ayar-col-depolama {
    width: 168px;
    max-width: 168px;
}

.agent-ayar-table td.agent-ayar-ad-cell {
    width: 300px;
    max-width: 300px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-ayar-table td.agent-ayar-ad-cell .ayar-ad-label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.agent-ayar-table td.agent-ayar-deger-cell {
    min-width: 0;
}

.agent-ayar-table td.agent-ayar-deger-cell .ayar-deger-wrap,
.agent-ayar-table td.agent-ayar-deger-cell .ayar-password-wrap {
    width: 100%;
}

.agent-ayar-table td.agent-ayar-depolama-cell {
    max-width: 168px;
    min-width: 0;
    overflow: hidden;
}

@media (max-width: 720px) {
    .ortak-ayar-setting-row {
        grid-template-columns: 1fr;
        grid-template-areas:
            "name"
            "input"
            "depolama";
    }

    .ortak-ayar-setting-name { grid-area: name; max-width: none; width: auto; white-space: normal; }
    .ortak-ayar-setting-input { grid-area: input; }
    .ortak-ayar-setting-depolama { grid-area: depolama; max-width: none; }
}

/* Harici API Köprüsü — vitrin abonelik paneli */
.harici-api-koprusu-panel { margin-top: 1rem; }
.harici-api-section { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border-color); }
.harici-api-section__title { margin: 0 0 0.75rem; font-size: 0.95rem; font-weight: 700; }
.harici-api-hint { color: var(--text-muted); font-size: 0.85rem; margin: 0.5rem 0; }
.harici-api-profil-row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.harici-api-profil-row select { flex: 1; min-width: 200px; }
.harici-api-table-scroll { overflow-x: auto; margin: 0.5rem 0; }
.harici-api-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.harici-api-table th, .harici-api-table td { padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--border-color); text-align: left; vertical-align: middle; }
.harici-api-table select.form-control { font-size: 0.8rem; padding: 0.25rem 0.35rem; min-width: 5.5rem; }
.harici-api-section--politika { display: flex; flex-direction: column; }
.harici-api-politika-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}
.harici-api-politika-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.6rem;
    align-items: flex-end;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary, rgba(0, 0, 0, 0.02));
}
.harici-api-politika-toolbar label {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    min-width: 0;
    margin: 0;
}
.harici-api-politika-toolbar .form-control {
    font-size: 0.78rem;
    padding: 0.28rem 0.38rem;
    min-width: 0;
}
.harici-api-politika-count {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    align-self: center;
    padding-right: 0.25rem;
    border-right: 1px solid var(--border-color);
    margin-right: 0.15rem;
}
.harici-api-politika-toolbar__metod { flex: 0 1 5.5rem; }
.harici-api-politika-toolbar__yol { flex: 1 1 8rem; min-width: 7rem; }
.harici-api-politika-toolbar__sort { flex: 0 1 9.5rem; }
.harici-api-politika-bulk-onay {
    flex-direction: row !important;
    align-items: center;
    gap: 0.35rem !important;
    font-size: 0.8rem !important;
    color: var(--text-primary, inherit) !important;
    white-space: nowrap;
    margin-left: auto;
    cursor: pointer;
    user-select: none;
}
.harici-api-politika-bulk-onay input { margin: 0; cursor: pointer; }

/* Endpoint politika — kompakt satir + genisletilebilir detay */
.harici-api-politika-table-scroll { overflow-x: auto; }
.harici-api-politika-table {
    table-layout: fixed;
    width: 100%;
}
.harici-api-politika-table th,
.harici-api-politika-table td {
    vertical-align: middle;
    white-space: nowrap;
    padding: 0.3rem 0.25rem;
}
.harici-api-politika-col--expand { width: 1.5rem; }
.harici-api-politika-col--method { width: 3.1rem; }
/* Yol: genislik verilmez — kalan alani doldurur */
.harici-api-politika-col--erisim { width: 4.1rem; }
.harici-api-politika-col--kanal { width: 3.6rem; }
.harici-api-politika-col--bool { width: 2.1rem; }
.harici-api-politika-col--ozet { width: 3.6rem; }
.harici-api-politika-col--wizard { width: 2.1rem; }
.harici-api-politika-col-head--erisim,
.harici-api-politika-col-head--kanal,
.harici-api-politika-col-head--bool,
.harici-api-politika-col-head--ozet,
.harici-api-politika-col-head--wizard {
    font-size: 0.7rem;
    text-align: center;
    padding-left: 0.15rem !important;
    padding-right: 0.15rem !important;
}
.harici-api-politika-expand-cell {
    width: 1.5rem;
    padding-left: 0.2rem !important;
    padding-right: 0.1rem !important;
}
.harici-api-politika-expand {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.8rem;
    line-height: 1;
    padding: 0.1rem 0.15rem;
    color: var(--text-muted);
}
.harici-api-politika-expand:hover { color: var(--primary); }
.harici-api-politika-method {
    text-align: center;
    font-size: 0.75rem;
}
.harici-api-politika-method code { font-size: 0.72rem; }
.harici-api-politika-path {
    width: auto;
    max-width: none;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
}
.harici-api-politika-path code {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
}
.harici-api-politika-table select.form-control,
.harici-api-politika-select.form-control {
    min-width: 0 !important;
    width: 100%;
    max-width: none;
    padding: 0.15rem 0.2rem;
    font-size: 0.68rem;
    line-height: 1.2;
}
.harici-api-politika-bool-cell {
    width: 2.1rem;
    text-align: center;
    padding-left: 0.1rem !important;
    padding-right: 0.1rem !important;
}
.harici-api-politika-bool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    cursor: pointer;
    user-select: none;
}
.harici-api-politika-bool input { margin: 0; cursor: pointer; }
.harici-api-politika-ozet-cell {
    white-space: nowrap;
    overflow: hidden;
    text-align: center;
    padding-left: 0.15rem !important;
    padding-right: 0.15rem !important;
}
.harici-api-politika-actions-cell {
    width: 2.1rem;
    text-align: center;
    padding-left: 0.1rem !important;
    padding-right: 0.1rem !important;
}
.harici-api-politika-wizard-btn {
    min-width: 0;
    padding: 0.15rem 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
}
.harici-api-politika-chip {
    display: inline-block;
    margin: 0;
    padding: 0.05rem 0.28rem;
    border-radius: 999px;
    font-size: 0.62rem;
    line-height: 1.25;
    background: rgba(52, 152, 219, 0.12);
    color: var(--text-primary, inherit);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}
.harici-api-politika-chip--muted {
    background: var(--bg-secondary, rgba(0, 0, 0, 0.05));
    color: var(--text-muted);
}
.harici-api-politika-chip--profil {
    background: rgba(39, 174, 96, 0.12);
    color: #1e7e34;
}
.harici-api-politika-chip--empty { color: var(--text-muted); background: transparent; }
.harici-api-politika-detail td {
    padding: 0 !important;
    border-bottom: 1px solid var(--border-color);
    white-space: normal;
}
.harici-api-politika-detail-panel {
    padding: 0.55rem 0.75rem 0.65rem 2rem;
    background: var(--bg-secondary, rgba(0, 0, 0, 0.02));
}
.harici-api-politika-detail-hint {
    margin: 0 0 0.45rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.harici-api-politika-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0.45rem 0.65rem;
    margin-bottom: 0.45rem;
}
.harici-api-politika-detail-grid label,
.harici-api-politika-detail-profil {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin: 0;
}
.harici-api-politika-detail-grid .form-control,
.harici-api-politika-detail-profil .form-control {
    font-size: 0.8rem;
    padding: 0.3rem 0.4rem;
}
.harici-api-politika-detail-profil .harici-api-calistirma-json {
    font-family: ui-monospace, monospace;
    font-size: 0.78rem;
    resize: vertical;
    min-height: 4.5rem;
}
.harici-api-politika-main + .harici-api-politika-detail[hidden] + .harici-api-politika-main td,
.harici-api-politika-main:has(+ .harici-api-politika-detail[hidden]) td {
    border-bottom-width: 1px;
}

.harici-api-eylem-form { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 0.5rem; margin-bottom: 0.75rem; }
.harici-api-eylem-row { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border-color); font-size: 0.88rem; }
.harici-api-eylem-meta { color: var(--text-muted); font-size: 0.8rem; }
.harici-api-status { font-size: 0.85rem; margin: 0.5rem 0; color: var(--primary); }
.harici-api-status--error { color: #c0392b; }
@media (max-width: 720px) {
    .harici-api-eylem-form { grid-template-columns: 1fr; }
}

/* Harici API Wizard v2 (Faz 21c) */
.harici-api-wizard-v2 { display: none; position: fixed; inset: 0; z-index: 12000; }
.harici-api-wizard-v2.is-open { display: block; }
.harici-api-wizard-v2__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.harici-api-wizard-v2__dialog {
    position: relative; margin: 2vh auto; max-width: 920px; width: calc(100% - 1.5rem);
    max-height: 96vh; display: flex; flex-direction: column;
    background: var(--card-bg, #fff); border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.harici-api-wizard-v2__form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 96vh;
    margin: 0;
}
.harici-api-wizard-v2__header { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-color); }
.harici-api-wizard-v2__header h3 { margin: 0; font-size: 1rem; }
.harici-api-wizard-v2__close { border: none; background: none; font-size: 1.5rem; cursor: pointer; line-height: 1; }
.harici-api-wizard-v2__tabs { display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0.5rem 1rem; border-bottom: 1px solid var(--border-color); }
.harici-api-wizard-v2__tab { border: 1px solid var(--border-color); background: transparent; padding: 0.35rem 0.6rem; font-size: 0.78rem; cursor: pointer; border-radius: 4px; }
.harici-api-wizard-v2__tab.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }
.harici-api-wizard-v2__body { flex: 1; overflow: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.65rem; }
.harici-api-wizard-v2__body label { display: block; font-size: 0.85rem; margin-bottom: 0.35rem; }
.harici-api-wizard-v2__sablon-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; align-items: center; }
.harici-api-wizard-v2__sablon-fieldset {
    margin: 0.5rem 0 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}
.harici-api-wizard-v2__sablon-fieldset legend {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0 0.25rem;
}
.harici-api-wizard-v2__sablon-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin: 0.35rem 0;
}
.harici-api-wizard-v2__sablon-check { margin: 0 !important; }
.harici-api-wizard-v2__sablon-msg { margin: 0.35rem 0 0; }
.harici-api-wizard-v2__json { font-family: ui-monospace, monospace; font-size: 0.8rem; }
.harici-api-wizard-v2__preview { background: var(--bg-muted, #f4f4f4); padding: 0.5rem; font-size: 0.78rem; overflow: auto; max-height: 120px; }
.harici-api-wizard-v2__gate { padding: 0.5rem 1rem; border-top: 1px solid var(--border-color); font-size: 0.82rem; max-height: 140px; overflow: auto; }
.harici-api-wizard-v2__gate-block { margin-bottom: 0.35rem; }
.harici-api-wizard-v2__gate-block--tehlike {
    border: 1px solid #c0392b;
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    background: rgba(192, 57, 43, 0.06);
}
.harici-api-wizard-v2__gate-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 0.5rem;
}
.harici-api-wizard-v2__err { color: #c0392b; margin: 0.25rem 0 0 1rem; }
.harici-api-wizard-v2__warn, .harici-api-wizard-v2__warn-list { color: #b7791f; }
.harici-api-wizard-v2__ok { color: var(--primary); }
.harici-api-wizard-v2__footer { display: flex; gap: 0.5rem; align-items: center; padding: 0.75rem 1rem; border-top: 1px solid var(--border-color); }
.harici-api-wizard-v2__spacer { flex: 1; }
.harici-api-profil-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.harici-api-profil-row .form-control { flex: 1 1 220px; min-width: 160px; }
.harici-api-toplu-paket__table-wrap { overflow: auto; max-height: 48vh; border: 1px solid var(--border-color); border-radius: 6px; }
.harici-api-toplu-paket__table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.harici-api-toplu-paket__table th,
.harici-api-toplu-paket__table td { padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--border-color); text-align: left; vertical-align: top; }
.harici-api-toplu-paket__table th { position: sticky; top: 0; background: var(--card-bg, #fff); z-index: 1; }
.harici-api-wizard-v2__alan-toolbar { margin: 0.5rem 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.harici-api-wizard-v2__swagger-msg {
    margin: 0.35rem 0 0.5rem;
    font-size: 0.8rem;
    color: var(--primary);
}
.harici-api-wizard-v2__swagger-msg:empty { display: none; }

/* Wizard v2 okunabilirlik, responsive duzen ve tema uyumu */
.harici-api-wizard-v2__backdrop {
    background: rgba(2, 6, 23, 0.66);
    backdrop-filter: blur(3px);
}
.harici-api-wizard-v2__dialog {
    --wizard-surface-soft: #f8fafc;
    --wizard-surface-hover: #f1f5f9;
    max-width: 1180px;
    width: calc(100% - 2rem);
    min-height: min(720px, 92vh);
    max-height: 94vh;
    overflow: hidden;
    color: var(--text-main);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.36);
}
[data-theme="dark"] .harici-api-wizard-v2__dialog {
    --wizard-surface-soft: #0f172a;
    --wizard-surface-hover: #172033;
}
.harici-api-wizard-v2__form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 94vh;
    margin: 0;
}
.harici-api-wizard-v2__header {
    flex: 0 0 auto;
    min-height: 58px;
    padding: 0.85rem 1.35rem;
    background: var(--bg-card);
}
.harici-api-wizard-v2__header h3 { color: var(--text-main); font-size: 1.05rem; }
.harici-api-wizard-v2__close {
    width: 36px;
    height: 36px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--text-muted);
}
.harici-api-wizard-v2__close:hover {
    color: var(--text-main);
    background: var(--wizard-surface-hover);
    border-color: var(--border-color);
}
.harici-api-wizard-v2__tabs {
    flex-wrap: nowrap;
    flex: 0 0 auto;
    gap: 0.4rem;
    padding: 0.75rem 1.35rem;
    overflow-x: auto;
    background: var(--wizard-surface-soft);
}
.harici-api-wizard-v2__tab {
    flex: 0 0 auto;
    border-color: transparent;
    padding: 0.55rem 0.85rem;
    color: var(--text-muted);
    font-family: inherit;
    font-weight: 650;
    font-size: 0.82rem;
    border-radius: 8px;
}
.harici-api-wizard-v2__tab:hover {
    color: var(--text-main);
    background: var(--bg-card);
    border-color: var(--border-color);
}
.harici-api-wizard-v2__tab.is-active {
    color: var(--text-on-primary);
    box-shadow: 0 2px 7px color-mix(in srgb, var(--primary) 28%, transparent);
}
.harici-api-wizard-v2__body {
    flex: 1 1 auto;
    min-height: 280px;
    padding: 1.35rem 1.5rem 1.5rem;
    gap: 1.1rem;
    color: var(--text-main);
    background: var(--bg-card);
}
.harici-api-wizard-v2__endpoint-chip {
    margin: 0;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    background: var(--wizard-surface-soft);
    border: 1px solid var(--border-color);
    font-size: 0.82rem;
}
.harici-api-wizard-v2__endpoint-chip code {
    margin-right: 0.35rem;
    font-size: 0.8rem;
}
.harici-api-wizard-v2__body label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 0;
    color: var(--text-main);
    font-size: 0.86rem;
    font-weight: 600;
}
.harici-api-wizard-v2__body label > span:first-child {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0;
}
.harici-api-wizard-v2__body label > small {
    display: block;
    margin-top: 0;
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 400;
    line-height: 1.4;
}
.harici-api-wizard-v2__body label em {
    padding: 0.14rem 0.42rem;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 999px;
    font-size: 0.66rem;
    font-style: normal;
    font-weight: 700;
}
.harici-api-wizard-v2__body input[type="checkbox"] { accent-color: var(--primary); }
.harici-api-wizard-v2__checks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--wizard-surface-soft);
}
.harici-api-wizard-v2__checks .ortak-ayar-bool-label {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 0.45rem;
    margin: 0 !important;
    font-weight: 550;
}
.harici-api-wizard-v2__body .form-control {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    height: auto;
    padding: 0.65rem 0.85rem;
    line-height: 1.45;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
}
.harici-api-wizard-v2__body select.form-control {
    min-height: 44px;
    height: 44px;
    padding-top: 0;
    padding-bottom: 0;
}
.harici-api-wizard-v2__body textarea.form-control {
    height: auto;
    min-height: 96px;
    padding: 0.8rem 0.9rem;
    resize: vertical;
    line-height: 1.5;
}
.harici-api-wizard-v2__textarea-amac {
    min-height: 88px !important;
}
.harici-api-wizard-v2__textarea-ornek {
    min-height: 112px !important;
}
.harici-api-wizard-v2__body .form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-soft);
}
.harici-api-wizard-v2__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem 1.1rem;
}
.harici-api-wizard-v2__grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.harici-api-wizard-v2__field--full {
    grid-column: 1 / -1;
}
.harici-api-wizard-v2__intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--wizard-surface-soft);
}
.harici-api-wizard-v2__intro h4 { margin: 0 0 0.25rem; font-size: 0.98rem; }
.harici-api-wizard-v2__intro p {
    max-width: 760px;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.5;
}
.harici-api-wizard-v2__count {
    flex: 0 0 auto;
    padding: 0.3rem 0.65rem;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
}
.harici-api-wizard-v2__variants {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}
.harici-api-wizard-v2__variant {
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}
.harici-api-wizard-v2__variant-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--wizard-surface-soft);
}
.harici-api-wizard-v2__variant-header > div {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 0.75rem;
}
.harici-api-wizard-v2__variant-number {
    display: grid;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    place-items: center;
    color: var(--text-on-primary);
    background: var(--primary);
    border-radius: 9px;
    font-size: 0.8rem;
    font-weight: 750;
}
.harici-api-wizard-v2__variant-header h4 {
    overflow: hidden;
    margin: 0;
    color: var(--text-main);
    font-size: 0.95rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.harici-api-wizard-v2__variant-header p {
    margin: 0.15rem 0 0;
    color: var(--text-muted);
    font-size: 0.74rem;
}
.harici-api-wizard-v2__varyant-sil {
    flex: 0 0 auto;
    padding: 0.4rem 0.65rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #dc2626;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 650;
    cursor: pointer;
}
.harici-api-wizard-v2__varyant-sil:hover {
    border-color: rgba(220, 38, 38, 0.25);
    background: rgba(220, 38, 38, 0.08);
}
.harici-api-wizard-v2__variant-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem 1.15rem;
    padding: 1.15rem 1.2rem 1.25rem;
}
.harici-api-wizard-v2__variant-grid > .harici-api-wizard-v2__field--full {
    grid-column: 1 / -1;
}
.harici-api-wizard-v2__advanced,
.harici-api-wizard-v2__workspace {
    border-top: 1px solid var(--border-color);
    background: var(--wizard-surface-soft);
}
.harici-api-wizard-v2__advanced > summary,
.harici-api-wizard-v2__workspace > summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    color: var(--text-main);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 650;
}
.harici-api-wizard-v2__advanced > summary:hover,
.harici-api-wizard-v2__workspace > summary:hover { background: var(--wizard-surface-hover); }
.harici-api-wizard-v2__advanced > summary small,
.harici-api-wizard-v2__workspace > summary small {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 450;
}
.harici-api-wizard-v2__advanced > summary::after,
.harici-api-wizard-v2__workspace > summary::after {
    content: "⌄";
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: transform 0.18s ease;
}
.harici-api-wizard-v2__advanced[open] > summary::after,
.harici-api-wizard-v2__workspace[open] > summary::after { transform: rotate(180deg); }
.harici-api-wizard-v2__advanced-content { padding: 0 1rem 1rem; }
.harici-api-wizard-v2__workspace {
    margin-top: 0.9rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-card);
}
.harici-api-wizard-v2__workspace > .harici-api-hint { margin: 0 1rem 0.8rem; }
.harici-api-wizard-v2__workspace > .ortak-ayar-bool-label {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 0 1rem 0.9rem;
    padding: 0.7rem;
    border-radius: 8px;
    background: var(--wizard-surface-soft);
}
.harici-api-wizard-v2__workspace > .ortak-ayar-bool-label input { margin-top: 0.18rem; }
.harici-api-wizard-v2__workspace > .ortak-ayar-bool-label span {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.harici-api-wizard-v2__workspace > .ortak-ayar-bool-label small {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 400;
}
.harici-api-wizard-v2__workspace-settings {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(130px, 0.3fr);
    gap: 0.8rem;
    padding: 0 1rem 0.85rem;
}
.harici-api-wizard-v2__field-picker {
    grid-column: 1 / -1;
    display: grid;
    gap: 0.55rem;
}
.harici-api-wizard-v2__field-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.35rem 0.65rem;
    max-height: 15rem;
    padding: 0.65rem;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--wizard-surface-soft);
}
.harici-api-wizard-v2__field-option {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    padding: 0.35rem 0.45rem;
    border-radius: 6px;
    color: var(--text-main);
    cursor: pointer;
}
.harici-api-wizard-v2__field-option:hover { background: var(--primary-soft); }
.harici-api-wizard-v2__field-option[hidden] { display: none; }
.harici-api-wizard-v2__field-option input { flex: 0 0 auto; }
.harici-api-wizard-v2__field-option span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.harici-api-wizard-v2__workspace > .harici-api-wizard-v2__grid { padding: 0 1rem 1rem; }
.harici-api-wizard-v2__section-label {
    margin: 0 1rem 0.5rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.harici-api-wizard-v2__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 2rem 1rem;
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    color: var(--text-muted);
    text-align: center;
}
.harici-api-wizard-v2__empty strong { color: var(--text-main); font-size: 0.9rem; }
.harici-api-wizard-v2__empty span { max-width: 460px; font-size: 0.78rem; }
.harici-api-wizard-v2__varyant-ekle { align-self: flex-start; }
.harici-api-wizard-v2__varyant-ekle > span { margin-right: 0.3rem; font-size: 1rem; }
.harici-api-wizard-v2__preview {
    color: var(--text-main);
    background: var(--wizard-surface-soft);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}
.harici-api-wizard-v2__gate {
    flex: 0 0 auto;
    max-height: 120px;
    padding: 0.65rem 1.35rem;
    color: var(--text-main);
    background: var(--wizard-surface-soft);
}
.harici-api-wizard-v2__gate:empty { display: none; }
.harici-api-wizard-v2__err { color: #dc2626; }
.harici-api-wizard-v2__warn,
.harici-api-wizard-v2__warn-list { color: #b45309; }
[data-theme="dark"] .harici-api-wizard-v2__err { color: #f87171; }
[data-theme="dark"] .harici-api-wizard-v2__warn,
[data-theme="dark"] .harici-api-wizard-v2__warn-list { color: #fbbf24; }
.harici-api-wizard-v2__footer {
    flex: 0 0 auto;
    gap: 0.55rem;
    padding: 0.85rem 1.35rem;
    background: var(--bg-card);
}
.harici-api-wizard-v2__paket-import-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.harici-api-wizard-v2__paket-import-panel textarea[data-wf="paketImportMetin"] {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
    min-height: 280px;
}
.harici-api-wizard-v2__body::-webkit-scrollbar,
.harici-api-wizard-v2__tabs::-webkit-scrollbar { width: 10px; height: 8px; }
.harici-api-wizard-v2__body::-webkit-scrollbar-thumb,
.harici-api-wizard-v2__tabs::-webkit-scrollbar-thumb {
    border: 2px solid var(--bg-card);
    border-radius: 999px;
    background: var(--border-color);
}
@media (max-width: 900px) {
    .harici-api-wizard-v2__grid--3,
    .harici-api-wizard-v2__variant-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 760px) {
    .harici-api-wizard-v2__dialog {
        width: 100%;
        height: 100%;
        min-height: 100%;
        max-height: none;
        margin: 0;
        border: 0;
        border-radius: 0;
    }
    .harici-api-wizard-v2__form { max-height: none; height: 100%; }
    .harici-api-wizard-v2__header,
    .harici-api-wizard-v2__tabs,
    .harici-api-wizard-v2__body,
    .harici-api-wizard-v2__footer,
    .harici-api-wizard-v2__gate {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }
    .harici-api-wizard-v2__variant-grid,
    .harici-api-wizard-v2__workspace-settings,
    .harici-api-wizard-v2__grid,
    .harici-api-wizard-v2__grid--3 { grid-template-columns: 1fr; }
    .harici-api-wizard-v2__intro { flex-direction: column; }
    .harici-api-wizard-v2__footer { flex-wrap: wrap; }
    .harici-api-wizard-v2__footer .harici-api-wizard-v2__spacer { display: none; }
}
