/* ============================================================
   Fırsat Filtre Paneli — Modern UI
   ============================================================ */

/* --- CSS Custom Properties (Light Theme) --- */
:root {
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Colors */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #dbeafe;
    --primary-ghost: rgba(37, 99, 235, 0.08);

    --success: #16a34a;
    --success-light: #dcfce7;
    --warning: #d97706;
    --warning-light: #fef3c7;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --info: #0891b2;
    --info-light: #cffafe;

    /* Surfaces */
    --bg-body: #f1f5f9;
    --bg-card: #ffffff;
    --bg-sidebar: #0f172a;
    --bg-sidebar-hover: #1e293b;
    --bg-sidebar-active: rgba(37, 99, 235, 0.15);
    --bg-input: #ffffff;
    --bg-hover: #f8fafc;
    --bg-modal-overlay: rgba(0, 0, 0, 0.5);

    /* Text */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-sidebar: #94a3b8;
    --text-sidebar-active: #ffffff;
    --text-on-primary: #ffffff;

    /* Borders */
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --border-input: #cbd5e1;
    --border-focus: var(--primary);

    /* Radius */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

    /* Sidebar */
    --sidebar-width: 260px;

    /* Transitions */
    --transition: 0.2s ease;
}

/* --- Dark Theme --- */
[data-theme="dark"] {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #1e3a5f;
    --primary-ghost: rgba(59, 130, 246, 0.1);

    --success-light: #052e16;
    --warning-light: #451a03;
    --danger-light: #450a0a;
    --info-light: #083344;

    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-sidebar: #020617;
    --bg-sidebar-hover: #0f172a;
    --bg-input: #1e293b;
    --bg-hover: #334155;

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border: #334155;
    --border-light: #1e293b;
    --border-input: #475569;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --- Auth Screen --- */
.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-brand {
    text-align: center;
    margin-bottom: 32px;
    color: #fff;
}

.auth-logo {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 28px;
}

.auth-brand h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.auth-brand p {
    color: #94a3b8;
    font-size: 15px;
}

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
}

.auth-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-body);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.auth-tab.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* --- Forms --- */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    width: 22px;
    text-align: center;
    z-index: 1;
    pointer-events: none;
}

.input-icon > input,
.input-icon > select {
    padding-left: 56px !important;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1.5px solid var(--border-input);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--primary-ghost);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    line-height: 1.4;
}

.btn i {
    font-size: 16px;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
}

.btn-ghost:hover {
    background: var(--bg-hover);
    border-color: var(--border-input);
}

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

.btn-sm i {
    font-size: 14px;
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* --- Alerts --- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-top: 12px;
}

.alert-error {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.alert-success {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid rgba(22, 163, 74, 0.2);
}

.alert-info {
    background: var(--info-light);
    color: var(--info);
    border: 1px solid rgba(8, 145, 178, 0.2);
}

/* --- Layout --- */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px 20px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.sidebar-logo i {
    font-size: 22px;
    color: var(--primary);
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--text-sidebar);
    font-size: 20px;
    cursor: pointer;
}

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

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius);
    color: var(--text-sidebar);
    font-size: 14px;
    font-weight: 400;
    transition: var(--transition);
    text-decoration: none;
    margin-bottom: 2px;
    position: relative;
}

.nav-item:hover {
    background: var(--bg-sidebar-hover);
    color: #e2e8f0;
    text-decoration: none;
}

.nav-item.active {
    background: var(--bg-sidebar-active);
    color: var(--text-sidebar-active);
    font-weight: 500;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.nav-item i {
    font-size: 18px;
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    min-width: 20px;
    text-align: center;
}

.nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 12px 14px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 14px 8px;
}

.sidebar-footer {
    padding: 16px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    color: #64748b;
    font-size: 11px;
}

.sidebar-footer .btn-ghost {
    color: var(--text-sidebar);
    border-color: rgba(255, 255, 255, 0.1);
    padding: 6px 8px;
}

.sidebar-footer .btn-ghost:hover {
    background: var(--bg-sidebar-hover);
    color: var(--danger);
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    height: 60px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-menu {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
}

.topbar-title {
    font-size: 18px;
    font-weight: 600;
    flex: 1;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
    position: relative;
}

.topbar-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.topbar-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: var(--radius-full);
    min-width: 16px;
    text-align: center;
    line-height: 1.4;
}

.content-area {
    flex: 1;
    padding: 24px;
}

/* --- Cards --- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-header h3 {
    font-size: 15px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Stat Cards --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-icon.orange { background: var(--warning-light); color: var(--warning); }
.stat-icon.red { background: var(--danger-light); color: var(--danger); }
.stat-icon.cyan { background: var(--info-light); color: var(--info); }

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* --- Tables --- */
.table-container {
    overflow-x: auto;
}

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

thead th {
    text-align: left;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

tbody td {
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

tbody tr:hover {
    background: var(--bg-hover);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* --- Badge / Tag --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-muted { background: var(--border-light); color: var(--text-muted); }

/* --- Toggle Switch --- */
.toggle {
    position: relative;
    width: 40px;
    height: 22px;
    cursor: pointer;
}

.toggle input {
    display: none;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--text-muted);
    border-radius: 22px;
    transition: var(--transition);
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    top: 3px;
    background: #fffdf8;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.toggle input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle input:checked + .toggle-slider::after {
    transform: translateX(18px);
}

[data-theme="dark"] .toggle-slider {
    background: var(--border-input);
}

/* --- Message Card --- */
.message-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 12px;
    transition: var(--transition);
}

.message-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--border-input);
}

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.message-group {
    font-size: 12px;
    font-weight: 500;
    color: var(--primary);
}

.message-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
}

.message-content {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 10px;
    word-break: break-word;
    white-space: pre-wrap;
}

.message-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.message-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--primary);
    word-break: break-all;
    padding: 4px 8px;
    background: var(--primary-ghost);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.message-link:hover {
    background: var(--primary-light);
    text-decoration: none;
}

.message-link i {
    flex-shrink: 0;
    font-size: 14px;
}

/* --- Notification Item --- */
.notif-item {
    display: flex;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
    cursor: pointer;
}

.notif-item:hover {
    background: var(--bg-hover);
}

.notif-item.unread {
    background: var(--primary-ghost);
    border-left: 3px solid var(--primary);
}

.notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
    margin-top: 6px;
}

.notif-item:not(.unread) .notif-dot {
    background: var(--border);
}

.notif-body {
    flex: 1;
    min-width: 0;
}

.notif-filter {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 2px;
}

.notif-text {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

/* --- Filter Card --- */
.filter-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.filter-card:hover {
    box-shadow: var(--shadow);
}

.filter-info {
    flex: 1;
    min-width: 0;
}

.filter-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.filter-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
}

.filter-keyword {
    padding: 2px 8px;
    background: var(--primary-ghost);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
}

.filter-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.filter-meta i {
    font-size: 14px;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-modal-overlay);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

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

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* --- Toast --- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInRight 0.3s ease;
    min-width: 280px;
    max-width: 420px;
}

.toast-success {
    background: var(--success);
    color: #fff;
}

.toast-error {
    background: var(--danger);
    color: #fff;
}

.toast-info {
    background: var(--primary);
    color: #fff;
}

.toast.removing {
    animation: slideOutRight 0.3s ease forwards;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 0;
}

.pagination button {
    min-width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination button:hover:not(:disabled) {
    background: var(--primary-ghost);
    border-color: var(--primary);
    color: var(--primary);
}

.pagination button.active {
    background: var(--primary);
    color: var(--text-on-primary);
    border-color: var(--primary);
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* --- Search / Toolbar --- */
.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
}

.search-box input {
    padding-left: 44px !important;
    padding-right: 14px;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 16px;
}

/* --- Loading Spinner --- */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    flex-direction: column;
    gap: 12px;
    color: var(--text-muted);
}

.page-loading {
    min-height: 280px;
}

.price-analysis {
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid var(--primary-light);
    border-radius: var(--radius);
    background: var(--primary-ghost);
}

.price-analysis-pending {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.price-analysis-pending i {
    color: var(--primary);
    animation: spin 1.2s linear infinite;
}

.price-analysis-muted {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

.price-analysis-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--primary-hover);
    font-size: 12px;
}

.price-analysis-heading span {
    margin-left: auto;
    padding: 4px 7px;
    border-radius: 3px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
}

.price-analysis-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.price-analysis-grid div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.price-analysis-grid small {
    color: var(--text-muted);
    font-size: 10px;
}

.price-analysis-grid strong {
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 15px;
}

.price-analysis-note {
    display: block;
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 11px;
}

.price-analysis-product {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 12px;
}

.price-analysis-title {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.price-analysis-meta {
    color: var(--text-secondary);
    font-size: 11px;
}

.price-analysis-confidence {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
}

.price-analysis-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.price-analysis-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.price-analysis-link:hover {
    background: var(--primary-light);
    color: var(--primary-hover);
}

@media (max-width: 600px) {
    .price-analysis-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* --- Grid Section --- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header h3 {
    font-size: 16px;
    font-weight: 600;
}

/* --- Inline Form --- */
.inline-form {
    display: grid;
    gap: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 8px;
}

/* --- Animations --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Sidebar Overlay (Mobile) --- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .sidebar.open ~ .sidebar-overlay {
        display: block;
    }

    .sidebar-close {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .topbar-menu {
        display: block;
    }

    .content-area {
        padding: 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .filter-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: auto;
    }
}

/* --- Utility --- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* --- Editorial page headings and filter states --- */
.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.settings-section {
    margin-bottom: 18px;
}

.page-heading h1 {
    margin-top: 8px;
    font-size: clamp(32px, 4vw, 50px);
    line-height: 1;
}

.page-heading p {
    max-width: 340px;
    margin-bottom: 3px;
    color: var(--text-secondary);
    font-size: 13px;
    text-align: right;
}

.filter-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.filter-status {
    padding: 3px 7px;
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.filter-status.is-active {
    border-color: var(--primary-light);
    background: var(--primary-light);
    color: var(--primary-hover);
}

@media (max-width: 600px) {
    .page-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .page-heading p {
        margin: 0;
        text-align: left;
    }
}

/* ============================================================
   Editorial Commerce — Fırsat Filtre redesign
   ============================================================ */
:root {
    --font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Space Grotesk', 'DM Sans', sans-serif;
    --primary: #e4572e;
    --primary-hover: #c84521;
    --primary-light: #f8d9ce;
    --primary-ghost: rgba(228, 87, 46, 0.1);
    --success: #2f7d5b;
    --success-light: #dceee4;
    --warning: #b47722;
    --warning-light: #f6ead1;
    --danger: #b94735;
    --danger-light: #f6ddd8;
    --info: #416d83;
    --info-light: #dce9ee;
    --bg-body: #f6f1e8;
    --bg-card: #fffdf8;
    --bg-sidebar: #202124;
    --bg-sidebar-hover: #2c2d2f;
    --bg-sidebar-active: #e4572e;
    --bg-input: #fffdf8;
    --bg-hover: #f0e9de;
    --bg-modal-overlay: rgba(32, 33, 36, 0.58);
    --text-primary: #202124;
    --text-secondary: #5f605f;
    --text-muted: #8a887f;
    --text-sidebar: #b9b5aa;
    --text-sidebar-active: #fffdf8;
    --text-on-primary: #fffdf8;
    --border: #dfd8cc;
    --border-light: #eee8dd;
    --border-input: #c9c1b4;
    --border-focus: var(--primary);
    --radius-sm: 3px;
    --radius: 5px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 0 rgba(32, 33, 36, 0.06);
    --shadow: 0 5px 18px rgba(63, 52, 37, 0.07);
    --shadow-md: 0 12px 28px rgba(63, 52, 37, 0.11);
    --shadow-lg: 0 22px 60px rgba(32, 33, 36, 0.18);
    --sidebar-width: 248px;
    --transition: 0.18s ease;
}

[data-theme="dark"] {
    --primary: #f07850;
    --primary-hover: #e4572e;
    --primary-light: #4d2921;
    --primary-ghost: rgba(240, 120, 80, 0.12);
    --success-light: #183a2b;
    --warning-light: #403018;
    --danger-light: #42211c;
    --info-light: #1c3540;
    --bg-body: #1c1d1e;
    --bg-card: #252627;
    --bg-sidebar: #111213;
    --bg-sidebar-hover: #292a2b;
    --bg-sidebar-active: #e4572e;
    --bg-input: #252627;
    --bg-hover: #303132;
    --text-primary: #f6f1e8;
    --text-secondary: #c4beb3;
    --text-muted: #8d8980;
    --border: #414143;
    --border-light: #303132;
    --border-input: #5a5958;
    --shadow: 0 5px 18px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 22px 60px rgba(0, 0, 0, 0.38);
}

body {
    letter-spacing: -0.01em;
}

h1, h2, h3, h4, .auth-brand h1, .topbar-title, .stat-value {
    font-family: var(--font-display);
    letter-spacing: -0.045em;
}

.auth-screen {
    align-items: stretch;
    justify-content: stretch;
    background: var(--bg-body);
    padding: 0;
}

.auth-container {
    max-width: none;
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
}

.auth-brand {
    margin: 0;
    padding: clamp(42px, 7vw, 96px);
    background: var(--bg-sidebar);
    color: var(--text-sidebar-active);
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-brand::after {
    content: 'FIRSAT';
    position: absolute;
    right: -28px;
    bottom: 7%;
    font-family: var(--font-display);
    font-size: clamp(90px, 15vw, 220px);
    line-height: 0.8;
    font-weight: 700;
    color: rgba(255, 253, 248, 0.05);
    letter-spacing: -0.08em;
}

.auth-logo {
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    background: var(--primary);
    margin-bottom: 0;
    font-size: 23px;
}

.auth-brand h1 {
    max-width: 520px;
    font-size: clamp(42px, 6vw, 84px);
    line-height: 0.94;
    margin: auto 0 14px;
    font-weight: 700;
}

.auth-brand p {
    max-width: 360px;
    color: #c4beb3;
    font-size: 16px;
    line-height: 1.5;
}

.auth-card {
    align-self: center;
    width: min(100% - 64px, 440px);
    margin: auto;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.auth-tabs {
    background: transparent;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    padding: 0;
    margin-bottom: 30px;
    gap: 20px;
}

.auth-tab {
    flex: 0 0 auto;
    padding: 0 0 12px;
    border-radius: 0;
    font-size: 14px;
}

.auth-tab.active {
    color: var(--text-primary);
    background: transparent;
    box-shadow: inset 0 -2px 0 var(--primary);
}

.form-group {
    gap: 7px;
}

.form-group label {
    color: var(--text-primary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="date"],
select,
textarea {
    border-radius: var(--radius);
    background: var(--bg-input);
    padding: 12px 14px;
}

.input-icon > input[type="text"],
.input-icon > input[type="email"],
.input-icon > input[type="password"] {
    padding-left: 56px !important;
}

.btn {
    border-radius: var(--radius);
    padding: 11px 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow);
}

.btn-ghost {
    border-color: var(--border);
}

.app-layout {
    background:
        linear-gradient(90deg, rgba(228, 87, 46, 0.035) 1px, transparent 1px) 0 0 / 80px 80px,
        var(--bg-body);
}

.sidebar {
    box-shadow: 8px 0 28px rgba(32, 33, 36, 0.08);
}

.sidebar-header {
    padding: 26px 22px 32px;
}

.sidebar-logo {
    font-family: var(--font-display);
    letter-spacing: -0.04em;
}

.sidebar-logo i {
    color: var(--primary);
}

.sidebar-nav {
    padding: 0 14px;
}

.nav-item {
    border-radius: var(--radius);
    padding: 11px 13px;
    margin-bottom: 4px;
}

.nav-item.active {
    background: var(--bg-sidebar-active);
}

.nav-item.active::before {
    display: none;
}

.nav-section-title {
    color: #77746c;
    letter-spacing: 0.12em;
}

.sidebar-footer {
    padding: 18px 18px 22px;
}

.user-avatar {
    border-radius: var(--radius);
    background: var(--primary);
}

.main-content {
    background: transparent;
}

.topbar {
    height: 76px;
    background: rgba(246, 241, 232, 0.88);
    border-bottom: 1px solid var(--border);
    padding: 0 34px;
    backdrop-filter: blur(14px);
}

[data-theme="dark"] .topbar {
    background: rgba(28, 29, 30, 0.88);
}

.topbar-title {
    font-size: 22px;
    font-weight: 700;
}

.topbar-btn {
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.content-area {
    max-width: 1480px;
    width: 100%;
    padding: 34px;
    margin: 0 auto;
}

.card, .stat-card {
    border-radius: var(--radius-md);
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.card-header {
    padding: 19px 22px;
}

.card-header h3 {
    font-family: var(--font-display);
    font-size: 17px;
}

.card-body {
    padding: 22px;
}

.stats-grid {
    gap: 14px;
    margin-bottom: 28px;
}

.stat-card {
    position: relative;
    padding: 21px;
    min-height: 116px;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    width: 70px;
    height: 70px;
    right: -28px;
    bottom: -30px;
    border: 1px solid var(--border);
    transform: rotate(45deg);
}

.stat-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius);
}

.stat-icon.blue, .stat-icon.green, .stat-icon.orange, .stat-icon.red, .stat-icon.cyan {
    background: var(--primary-light);
    color: var(--primary);
}

.stat-value {
    font-size: 30px;
}

.stat-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 10px;
    font-weight: 700;
}

.section-header {
    margin-bottom: 22px;
}

.section-header h3 {
    font-family: var(--font-display);
    font-size: 24px;
}

.filter-card, .message-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.filter-card:hover, .message-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.filter-keyword {
    border-radius: 3px;
    background: var(--primary-light);
    color: var(--primary-hover);
    font-weight: 700;
}

.toolbar {
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.search-box input {
    background: var(--bg-body);
}

.message-content, .notif-text {
    line-height: 1.7;
}

.message-link {
    border-radius: 3px;
    background: var(--primary-light);
    color: var(--primary-hover);
}

.badge {
    border-radius: 3px;
    letter-spacing: 0.02em;
}

.empty-state {
    padding: 70px 24px;
}

.empty-state i {
    color: var(--primary);
    opacity: 0.75;
}

.modal {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

.modal-header h3 {
    font-family: var(--font-display);
}

.toast {
    border-radius: var(--radius);
}

@media (max-width: 900px) {
    .auth-container {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        min-height: 260px;
        padding: 34px;
    }

    .auth-brand h1 {
        font-size: 48px;
        margin-top: 46px;
    }

    .auth-brand::after {
        font-size: 100px;
        bottom: 10px;
    }

    .auth-card {
        padding: 46px 0;
    }
}

@media (max-width: 768px) {
    .topbar {
        height: 64px;
        padding: 0 18px;
    }

    .topbar-title {
        font-size: 19px;
    }

    .content-area {
        padding: 22px 16px 32px;
    }
}

@media (max-width: 480px) {
    .auth-card {
        width: calc(100% - 40px);
    }

    .auth-brand {
        min-height: 220px;
        padding: 24px 20px;
    }

    .auth-brand h1 {
        font-size: 39px;
    }

    .stats-grid {
        gap: 10px;
    }

    .stat-card {
        min-height: 102px;
        padding: 16px;
    }

    .stat-value {
        font-size: 25px;
    }

    .toolbar {
        padding: 10px;
    }

    .dashboard-feed .card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-feed .card-header .btn {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .auth-brand h1 {
        margin-top: 42px;
    }
}

/* --- Editorial dashboard --- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
}

.dashboard-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 18px;
}

.dashboard-intro h1 {
    max-width: 700px;
    margin: 10px 0 12px;
    font-size: clamp(34px, 4.5vw, 62px);
    line-height: 0.98;
}

.dashboard-intro h1 em {
    color: var(--primary);
    font-style: normal;
}

.dashboard-intro p {
    max-width: 520px;
    color: var(--text-secondary);
    font-size: 15px;
}

.dashboard-intro-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    color: var(--text-muted);
    font-size: 12px;
    white-space: nowrap;
}

.dashboard-intro-meta strong {
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 15px;
}

.dashboard-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.stat-card .stat-kicker {
    position: absolute;
    top: 14px;
    right: 16px;
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.stat-card .stat-kicker.accent {
    color: var(--primary);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
    align-items: start;
    gap: 18px;
}

.dashboard-feed .card-header {
    align-items: flex-end;
}

.dashboard-feed .card-header .eyebrow {
    display: block;
    margin-bottom: 4px;
}

.dashboard-aside {
    display: grid;
    gap: 18px;
}

.pulse-card {
    padding: 22px;
    background: var(--bg-sidebar);
    border-color: var(--bg-sidebar);
    color: #fffdf8;
}

.pulse-card .eyebrow {
    color: #f07850;
}

.pulse-value {
    margin-top: 26px;
    font-family: var(--font-display);
    font-size: 46px;
    font-weight: 700;
    letter-spacing: -0.07em;
    line-height: 1;
}

.pulse-card p {
    color: #b9b5aa;
    font-size: 12px;
}

.pulse-rule {
    height: 1px;
    margin: 24px 0 16px;
    background: rgba(255, 253, 248, 0.16);
}

.pulse-rule span {
    display: block;
    width: 38%;
    height: 2px;
    background: var(--primary);
}

.pulse-meta {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 7px 0;
    color: #b9b5aa;
    font-size: 12px;
}

.pulse-meta strong {
    color: #fffdf8;
    font-family: var(--font-display);
}

.quick-card {
    padding: 22px;
}

.quick-card .eyebrow {
    margin-bottom: 10px;
}

.quick-card button {
    display: grid;
    grid-template-columns: 20px 1fr 16px;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 13px 0;
    border: 0;
    border-top: 1px solid var(--border-light);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    text-align: left;
}

.quick-card button:hover {
    color: var(--primary);
}

.quick-card button i:last-child {
    font-size: 14px;
    color: var(--text-muted);
}

@media (max-width: 980px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 600px) {
    .dashboard-intro {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .dashboard-intro h1 {
        font-size: 39px;
    }

    .dashboard-intro-meta {
        align-items: flex-start;
    }

    .dashboard-actions {
        flex-wrap: wrap;
    }

    .dashboard-actions .btn {
        flex: 1;
    }

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