/* =============================================================
   orderly_takip — Tema CSS
   Orderly marka kimliği + AISTECH buton karakteri
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

/* Rotonto — AISTECH kurumsal kimlik fontu */
@font-face {
    font-family: 'Rotonto';
    src: url('../fonts/Rotonto-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* -------------------------------------------------------------
   1. CSS Değişkenleri
   ------------------------------------------------------------- */
:root {
    /* Primary — Orderly orange */
    --brand-50:  #fef4f1;
    --brand-100: #fee7dd;
    --brand-200: #fdd5c2;
    --brand-400: #f07c3f;
    --brand-500: #ea580c;
    --brand-600: #d84f07;
    --brand-700: #c74603;

    /* Accent — Orderly coral */
    --coral-400: #f97159;
    --coral-500: #FF6348;

    /* AISTECH kurumsal mint (aistech.com.tr ile bire bir) */
    --aistech-500: #04BF9D;
    --aistech-600: #05C09E;
    --aistech-light: #65f7d2;

    /* Surface / nötr */
    --surface-900: #111827;
    --surface-700: #374151;
    --surface-600: #4b5563;
    --surface-500: #6b7280;
    --surface-400: #9ca3af;
    --surface-300: #d1d5db;
    --surface-200: #e5e7eb;
    --surface-100: #f3f4f6;
    --surface-50:  #f9fafb;
    --white:       #ffffff;

    /* Semantik */
    --success:      #10b981;
    --success-dark: #065f46;
    --success-bg:   #d1fae5;
    --warning:      #f59e0b;
    --warning-dark: #92400e;
    --warning-bg:   #fef3c7;
    --danger:       #ef4444;
    --danger-dark:  #991b1b;
    --danger-bg:    #fee2e2;
    --info:         #3b82f6;
    --info-dark:    #1e40af;
    --info-bg:      #dbeafe;
    --reminder-green: #22c55e;

    /* Radius */
    --r-sm: 8px;
    --r-md: 10px;
    --r-lg: 12px;
    --r-xl: 16px;
    --r-2xl: 20px;
    --r-pill: 999px;

    /* Shadow */
    --sh-sm: 0 1px 2px rgba(0,0,0,0.04);
    --sh-md: 0 1px 2px rgba(0,0,0,0.03), 0 4px 8px -2px rgba(0,0,0,0.04);
    --sh-lg: 0 10px 30px -8px rgba(0,0,0,0.12);
    --sh-brand: 0 4px 20px -4px rgba(234, 88, 12, 0.2);

    /* Transitions */
    --easing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* AISTECH marka yazısı — aistech.com.tr ile bire bir tutarlı */
.aistech-logo-text {
    font-family: "Rotonto", "Manrope", sans-serif;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--aistech-500);
}

/* -------------------------------------------------------------
   2. Reset / Base
   ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--surface-900);
    background: var(--surface-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
a { color: var(--brand-500); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--brand-700); }
input, select, textarea { font: inherit; color: inherit; }

/* -------------------------------------------------------------
   3. Tipografi
   ------------------------------------------------------------- */
.display { font-size: 3rem;     font-weight: 800; line-height: 1.1;  letter-spacing: -0.02em; }
.h1       { font-size: 2.25rem;  font-weight: 700; line-height: 1.2;  letter-spacing: -0.02em; }
.h2       { font-size: 1.75rem;  font-weight: 700; line-height: 1.25; letter-spacing: -0.015em; }
.h3       { font-size: 1.375rem; font-weight: 700; line-height: 1.3; }
.h4       { font-size: 1.125rem; font-weight: 600; line-height: 1.4; }
.body-lg  { font-size: 17px;     font-weight: 400; line-height: 1.6; }
.body     { font-size: 15px;     font-weight: 400; line-height: 1.5; }
.small    { font-size: 13px;     font-weight: 500; line-height: 1.4; }
.caption  { font-size: 12px;     font-weight: 600; line-height: 1.3; letter-spacing: 0.02em; }

h1, h2, h3, h4 { margin: 0 0 0.5em; color: var(--surface-900); }
p  { margin: 0 0 1em; }

.muted       { color: var(--surface-500); }
.text-center { text-align: center; }
.text-right  { text-align: right; }

.orderly-brand {
    background: linear-gradient(90deg, var(--brand-500) 0%, var(--coral-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* -------------------------------------------------------------
   4. Butonlar
   ------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-family: inherit;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.01em;
    border: 1px solid transparent;
    border-radius: var(--r-lg);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.35s var(--easing);
    white-space: nowrap;
    user-select: none;
}
.btn:disabled,
.btn.disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }

.btn-primary {
    background: linear-gradient(135deg, var(--brand-500) 0%, var(--coral-500) 50%, var(--brand-500) 100%);
    background-size: 200% 200%;
    background-position: 0% 50%;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow:
        inset 0 1px 2px rgba(255,255,255,0.4),
        inset 0 -1px 1px rgba(0,0,0,0.05),
        0 2px 8px rgba(234, 88, 12, 0.2),
        0 4px 20px -4px rgba(234, 88, 12, 0.3);
}
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: left 0.5s var(--easing);
}
.btn-primary:hover {
    background-position: 100% 50%;
    transform: translateY(-2px);
    color: var(--white);
    box-shadow:
        inset 0 1px 2px rgba(255,255,255,0.45),
        0 4px 15px rgba(234, 88, 12, 0.3),
        0 8px 30px -6px rgba(234, 88, 12, 0.4);
}
.btn-primary:hover::before { left: 100%; }
.btn-primary:active { transform: translateY(0); }

.btn-outline {
    background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(234, 88, 12, 0.04) 100%);
    color: var(--brand-600);
    border: 1px solid rgba(234, 88, 12, 0.25);
    box-shadow:
        inset 0 1px 2px rgba(255,255,255,0.6),
        0 2px 8px rgba(234, 88, 12, 0.06);
}
.btn-outline:hover {
    border-color: rgba(234, 88, 12, 0.45);
    transform: translateY(-2px);
    color: var(--brand-700);
    box-shadow:
        inset 0 1px 2px rgba(255,255,255,0.7),
        0 4px 12px rgba(234, 88, 12, 0.12);
}

.btn-ghost {
    background: transparent;
    color: var(--surface-600);
    padding: 8px 14px;
    font-weight: 500;
    font-size: 14px;
    border-radius: var(--r-md);
}
.btn-ghost:hover { background: var(--surface-100); color: var(--surface-900); }

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: var(--white);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}
.btn-danger:hover {
    transform: translateY(-2px);
    color: var(--white);
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.35);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: var(--white);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}
.btn-success:hover { transform: translateY(-2px); color: var(--white); }

.btn-sm { padding: 8px 16px;  font-size: 13px; border-radius: var(--r-md); }
.btn-md { padding: 12px 28px; font-size: 15px; }
.btn-lg { padding: 14px 32px; font-size: 17px; }
.btn-block { display: flex; width: 100%; }
.btn-icon  { padding: 8px; width: 36px; height: 36px; }

/* -------------------------------------------------------------
   5. Kartlar
   ------------------------------------------------------------- */
.card {
    background: var(--white);
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: var(--r-xl);
    padding: 24px;
    box-shadow: var(--sh-md);
    transition: all 0.25s var(--easing);
}
.card:hover {
    border-color: var(--brand-200);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px -2px rgba(234, 88, 12, 0.08);
}
.card-flat { box-shadow: none; }
.card-flat:hover { transform: none; box-shadow: none; border-color: var(--surface-200); }

.card-featured {
    position: relative;
    border: 3px solid var(--brand-200);
    box-shadow: var(--sh-brand);
}
.card-featured::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-400), var(--brand-500), var(--brand-700));
    border-radius: var(--r-xl) var(--r-xl) 0 0;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -24px -24px 20px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--surface-200);
}
.card-header h3 { margin: 0; font-size: 1.05rem; }
.card-body { }
.card-footer {
    margin: 20px -24px -24px;
    padding: 16px 24px;
    border-top: 1px solid var(--surface-200);
    background: var(--surface-50);
    border-radius: 0 0 var(--r-xl) var(--r-xl);
}

/* Dashboard istatistik kartı */
.stat-card {
    background: var(--white);
    border: 1px solid var(--surface-200);
    border-radius: var(--r-xl);
    padding: 20px;
    box-shadow: var(--sh-sm);
    transition: all 0.25s var(--easing);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: linear-gradient(180deg, var(--brand-400), var(--brand-600));
    opacity: 0.8;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -8px rgba(234, 88, 12, 0.18);
    border-color: var(--brand-200);
}
.stat-label {
    font-size: 12.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--surface-500);
    margin-bottom: 8px;
}
.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--surface-900);
    line-height: 1.1;
}
.stat-sub { font-size: 13px; color: var(--surface-500); margin-top: 6px; }
.stat-trend { font-size: 13px; font-weight: 600; margin-top: 6px; }
.stat-trend.success { color: var(--success-dark); }
.stat-trend.danger  { color: var(--danger-dark); }

/* -------------------------------------------------------------
   6. Form Elemanları
   ------------------------------------------------------------- */
.label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--surface-700);
    margin-bottom: 6px;
}
.label-required::after { content: ' *'; color: var(--danger); }

.input, .select, .textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--surface-200);
    border-radius: var(--r-md);
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--surface-900);
    background: var(--white);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
    transition: border-color 0.18s var(--easing), box-shadow 0.18s var(--easing), background 0.18s;
    appearance: none;
    -webkit-appearance: none;
}
.input:hover, .select:hover, .textarea:hover {
    border-color: var(--surface-300);
}
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--brand-500);
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.14), 0 1px 2px rgba(15, 23, 42, 0.04);
}
.input::placeholder, .textarea::placeholder { color: var(--surface-400); font-weight: 400; }
.input:disabled, .select:disabled, .textarea:disabled {
    background-color: var(--surface-50);
    color: var(--surface-500);
    cursor: not-allowed;
    box-shadow: none;
}
.input[readonly], .textarea[readonly] {
    background-color: var(--surface-50);
    color: var(--surface-700);
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}
.select:focus {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ea580c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

/* Size variants */
.input.input-sm, .select.input-sm { padding: 8px 12px; font-size: 13px; height: 36px; }
.select.input-sm { padding-right: 34px; background-position: right 10px center; background-size: 14px; }
.input[type="date"], .input[type="time"] { cursor: pointer; }
.input[type="number"] { font-variant-numeric: tabular-nums; }

.input.error, .select.error, .textarea.error { border-color: var(--danger); }
.form-error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 4px;
    font-weight: 500;
}
.form-hint {
    color: var(--surface-500);
    font-size: 13px;
    margin-top: 4px;
}
.form-group { margin-bottom: 18px; }

/* Checkbox & Radio */
.checkbox, .radio {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 14.5px;
    color: var(--surface-700);
}
.checkbox input, .radio input {
    width: 18px; height: 18px;
    accent-color: var(--brand-500);
    cursor: pointer;
}

/* Input with prefix (₺, $) */
.input-group { position: relative; }
.input-group .prefix {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--surface-500);
    font-weight: 600;
    pointer-events: none;
}
.input-group .input { padding-left: 32px; }

/* -------------------------------------------------------------
   7. Tablolar
   ------------------------------------------------------------- */
.table-wrap {
    background: var(--white);
    border-radius: var(--r-xl);
    overflow: auto;
    box-shadow: var(--sh-sm);
    border: 1px solid var(--surface-200);
}
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.table thead {
    background: var(--surface-50);
    border-bottom: 1px solid var(--surface-200);
}
.table th {
    padding: 14px 18px;
    text-align: left;
    font-weight: 700;
    font-size: 12px;
    color: var(--surface-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--surface-200);
}
.table td {
    padding: 14px 18px;
    font-size: 14.5px;
    color: var(--surface-900);
    border-bottom: 1px solid var(--surface-100);
    vertical-align: middle;
}
.table tbody tr { transition: background 0.15s; }
.table tbody tr:hover { background: var(--brand-50); }
.table tbody tr:last-child td { border-bottom: none; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

/* -------------------------------------------------------------
   8. Badge
   ------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--r-pill);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: var(--surface-100);
    color: var(--surface-700);
    white-space: nowrap;
}
.badge-success { background: var(--success-bg); color: var(--success-dark); }
.badge-warning { background: var(--warning-bg); color: var(--warning-dark); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger-dark); }
.badge-info    { background: var(--info-bg);    color: var(--info-dark); }
.badge-brand   { background: var(--brand-100);  color: var(--brand-700); }
.badge-neutral { background: var(--surface-100);color: var(--surface-700); }

/* -------------------------------------------------------------
   9. Layout — Sidebar + İçerik
   ------------------------------------------------------------- */
.app-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}
.sidebar {
    background: var(--white);
    border-right: 1px solid var(--surface-200);
    padding: 20px 12px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 18px;
    border-bottom: 1px solid var(--surface-100);
}
.sidebar-logo img { width: 36px; height: 36px; border-radius: 8px; }
.sidebar-logo .brand-text {
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.02em;
    line-height: 1;
}
.sidebar-logo .brand-text .suffix {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--surface-500);
    letter-spacing: 0.08em;
    margin-top: 3px;
    text-transform: uppercase;
}

.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sidebar-section-label {
    padding: 14px 14px 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--surface-400);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--r-md);
    color: var(--surface-600);
    font-weight: 500;
    font-size: 14.5px;
    transition: all 0.2s var(--easing);
    text-decoration: none;
    border-left: 3px solid transparent;
    padding-left: 11px;
}
.sidebar-item:hover {
    background: var(--surface-50);
    color: var(--surface-900);
}
.sidebar-item.active {
    background: linear-gradient(90deg, var(--brand-50) 0%, var(--brand-100) 100%);
    color: var(--brand-700);
    font-weight: 600;
    border-left-color: var(--brand-500);
}
.sidebar-item .icon { flex: 0 0 20px; height: 20px; color: currentColor; }
.sidebar-item .count {
    margin-left: auto;
    background: var(--brand-100);
    color: var(--brand-700);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--r-pill);
}

.sidebar-footer {
    padding-top: 12px;
    border-top: 1px solid var(--surface-100);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Ana içerik alanı */
.app-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px;
    background: var(--white);
    border-bottom: 1px solid var(--surface-200);
    position: sticky;
    top: 0;
    z-index: 50;
    gap: 20px;
}
.app-header .page-title { font-size: 1.25rem; font-weight: 700; margin: 0; }
.app-header .header-actions { display: flex; align-items: center; gap: 12px; }

.app-content {
    flex: 1;
    padding: 28px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.page-header h1 { margin: 0; }
.page-header .subtitle { color: var(--surface-500); font-size: 14px; margin-top: 4px; }
.page-header .page-actions { display: flex; gap: 10px; }

/* -------------------------------------------------------------
   10. Hatırlatıcı İkon
   ------------------------------------------------------------- */
.reminder-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: var(--r-pill);
    background: var(--surface-100);
    color: var(--surface-600);
    cursor: pointer;
    transition: all 0.2s var(--easing);
    border: none;
}
.reminder-icon:hover { background: var(--brand-50); color: var(--brand-700); }
.reminder-icon svg { width: 20px; height: 20px; }
.reminder-icon.has-reminders::after {
    content: '';
    position: absolute;
    top: 6px; right: 6px;
    width: 12px; height: 12px;
    background: var(--reminder-green);
    border: 2px solid var(--white);
    border-radius: 50%;
    animation: pulse-green 1.4s ease-in-out infinite;
}
@keyframes pulse-green {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
        transform: scale(1.15);
    }
}

.reminder-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 380px;
    background: var(--white);
    border-radius: var(--r-xl);
    border: 1px solid var(--surface-200);
    box-shadow: var(--sh-lg);
    z-index: 100;
    max-height: 480px;
    overflow-y: auto;
    display: none;
}
.reminder-dropdown.open { display: block; animation: fade-in 0.2s ease; }
.reminder-dropdown-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--surface-100);
    font-weight: 700;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.reminder-item {
    padding: 12px 18px;
    border-bottom: 1px solid var(--surface-100);
    display: flex;
    gap: 10px;
    transition: background 0.15s;
    cursor: pointer;
}
.reminder-item:hover { background: var(--surface-50); }
.reminder-item:last-child { border-bottom: none; }
.reminder-item .time {
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-600);
    white-space: nowrap;
}
.reminder-item .title { font-weight: 600; margin-bottom: 2px; font-size: 14px; }
.reminder-item .desc { font-size: 13px; color: var(--surface-500); }

/* -------------------------------------------------------------
   11. Modal
   ------------------------------------------------------------- */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(17, 24, 39, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.open { display: flex; animation: fade-in 0.2s ease; }
.modal {
    background: var(--white);
    border-radius: var(--r-2xl);
    padding: 28px;
    max-width: 540px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px -12px rgba(0,0,0,0.25);
    animation: scale-in 0.25s var(--easing);
}
.modal-title { font-size: 1.25rem; font-weight: 700; margin: 0 0 18px; }
.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--surface-100);
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes scale-in {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* -------------------------------------------------------------
   12. Alert / Flash
   ------------------------------------------------------------- */
.alert {
    padding: 14px 18px;
    border-radius: var(--r-lg);
    margin-bottom: 16px;
    border-left: 4px solid;
    font-size: 14.5px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.alert-success { background: var(--success-bg); border-color: var(--success); color: var(--success-dark); }
.alert-warning { background: var(--warning-bg); border-color: var(--warning); color: var(--warning-dark); }
.alert-danger  { background: var(--danger-bg);  border-color: var(--danger);  color: var(--danger-dark); }
.alert-info    { background: var(--info-bg);    border-color: var(--info);    color: var(--info-dark); }

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    padding: 14px 20px;
    border-radius: var(--r-lg);
    background: var(--white);
    border-left: 4px solid var(--brand-500);
    box-shadow: var(--sh-lg);
    min-width: 280px;
    max-width: 420px;
    animation: slide-in 0.3s var(--easing);
}
.toast.success { border-left-color: var(--success); }
.toast.danger  { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
@keyframes slide-in {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* -------------------------------------------------------------
   13. Grid / Yardımcılar
   ------------------------------------------------------------- */
.grid { display: grid; gap: 20px; }
.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }

.w-full { width: 100%; }
.hidden { display: none !important; }

/* -------------------------------------------------------------
   14. Login ekranı özel
   ------------------------------------------------------------- */
.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 20% 20%, rgba(234, 88, 12, 0.07) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 99, 72, 0.07) 0%, transparent 50%),
        var(--surface-50);
    padding: 20px;
}
.login-card {
    background: var(--white);
    border-radius: var(--r-2xl);
    padding: 40px 38px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px -20px rgba(234, 88, 12, 0.2);
    border: 1px solid rgba(234, 88, 12, 0.08);
}
.login-logo {
    text-align: center;
    margin-bottom: 24px;
}
.login-logo img { margin: 0 auto 12px; height: 56px; width: auto; }
.login-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
}
.login-sub {
    text-align: center;
    color: var(--surface-500);
    font-size: 14px;
    margin-bottom: 28px;
}

/* -------------------------------------------------------------
   15. Responsive
   ------------------------------------------------------------- */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed;
        left: -280px;
        width: 280px;
        z-index: 200;
        transition: left 0.3s var(--easing);
    }
    .sidebar.open { left: 0; }
    .app-header { padding: 12px 16px; }
    .app-content { padding: 18px 16px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .btn { padding: 10px 20px; font-size: 14px; }
}

/* Hamburger (mobile) */
.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--surface-200);
    border-radius: var(--r-md);
    padding: 8px;
    cursor: pointer;
}
@media (max-width: 768px) {
    .nav-toggle { display: inline-flex; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--surface-50); }
::-webkit-scrollbar-thumb { background: var(--surface-300); border-radius: 10px; border: 2px solid var(--surface-50); }
::-webkit-scrollbar-thumb:hover { background: var(--surface-400); }

/* -------------------------------------------------------------
   Filter Bar (liste sayfaları için kompakt filtre)
   ------------------------------------------------------------- */
.filter-bar {
    padding: 18px 20px;
    border: 1px solid var(--surface-200);
    background: var(--white);
    border-radius: var(--r-xl);
    box-shadow: 0 1px 2px rgba(15,23,42,.03);
}
.filter-bar:hover { transform: none; }
.filter-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr) 1fr 1fr auto;
    gap: 10px;
    align-items: center;
}
.filter-grid .input,
.filter-grid .select {
    height: 42px;
    padding: 0 12px;
    font-size: 14px;
    border-radius: var(--r-md);
}
.filter-grid .select { padding-right: 36px; }
.filter-grid .btn { height: 42px; white-space: nowrap; }
.filter-grid .filter-search {
    position: relative;
}
.filter-grid .filter-search .input { padding-left: 38px; }
.filter-grid .filter-search::before {
    content: '';
    position: absolute;
    left: 12px; top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280' stroke-width='2'><circle cx='11' cy='11' r='7'/><path d='m21 21-4.3-4.3'/></svg>");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
}
@media (max-width: 1100px) {
    .filter-grid { grid-template-columns: repeat(3, 1fr); }
    .filter-grid .filter-search { grid-column: span 3; }
    .filter-grid .btn { grid-column: span 3; }
}
@media (max-width: 640px) {
    .filter-grid { grid-template-columns: 1fr 1fr; }
    .filter-grid .filter-search,
    .filter-grid .btn { grid-column: span 2; }
}

/* -------------------------------------------------------------
   Empty State (boş liste ekranı)
   ------------------------------------------------------------- */
.empty-state {
    padding: 64px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.empty-state .empty-icon {
    width: 88px; height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-50), var(--brand-100));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-500);
    box-shadow: inset 0 0 0 1px var(--brand-100), 0 6px 16px rgba(234,88,12,.08);
}
.empty-state .empty-icon svg { width: 40px; height: 40px; }
.empty-state h3 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--surface-900);
    font-weight: 700;
}
.empty-state p {
    margin: 0;
    color: var(--surface-500);
    font-size: 14px;
    max-width: 380px;
    line-height: 1.5;
}
.empty-state .empty-actions { margin-top: 8px; display: flex; gap: 10px; }

/* -------------------------------------------------------------
   List card / toolbar
   ------------------------------------------------------------- */
.list-card { padding: 0; overflow: hidden; }
.list-card:hover { transform: none; }
.list-card .table { margin: 0; }
.list-card .table thead th {
    background: var(--surface-50);
    color: var(--surface-600);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.list-card .table tbody td { padding: 14px 16px; }
.list-card .pagination { padding: 16px; border-top: 1px solid var(--surface-100); }

/* Stat chip (toplam sayı gösterimi) */
.stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--r-pill);
    background: var(--brand-50);
    color: var(--brand-700);
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--brand-100);
}
.stat-chip .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--brand-500);
}

/* -------------------------------------------------------------
   Form Grid (view'larda çokça kullanılıyor: .form-grid + .field)
   ------------------------------------------------------------- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
    align-items: start;
}
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.field.full { grid-column: 1 / -1; }
.field > label,
.field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--surface-700);
    letter-spacing: .01em;
    display: flex;
    align-items: center;
    gap: 6px;
}
.field > .hint,
.field-hint {
    font-size: 12.5px;
    color: var(--surface-500);
    line-height: 1.4;
}
.field .req,
.req {
    color: var(--danger);
    font-weight: 700;
    margin-left: 2px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group > label { font-size: 13px; font-weight: 600; color: var(--surface-700); }
.form-group > small.muted { font-size: 12.5px; color: var(--surface-500); }

/* Form aksiyon barı — form altı buton grubu */
.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--surface-100);
    flex-wrap: wrap;
}
.form-actions.left { justify-content: flex-start; }
.form-actions.between { justify-content: space-between; }

/* Divider (hr.divider) */
.divider, hr.divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--surface-200) 15%, var(--surface-200) 85%, transparent);
    margin: 22px 0;
}

/* Description list (dl/dt/dd) */
.desc-list {
    display: grid;
    grid-template-columns: minmax(120px, max-content) 1fr;
    gap: 10px 16px;
    margin: 0;
}
.desc-list dt {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--surface-500);
    text-transform: uppercase;
    letter-spacing: .04em;
    align-self: center;
}
.desc-list dd {
    margin: 0;
    font-size: 14px;
    color: var(--surface-900);
    align-self: center;
}

/* Summary tablosu (fiyat özeti) */
.summary {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 280px;
    background: var(--surface-50);
    border: 1px solid var(--surface-200);
    border-radius: var(--r-lg);
    overflow: hidden;
}
.summary td {
    padding: 10px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--surface-200);
}
.summary td:last-child {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}
.summary tr:last-child td { border-bottom: none; }

/* Pagination */
.pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
    padding: 18px 0;
    flex-wrap: wrap;
}
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: var(--r-md);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--surface-600);
    background: var(--white);
    border: 1px solid var(--surface-200);
    transition: all 0.15s var(--easing);
}
.page-link:hover {
    border-color: var(--brand-300, var(--brand-200));
    color: var(--brand-700);
    background: var(--brand-50);
}
.page-link.active {
    background: linear-gradient(135deg, var(--brand-500), var(--coral-500));
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.25);
}

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

/* Grid ratio variants */
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; }
.grid-3-1 { display: grid; grid-template-columns: 3fr 1fr; gap: 24px; }
@media (max-width: 900px) {
    .grid-2-1, .grid-1-2, .grid-3-1 { grid-template-columns: 1fr; }
}

/* Tablo içinde input/select (teklif, satış kalem tabloları) */
.table input.input,
.table select.select,
.table textarea.textarea {
    padding: 8px 10px;
    font-size: 13.5px;
    border-radius: 8px;
    box-shadow: none;
    min-height: 36px;
}
.table select.select { padding-right: 28px; background-position: right 8px center; background-size: 14px; }
.table td .row-remove {
    width: 28px; height: 28px;
    padding: 0;
    border-radius: 50%;
    font-size: 16px;
    color: var(--danger);
    background: transparent;
    border: 1px solid var(--surface-200);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.15s;
}
.table td .row-remove:hover {
    background: var(--danger-bg);
    border-color: var(--danger);
}

/* Form grid → responsive */
@media (max-width: 768px) {
    .form-grid,
    .form-grid-3,
    .form-grid-4 { grid-template-columns: 1fr; }
    .desc-list { grid-template-columns: 1fr; gap: 2px 0; }
    .desc-list dt { margin-top: 10px; }
    .desc-list dt:first-child { margin-top: 0; }
}

/* Card header variants */
.card h3:first-child,
.card h4:first-child { margin-top: 0; }
.card + .card { margin-top: 18px; }

/* Toolbar (liste sayfası üstü aksiyon barı) */
.toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.toolbar .spacer { flex: 1; }

/* Checkbox label (inline checkbox + text) */
label.inline-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--surface-700);
    cursor: pointer;
    font-weight: 500;
    user-select: none;
}
label.inline-check input[type="checkbox"],
label.inline-check input[type="radio"] {
    width: 18px; height: 18px;
    accent-color: var(--brand-500);
}

/* Data cell with secondary text */
.cell-main { font-weight: 600; color: var(--surface-900); }
.cell-sub  { font-size: 12.5px; color: var(--surface-500); margin-top: 2px; }

/* Report tiles */
.report-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}
.report-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--surface-50);
    border: 1px solid var(--surface-200);
    border-radius: var(--r-md, 12px);
    color: inherit;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.report-tile:hover {
    background: #fff;
    border-color: var(--brand-300);
    box-shadow: 0 8px 20px -12px rgba(234, 88, 12, 0.25);
    transform: translateY(-2px);
}
.report-tile-icon {
    flex-shrink: 0;
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
}
.report-tile-icon svg { width: 22px; height: 22px; }
.report-tile-body { flex: 1; min-width: 0; }
.report-tile-body strong {
    display: block;
    font-size: 14.5px;
    color: var(--surface-900);
    margin-bottom: 3px;
}
.report-tile-body p {
    margin: 0;
    font-size: 12.5px;
    color: var(--surface-500);
    line-height: 1.4;
}
.report-tile-arrow {
    flex-shrink: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--brand-500);
    opacity: 0;
    transition: opacity .15s ease, transform .15s ease;
}
.report-tile:hover .report-tile-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* Print */
@media print {
    .sidebar, .app-header, .page-actions, .btn { display: none !important; }
    .app-shell { grid-template-columns: 1fr; }
    .app-content { padding: 0; max-width: 100%; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}
