/*
 * ============================================
 * Vektör İş Yönetim Sistemi v2
 * Design System — Vanilla CSS
 * ============================================
 * 
 * Bölümler:
 *  1. CSS Variables (Design Tokens)
 *  2. Reset & Base
 *  3. Typography
 *  4. Layout (Grid, Flex)
 *  5. Auth Pages
 *  6. Main Layout (Sidebar, Topbar, Content)
 *  7. Components (Cards, Buttons, Forms, Alerts, Tables)
 *  8. Animations
 *  9. Responsive
 */

/* ============================================
   1. CSS VARIABLES (Design Tokens)
   ============================================ */
:root {
    /* Primary Palette - Slate & Deep Blue */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;

    /* Accent */
    --accent-400: #60a5fa;
    --accent-500: #2563eb;
    --accent-600: #1e40af;

    /* Success */
    --success-50: #ecfdf5;
    --success-400: #34d399;
    --success-500: #10b981;
    --success-600: #059669;

    /* Warning */
    --warning-50: #fffbeb;
    --warning-400: #fbbf24;
    --warning-500: #f59e0b;
    --warning-600: #d97706;

    /* Danger */
    --danger-50: #fef2f2;
    --danger-400: #f87171;
    --danger-500: #ef4444;
    --danger-600: #dc2626;

    /* Info */
    --info-400: #38bdf8;
    --info-500: #0ea5e9;

    /* Gradient */
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    --gradient-dark: linear-gradient(135deg, #0b1329 0%, #1c2541 100%);

    /* Font */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;

    /* Border Radius - Cleaner and Sharper */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --radius-full: 9999px;

    /* Shadow */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.15);

    /* Transition */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Sidebar */
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 72px;
    --topbar-height: 64px;

    /* Z-Index */
    --z-dropdown: 100;
    --z-sidebar: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-toast: 500;
}

/* Dark Theme - Steel Navy Blueish Tone */
[data-theme="dark"] {
    --bg-primary: #0b1329;
    --bg-secondary: #1c2541;
    --bg-tertiary: #2a3454;
    --bg-card: rgba(28, 37, 65, 0.9);
    --bg-card-hover: rgba(38, 49, 84, 0.95);
    --bg-input: rgba(11, 19, 41, 0.6);
    --bg-sidebar: rgba(11, 19, 41, 0.95);
    --bg-topbar: rgba(11, 19, 41, 0.85);

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

    --border-color: rgba(59, 130, 246, 0.15);
    --border-hover: rgba(59, 130, 246, 0.28);
    --border-focus: rgba(59, 130, 246, 0.5);

    --glass-bg: rgba(28, 37, 65, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Light Theme - Softer Grayish Blue Tone */
[data-theme="light"] {
    --bg-primary: #edf0f4;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #cbd5e1;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #f1f5f9;
    --bg-sidebar: #f8fafc;
    --bg-topbar: rgba(248, 250, 252, 0.95);

    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-inverse: #ffffff;

    --border-color: #d1d5db;
    --border-hover: #9ca3af;
    --border-focus: #3b82f6;

    --glass-bg: rgba(248, 250, 252, 0.85);
    --glass-border: rgba(15, 23, 42, 0.06);
    --glass-shadow: 0 8px 32px rgba(15, 23, 42, 0.04);
}

/* ============================================
   2. RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--primary-400);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--primary-300);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   3. TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }

/* ============================================
   4. COMPONENTS — BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    outline: none;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.5;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.45);
    transform: translateY(-1px);
    color: #fff;
}
.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}
.btn-secondary:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.btn-danger {
    background: var(--danger-500);
    color: #fff;
}
.btn-danger:hover {
    background: var(--danger-600);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-warning {
    background: var(--warning-500);
    color: #fff;
}
.btn-warning:hover {
    background: var(--warning-600);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-success {
    background: var(--success-500);
    color: #fff;
}
.btn-success:hover {
    background: var(--success-600);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-sm { padding: var(--space-1) var(--space-3); font-size: 0.8rem; }
.btn-lg { padding: var(--space-4) var(--space-8); font-size: 1rem; }
.btn-block { width: 100%; }

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-md);
}

/* ============================================
   5. COMPONENTS — FORMS
   ============================================ */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label,
.form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: var(--space-4);
    color: var(--text-muted);
    pointer-events: none;
    transition: color var(--transition-fast);
    flex-shrink: 0;
}

.form-input,
.form-select,
.form-textarea,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="search"],
textarea,
select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-family);
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
    transition: all var(--transition-base);
}

.input-wrapper input,
.input-wrapper textarea {
    padding-left: calc(var(--space-4) + 28px);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    background: var(--bg-secondary);
}

input:focus ~ .input-icon,
textarea:focus ~ .input-icon {
    color: var(--primary-400);
}

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

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

select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238892b0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.toggle-password {
    position: absolute;
    right: var(--space-3);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--space-1);
    display: flex;
    align-items: center;
    transition: color var(--transition-fast);
}
.toggle-password:hover { color: var(--primary-400); }

/* ============================================
   6. COMPONENTS — ALERTS
   ============================================ */
.alert {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: var(--space-5);
    animation: slideDown 0.3s ease;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-400);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-400);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-400);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-info {
    background: rgba(14, 165, 233, 0.1);
    color: var(--info-400);
    border: 1px solid rgba(14, 165, 233, 0.2);
}

/* ============================================
   7. COMPONENTS — CARDS
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--glass-shadow);
    transition: all var(--transition-base);
}

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

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
}

/* ============================================
   8. AUTH PAGES
   ============================================ */
.auth-body {
    background: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.auth-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.auth-container {
    display: flex;
    width: 100%;
    max-width: 960px;
    min-height: 560px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--glass-shadow), 0 0 80px rgba(102, 126, 234, 0.08);
    animation: fadeInUp 0.6s ease;
}

/* Hero (Sol) */
.auth-hero {
    flex: 1;
    background: var(--gradient-primary);
    padding: var(--space-10);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-hero-content {
    position: relative;
    z-index: 2;
}

.auth-hero-logo {
    margin-bottom: var(--space-10);
}

.logo-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-5);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo-icon svg { filter: brightness(10); }

.auth-hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
}

.auth-hero-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.75);
    margin-top: var(--space-1);
    font-weight: 400;
}

.auth-hero-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-weight: 500;
}

.feature-icon {
    font-size: 1.1rem;
}

/* Dekoratif daireler */
.auth-hero-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.deco-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}
.deco-circle-1 { width: 300px; height: 300px; top: -80px; right: -80px; animation: float 8s ease-in-out infinite; }
.deco-circle-2 { width: 200px; height: 200px; bottom: -50px; left: -50px; animation: float 6s ease-in-out infinite reverse; }
.deco-circle-3 { width: 100px; height: 100px; top: 50%; right: 20%; animation: float 10s ease-in-out infinite; }

/* Form (Sağ) */
.auth-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-10);
}

.auth-form-wrapper {
    width: 100%;
    max-width: 360px;
}

.auth-form-header {
    margin-bottom: var(--space-8);
}

.auth-form-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: var(--space-2);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-form-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.auth-form {
    margin-bottom: var(--space-8);
}

.auth-footer {
    text-align: center;
}

.auth-footer p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================
   9. MAIN LAYOUT (Sidebar + Topbar + Content)
   ============================================ */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: var(--z-sidebar);
    display: flex;
    flex-direction: column;
    transition: width var(--transition-base), transform var(--transition-base);
    overflow: hidden;
}

.sidebar-header {
    height: var(--topbar-height);
    padding: 0 var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-logo svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

.sidebar-brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-3) var(--space-3);
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: transparent; border-radius: 2px; }
.sidebar:hover .sidebar-nav::-webkit-scrollbar-thumb { background: var(--border-color); }
.sidebar .sidebar-nav::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

.nav-section {
    margin-bottom: var(--space-4);
}

.nav-section-title {
    padding: var(--space-2) var(--space-3);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.nav-item {
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-3);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    text-decoration: none;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-link.active {
    color: var(--primary-400);
    background: rgba(102, 126, 234, 0.1);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--gradient-primary);
    border-radius: 0 3px 3px 0;
}

.nav-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
}

.nav-link.active svg {
    opacity: 1;
}

.nav-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    background: var(--danger-500);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Topbar */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-height);
    background: var(--bg-topbar);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: var(--z-sidebar);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-6);
    transition: left var(--transition-base);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.topbar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}
.topbar-toggle:hover { color: var(--text-primary); background: var(--bg-tertiary); }

.page-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.topbar-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.topbar-btn:hover { color: var(--text-primary); border-color: var(--border-hover); }

.user-menu {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.user-menu:hover { background: var(--bg-tertiary); }

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

.user-info {
    line-height: 1.2;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: var(--topbar-height);
    min-height: 100vh;
    transition: margin-left var(--transition-base);
    width: 100%;
}

.content-area {
    padding: var(--space-6);
    max-width: 1400px;
}

/* Overlay (mobilde sidebar açıkken) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: calc(var(--z-sidebar) - 1);
    backdrop-filter: blur(4px);
}

/* ============================================
   10. TABLES
   ============================================ */
.table-wrapper,
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.table-wrapper {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

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

thead th {
    background: var(--bg-tertiary);
    padding: var(--space-3) var(--space-4);
    text-align: left;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

tbody td {
    padding: var(--space-3) var(--space-4);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

tbody tr {
    transition: background var(--transition-fast);
}

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

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

/* ============================================
   11. BADGES / STATUS
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 12px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    white-space: nowrap;
    border: 1px solid transparent;
}

.badge-success { background: #047857 !important; color: #ffffff !important; border: none !important; box-shadow: 0 2px 6px rgba(4, 120, 87, 0.25) !important; }
.badge-warning { background: #f59e0b !important; color: #ffffff !important; border: none !important; box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25) !important; }
.badge-danger  { background: #ef4444 !important; color: #ffffff !important; border: none !important; box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25) !important; }
.badge-info    { background: #0ea5e9 !important; color: #ffffff !important; border: none !important; box-shadow: 0 2px 6px rgba(14, 165, 233, 0.25) !important; }
.badge-primary { background: #2563eb !important; color: #ffffff !important; border: none !important; box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25) !important; }
.badge-secondary { background: #475569 !important; color: #ffffff !important; border: none !important; }
.badge-purple { background: #8b5cf6 !important; color: #ffffff !important; border: none !important; box-shadow: 0 2px 6px rgba(139, 92, 246, 0.25) !important; }
.badge-teal   { background: #0d9488 !important; color: #ffffff !important; border: none !important; box-shadow: 0 2px 6px rgba(13, 148, 136, 0.25) !important; }
.badge-lg {
    padding: 6px 16px;
    font-size: 0.82rem;
    font-weight: 700;
}
.badge-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffffff;
    margin-right: 6px;
    opacity: 0.85;
}

/* ============================================
   12. STAT CARDS (Dashboard)
   ============================================ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-5);
    margin-bottom: var(--space-6);
}

.stat-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-6);
    backdrop-filter: blur(12px);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.stat-card:hover::before { opacity: 1; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); }

.stat-card-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.stat-card-info {
    display: flex;
    flex-direction: column;
}

.stat-card-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

.stat-card-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-icon-container {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-base);
}

.stat-card-compact:hover .stat-card-icon-container {
    transform: scale(1.08);
}

.stat-card-icon-svg {
    width: 20px;
    height: 20px;
}

/* Stat Icon Colors */
.stat-card-icon-primary {
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary-500);
    border: 1px solid rgba(37, 99, 235, 0.22);
}
.stat-card-icon-danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger-500);
    border: 1px solid rgba(239, 68, 68, 0.22);
}
.stat-card-icon-warning {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning-500);
    border: 1px solid rgba(245, 158, 11, 0.22);
}
.stat-card-icon-success {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success-500);
    border: 1px solid rgba(16, 185, 129, 0.22);
}
.stat-card-icon-info {
    background: rgba(14, 165, 233, 0.12);
    color: var(--info-500);
    border: 1px solid rgba(14, 165, 233, 0.22);
}
.stat-card-icon-secondary {
    background: rgba(107, 114, 128, 0.12);
    color: var(--text-secondary);
    border: 1px solid rgba(107, 114, 128, 0.22);
}

/* Dashboard Header Layout */
.dashboard-header-row {
    display: flex;
    gap: var(--space-5);
    align-items: stretch;
    flex-wrap: wrap;
}

.welcome-box {
    flex: 1;
    min-width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all var(--transition-base);
}

.welcome-box .btn {
    align-self: flex-start;
    width: fit-content;
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: var(--radius-md);
    margin-top: var(--space-3);
}

.welcome-box:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.welcome-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.welcome-title span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.welcome-meta-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.stat-grid-compact {
    flex: 3;
    min-width: 600px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
}

@media (max-width: 1200px) {
    .stat-grid-compact {
        min-width: 100%;
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stat-grid-compact {
        min-width: 100%;
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-card-compact {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
    position: relative;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
}

.stat-card-compact .stat-card-value {
    font-size: 1.4rem;
    font-weight: 700;
}

.stat-card-compact .stat-card-label {
    font-size: 0.72rem;
    letter-spacing: 0.2px;
}

.stat-card-compact .stat-card-icon-container {
    width: 34px;
    height: 34px;
}

.stat-card-compact .stat-card-icon-svg {
    width: 16px;
    height: 16px;
}

.stat-card-compact:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

/* Quick Filters Bar */
.quick-filters-bar {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.btn-filter {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

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

.btn-filter .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.dot.bg-danger { background-color: var(--danger-500); }
.dot.bg-warning { background-color: var(--warning-500); }
.dot.bg-success { background-color: var(--success-500); }
.dot.bg-primary { background-color: var(--primary-500); }
.dot.bg-info { background-color: var(--info-500); }

/* Soft Filter Button Colors */
.btn-primary-soft {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-500);
    border: 1px solid rgba(37, 99, 235, 0.15);
}
.btn-primary-soft:hover {
    background: var(--primary-600);
    color: white;
}

.btn-danger-soft {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger-500);
    border: 1px solid rgba(239, 68, 68, 0.15);
}
.btn-danger-soft:hover {
    background: var(--danger-600);
    color: white;
}

.btn-warning-soft {
    background: rgba(245, 158, 11, 0.08);
    color: var(--warning-500);
    border: 1px solid rgba(245, 158, 11, 0.15);
}
.btn-warning-soft:hover {
    background: var(--warning-600);
    color: white;
}

.btn-success-soft {
    background: rgba(16, 185, 129, 0.08);
    color: var(--success-500);
    border: 1px solid rgba(16, 185, 129, 0.15);
}
.btn-success-soft:hover {
    background: var(--success-600);
    color: white;
}

/* Double columns for warnings */
.dashboard-double-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
}

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

.max-height-200 {
    max-height: 200px;
    overflow-y: auto;
}

.max-height-300 {
    max-height: 300px;
    overflow-y: auto;
}

.max-height-420 {
    max-height: 420px;
    overflow-y: auto;
}

.max-height-5-rows {
    max-height: 292px;
    overflow-y: auto;
}

.notification-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

/* Custom Scrollbar Styles */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

/* Hide scrollbar track and thumb by default */
::-webkit-scrollbar-track {
    background: transparent;
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

/* Show main window scrollbar when body is hovered */
html:hover::-webkit-scrollbar-track,
body:hover::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

html:hover::-webkit-scrollbar-thumb,
body:hover::-webkit-scrollbar-thumb {
    background: var(--border-color);
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* Show container scrollbars when specific container is hovered */
.table-responsive:hover::-webkit-scrollbar-track,
[class*="max-height-"]:hover::-webkit-scrollbar-track,
.custom-scrollbar:hover::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

.table-responsive:hover::-webkit-scrollbar-thumb,
[class*="max-height-"]:hover::-webkit-scrollbar-thumb,
.custom-scrollbar:hover::-webkit-scrollbar-thumb {
    background: var(--border-color);
}

.table-responsive::-webkit-scrollbar-thumb:hover,
[class*="max-height-"]::-webkit-scrollbar-thumb:hover,
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* ============================================
   13. ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(10px, -10px); }
    66% { transform: translate(-5px, 5px); }
}

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

.spinner { animation: spin 0.8s linear infinite; }

/* Sayfa yüklenme animasyonu */
.fade-in {
    animation: fadeInUp 0.4s ease forwards;
}

/* ============================================
   14. RESPONSIVE
   ============================================ */

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

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

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

    .topbar {
        left: 0;
    }

    .topbar-toggle {
        display: flex;
    }

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

    .content-area {
        padding: var(--space-4);
    }
}

/* Mobil — Auth sayfası */
@media (max-width: 768px) {
    .auth-container {
        flex-direction: column;
        max-width: 100%;
        min-height: auto;
        border-radius: var(--radius-lg);
    }

    .auth-hero {
        padding: var(--space-8) var(--space-6);
        min-height: auto;
    }

    .auth-hero-title { font-size: 1.6rem; }
    .auth-hero-features { display: none; }

    .auth-form-section {
        padding: var(--space-6);
    }

    .auth-form-header h2 { font-size: 1.3rem; }

    /* Dashboard */
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }

    .stat-card {
        padding: var(--space-4);
    }

    .stat-card-value {
        font-size: 1.5rem;
    }
}

/* Küçük mobil */
@media (max-width: 480px) {
    .auth-wrapper {
        padding: 0;
    }

    .auth-container {
        border-radius: 0;
        min-height: 100vh;
    }

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

    .content-area {
        padding: var(--space-3);
    }
}

/* ============================================
   15. UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); }
.text-small  { font-size: 0.85rem; }
.text-primary { color: var(--primary-400); }
.text-success { color: var(--success-400); }
.text-danger  { color: var(--danger-400); }
.text-warning { color: var(--warning-400); }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================
   16. CUSTOMER & PAGINATION STYLES
   ============================================ */

/* Filter Toolbar */
.filter-toolbar {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
    padding: var(--space-2);
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 200px;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.search-input-container {
    position: relative;
    width: 100%;
}

.search-input-container .form-input {
    padding-left: var(--space-10);
    width: 100%;
}

.search-icon {
    position: absolute;
    left: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: var(--space-3);
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.pagination {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination .page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 var(--space-2);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    transition: all var(--transition-fast);
}

.pagination .page-item:hover .page-link {
    border-color: var(--border-hover);
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.pagination .page-item.active .page-link {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-sm);
}

.pagination .page-item.disabled .page-link {
    opacity: 0.4;
    cursor: not-allowed;
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-muted);
}

/* Detail Info List */
.detail-info-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.detail-info-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border-color);
}

.detail-info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-info-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.detail-info-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Modal Overlay & Modal Window */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-overlay);
    padding: var(--space-4);
}

.custom-modal {
    width: 100%;
    transform: scale(0.95);
    opacity: 0;
    animation: modalAppear 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modalAppear {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.max-width-400 {
    max-width: 400px;
}

.max-width-500 {
    max-width: 500px;
}

/* Empty State Styles */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-8) 0;
    color: var(--text-muted);
}

/* ============================================
   17. LIGHTWEIGHT GRID SYSTEM
   ============================================ */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px;
    margin-left: -10px;
}

.col-6, .col-12, .col-md-3, .col-md-6, .col-md-12, .col-lg-4, .col-lg-6, .col-lg-8, .col-lg-12 {
    position: relative;
    width: 100%;
    padding-right: 10px;
    padding-left: 10px;
}

.col-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

@media (min-width: 768px) {
    .col-md-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (min-width: 1024px) {
    .col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    .col-lg-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .col-lg-8 {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }
    .col-lg-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ============================================
   18. PHASE 6 CUSTOM STYLES (TIMELINE, BADGES)
   ============================================ */
.max-width-600 {
    max-width: 600px;
}

/* Soft Badges */
.badge-success-soft {
    background: rgba(16, 185, 129, 0.14) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.28) !important;
}
.badge-warning-soft {
    background: rgba(245, 158, 11, 0.14) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.28) !important;
}
.badge-danger-soft {
    background: rgba(239, 68, 68, 0.14) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.28) !important;
}
.badge-info-soft {
    background: rgba(14, 165, 233, 0.14) !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(14, 165, 233, 0.28) !important;
}
.badge-primary-soft {
    background: rgba(99, 102, 241, 0.14) !important;
    color: #a5b4fc !important;
    border: 1px solid rgba(99, 102, 241, 0.28) !important;
}
.badge-secondary-soft {
    background: rgba(100, 116, 139, 0.1) !important;
    color: #475569 !important;
    border: 1px solid rgba(100, 116, 139, 0.2) !important;
}
body.dark-mode .badge-secondary-soft,
body.dark .badge-secondary-soft,
[data-theme="dark"] .badge-secondary-soft {
    background: rgba(148, 163, 184, 0.16) !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(148, 163, 184, 0.3) !important;
}

/* Status Timeline */
.status-timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: var(--space-4) 0;
    margin: var(--space-2) 0;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.status-timeline::before {
    content: '';
    position: absolute;
    top: 36px;
    left: 40px;
    right: 40px;
    height: 4px;
    background: var(--border-color);
    z-index: 1;
}

@media (max-width: 768px) {
    .status-timeline::before {
        display: none;
    }
    .status-timeline {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-6);
    }
    .timeline-step {
        flex-direction: row !important;
        text-align: left !important;
        gap: var(--space-4);
        width: 100%;
    }
    .timeline-step .step-icon {
        margin-bottom: 0 !important;
    }
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.timeline-step .step-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-2);
    transition: all var(--transition-base);
}

.timeline-step .step-info {
    display: flex;
    flex-direction: column;
}

.timeline-step .step-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.timeline-step .step-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Timeline Active / Success / Danger States */
.timeline-step.active .step-icon {
    border-color: var(--accent-500);
    background: var(--primary-50);
    color: var(--accent-500);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.2);
}

.timeline-step.active .step-title {
    color: var(--text-primary);
}

.timeline-step.active.success .step-icon {
    border-color: var(--success-500);
    background: var(--success-50);
    color: var(--success-500);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.timeline-step.active.success .step-title {
    color: var(--success-600);
}

.timeline-step.active.danger .step-icon {
    border-color: var(--danger-500);
    background: var(--danger-50);
    color: var(--danger-500);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.timeline-step.active.danger .step-title {
    color: var(--danger-600);
}

/* ============================================
   19. PHASE 7 CUSTOM STYLES (SWITCH, AVATARS)
   ============================================ */
/* Switch Toggle Container */
.switch-container {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    flex-shrink: 0 !important;
}

.switch-container input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: .3s;
    border-radius: 24px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-sizing: border-box !important;
}

.switch-container input:checked + .switch-slider {
    background-color: var(--accent-500);
}

.switch-container input:checked + .switch-slider:before {
    transform: translateX(24px);
}

/* Profile Photo Preview and Placeholders */
.profile-preview-container {
    display: inline-block;
    position: relative;
}

.cursor-pointer {
    cursor: pointer;
}

.avatar-xl {
    font-size: 2rem;
}

.avatar-md {
    font-size: 1.1rem;
}

/* Success color light backdrop for copy alert */
:root {
    --success-light: rgba(16, 185, 129, 0.05);
}
[data-theme="dark"] {
    --success-light: rgba(16, 185, 129, 0.08);
}

/* ============================================
   20. PHASE 8 CUSTOM STYLES (TABS, LISTS, SETTINGS)
   ============================================ */
.tabs-container {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--space-6);
}

.tabs-list {
    display: flex;
    gap: var(--space-2);
}

.tab-item {
    font-weight: 500;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    text-decoration: none !important;
}

.tab-item.btn-primary {
    background: var(--primary-500);
    color: var(--text-inverse) !important;
    box-shadow: var(--shadow-sm);
}

.tab-item.btn-primary:hover {
    background: var(--primary-600);
}

.tab-item.btn-link {
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
}

.tab-item.btn-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.tab-item.btn-success {
    background: var(--success-500);
    color: var(--text-inverse) !important;
}

.tab-item.btn-warning {
    background: var(--warning-500);
    color: var(--text-inverse) !important;
}

.tab-item.btn-danger {
    background: var(--danger-500);
    color: var(--text-inverse) !important;
}

/* Category manager and inline forms */
.input-group {
    display: flex;
    width: 100%;
}
.input-group .form-input {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: -1px;
}
.input-group .btn:not(:last-child) {
    border-radius: 0;
}
.input-group .btn:last-child {
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

.text-right {
    text-align: right !important;
}

.btn-filter.active {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border-color: var(--primary-500) !important;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.15) !important;
}

/* Active border indicator for widgets/filters */
.active-border {
    border-color: var(--primary-500) !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12), var(--shadow-glow) !important;
}

/* Additional soft buttons */
.btn-info-soft {
    background: rgba(14, 165, 233, 0.1);
    color: var(--info-400);
    border: 1px solid rgba(14, 165, 233, 0.2);
}
.btn-info-soft:hover {
    background: rgba(14, 165, 233, 0.2);
    color: var(--info-300);
    border-color: rgba(14, 165, 233, 0.3);
}

.btn-secondary-soft {
    background: rgba(156, 163, 175, 0.1);
    color: var(--text-secondary);
    border: 1px solid rgba(156, 163, 175, 0.2);
}
.btn-secondary-soft:hover {
    background: rgba(156, 163, 175, 0.2);
    color: var(--text-primary);
    border-color: rgba(156, 163, 175, 0.3);
}

/* User avatar tag for tables */
.user-avatar-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 3px var(--space-3) 3px var(--space-1);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1;
}
.avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    background: var(--primary-500);
    color: white;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Stats mini header row layout */
.stats-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}
.stats-cards-group {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    flex-grow: 1;
}
.stat-card-mini {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 6px 12px;
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none !important;
    transition: all var(--transition-base);
}
.stat-card-mini:hover {
    transform: translateY(-1px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}
.stat-card-mini .stat-card-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.stat-card-mini .stat-card-value {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Compact action icon buttons */
.btn-icon-xs {
    width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}
.btn-icon-xs svg {
    width: 14px;
    height: 14px;
}

/* Description cell truncate */
.table td .text-description {
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
    color: var(--text-secondary);
    font-size: 0.82rem;
}

/* Flex and alignment utilities */
.d-flex {
    display: flex !important;
}
.d-inline-flex {
    display: inline-flex !important;
}
.flex-column {
    flex-direction: column !important;
}
.flex-wrap {
    flex-wrap: wrap !important;
}
.flex-grow-1 {
    flex-grow: 1 !important;
}
.align-items-center {
    align-items: center !important;
}
.justify-content-between {
    justify-content: space-between !important;
}
.justify-content-end {
    justify-content: flex-end !important;
}
.gap-1 { gap: var(--space-1) !important; }
.gap-2 { gap: var(--space-2) !important; }
.gap-3 { gap: var(--space-3) !important; }
.gap-4 { gap: var(--space-4) !important; }
.ms-auto {
    margin-left: auto !important;
}
.mt-2 { margin-top: var(--space-2) !important; }
.pt-3 { padding-top: var(--space-3) !important; }
.border-top { border-top: 1px solid var(--border-color) !important; }

/* Small form elements */
.form-input-sm,
.form-select-sm {
    padding: 4px 12px !important;
    font-size: 0.88rem !important;
    height: 34px !important;
    line-height: 1.4 !important;
    box-sizing: border-box !important;
}
select.form-select-sm {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    padding-right: 32px !important;
    background-position: right 8px center !important;
}

/* Fix search icon padding-left override */
.search-input-container .form-input-sm {
    padding-left: var(--space-10) !important;
}

/* Custom Dropdown Select Component */
.custom-select-container {
    position: relative;
    width: 100%;
}
.filter-card {
    position: relative;
    z-index: 10;
}
.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    font-size: 0.88rem;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    height: 34px;
    box-sizing: border-box;
    user-select: none;
}
.custom-select-trigger:hover {
    border-color: var(--border-hover);
}
.custom-select-container.active .custom-select-trigger {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}
.custom-select-trigger svg.chevron {
    width: 12px;
    height: 8px;
    color: var(--text-muted);
    transition: transform var(--transition-base);
    pointer-events: none;
}
.custom-select-container.active .custom-select-trigger svg.chevron {
    transform: rotate(180deg);
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    z-index: 50;
    max-height: 200px;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: all var(--transition-fast);
}
.custom-select-container.active .custom-select-options {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.custom-option {
    padding: 8px 12px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.custom-option:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}
.custom-option.selected {
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary-400);
    font-weight: 600;
}

/* Compact table layout for high column density */
.table-compact th,
.table-compact td {
    padding: 8px 6px !important;
    font-size: 0.8rem !important;
}
.table-compact .user-avatar-tag {
    padding: 2px 6px 2px 2px !important;
    font-size: 0.7rem !important;
}
.table-compact .avatar-initials {
    width: 18px;
    height: 18px;
    font-size: 8px;
}

/* Large status pills for detail view */
.status-pill-lg {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    white-space: nowrap;
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
}

.status-pill-lg-primary {
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary-400);
    border-color: rgba(37, 99, 235, 0.25);
}

.status-pill-lg-warning {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning-400);
    border-color: rgba(245, 158, 11, 0.25);
}

.status-pill-lg-success {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success-400);
    border-color: rgba(16, 185, 129, 0.25);
}

.status-pill-lg-danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger-400);
    border-color: rgba(239, 68, 68, 0.25);
}

.status-pill-lg-secondary {
    background: rgba(107, 114, 128, 0.12);
    color: var(--text-secondary);
    border-color: rgba(107, 114, 128, 0.25);
}

/* Detail Info Item layout adjustments */
.detail-info-item-modern {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--border-color);
}
.detail-info-item-modern:last-child {
    border-bottom: none;
}
.detail-info-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--primary-400);
    flex-shrink: 0;
    box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.02);
}
.detail-info-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

/* Personnel cards (glassmorphism look) */
.personnel-card-modern {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    background: rgba(255, 255, 255, 0.015);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}
.personnel-card-modern:hover {
    background: rgba(255, 255, 255, 0.035);
    border-color: var(--primary-400);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Modern photo placeholder area */
.photo-placeholder-modern {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-6) var(--space-4);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.005);
    color: var(--text-muted);
    text-align: center;
    gap: var(--space-3);
    transition: border-color var(--transition-base);
}
.photo-placeholder-modern:hover {
    border-color: var(--primary-400);
}

/* Ziyaret item timeline */
.visit-timeline-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}
.visit-timeline-item {
    display: flex;
    gap: var(--space-3);
    position: relative;
    padding-bottom: var(--space-1);
}
.visit-timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 36px;
    left: 17px;
    bottom: -16px;
    width: 2px;
    background: var(--border-color);
}
.visit-timeline-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    color: var(--primary-400);
    flex-shrink: 0;
    z-index: 1;
    border: 2px solid var(--bg-card);
}
.visit-timeline-content {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    transition: border-color var(--transition-base);
}
.visit-timeline-content:hover {
    border-color: var(--primary-300);
}

/* Status Selector Cards Grid */
.status-selector-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    margin-top: var(--space-2);
}

@media (max-width: 576px) {
    .status-selector-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.status-selector-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-2);
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    text-align: center;
    gap: var(--space-2);
}

.status-selector-card:hover {
    background: rgba(255, 255, 255, 0.035);
    border-color: var(--text-muted);
}

.status-selector-card.active {
    background: rgba(255, 255, 255, 0.02);
}

/* Individual Active Colors */
.status-selector-card.active[data-status="bekliyor"] {
    border-color: var(--warning-400);
    background: rgba(245, 158, 11, 0.05);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

.status-selector-card.active[data-status="ilgileniliyor"] {
    border-color: var(--primary-400);
    background: rgba(37, 99, 235, 0.05);
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.15);
}

.status-selector-card.active[data-status="tamamlandi"] {
    border-color: var(--success-400);
    background: rgba(16, 185, 129, 0.05);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

.status-selector-card.active[data-status="reddedildi"] {
    border-color: var(--danger-400);
    background: rgba(239, 68, 68, 0.05);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.15);
}

.status-selector-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    transition: all var(--transition-base);
}

.status-selector-card.active[data-status="bekliyor"] .status-selector-icon { background: rgba(245, 158, 11, 0.12); }
.status-selector-card.active[data-status="ilgileniliyor"] .status-selector-icon { background: rgba(37, 99, 235, 0.12); }
.status-selector-card.active[data-status="tamamlandi"] .status-selector-icon { background: rgba(16, 185, 129, 0.12); }
.status-selector-card.active[data-status="reddedildi"] .status-selector-icon { background: rgba(239, 68, 68, 0.12); }

.status-selector-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.status-selector-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.status-selector-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Personnel Select Cards in Modal */
.personnel-select-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
    max-height: 320px;
    overflow-y: auto;
    padding-right: var(--space-1);
    margin-top: var(--space-2);
}

@media (max-width: 576px) {
    .personnel-select-grid {
        grid-template-columns: 1fr;
    }
}

.personnel-select-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    position: relative;
    user-select: none;
    cursor: pointer;
}

.personnel-select-card:hover {
    background: rgba(255, 255, 255, 0.035);
    border-color: var(--text-muted);
}

.personnel-select-card.active {
    background: rgba(37, 99, 235, 0.05);
    border-color: var(--primary-400);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.15);
}

.personnel-select-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    color: transparent;
    transition: all var(--transition-base);
    flex-shrink: 0;
    margin-left: auto;
}

.personnel-select-card:hover .personnel-select-indicator {
    border-color: var(--text-muted);
}

.personnel-select-card.active .personnel-select-indicator {
    border-color: var(--primary-400);
    background: var(--primary-400);
    color: #fff;
}

/* Drag and Drop Dropzone */
.dropzone-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-5) var(--space-4);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.005);
    color: var(--text-muted);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    gap: var(--space-2);
}

.dropzone-container:hover {
    border-color: var(--primary-400);
    background: rgba(37, 99, 235, 0.02);
}

.dropzone-container.dragover {
    border-color: var(--primary-400);
    background: rgba(37, 99, 235, 0.05);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.1);
}

.dropzone-preview-img {
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: var(--space-2);
}

.dropzone-info-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.dropzone-recommendations {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: 4px;
}

/* Image Type Selector Grid */
.img-type-selector-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    margin-top: var(--space-2);
}

.img-type-selector-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    user-select: none;
}

.img-type-selector-card:hover {
    background: rgba(255, 255, 255, 0.035);
    border-color: var(--text-muted);
}

.img-type-selector-card.active[data-type="baslangic"] {
    border-color: var(--primary-400);
    background: rgba(37, 99, 235, 0.05);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.15);
}

.img-type-selector-card.active[data-type="tamam"] {
    border-color: var(--success-400);
    background: rgba(16, 185, 129, 0.05);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.img-type-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    color: transparent;
    transition: all var(--transition-base);
    flex-shrink: 0;
    margin-left: auto;
}

.img-type-selector-card.active[data-type="baslangic"] .img-type-indicator {
    border-color: var(--primary-400);
    background: var(--primary-400);
    color: #fff;
}

.img-type-selector-card.active[data-type="tamam"] .img-type-indicator {
    border-color: var(--success-400);
    background: var(--success-400);
    color: #fff;
}

/* Flatpickr Custom Theme for Vektör */
.flatpickr-calendar {
    background: #1e293b !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4) !important;
    font-family: 'Inter', sans-serif !important;
}

.flatpickr-calendar.arrowTop:after {
    border-bottom-color: #1e293b !important;
}
.flatpickr-calendar.arrowTop:before {
    border-bottom-color: var(--border-color) !important;
}
.flatpickr-calendar.arrowBottom:after {
    border-top-color: #1e293b !important;
}
.flatpickr-calendar.arrowBottom:before {
    border-top-color: var(--border-color) !important;
}

.flatpickr-months .flatpickr-month,
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: var(--text-primary) !important;
    fill: var(--text-primary) !important;
}

.flatpickr-current-month .numInputWrapper span.arrowUp:after {
    border-bottom-color: var(--text-primary) !important;
}
.flatpickr-current-month .numInputWrapper span.arrowDown:after {
    border-top-color: var(--text-primary) !important;
}

.flatpickr-current-month input.cur-year {
    color: var(--text-primary) !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    background: #1e293b !important;
    color: var(--text-primary) !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {
    background: #1e293b !important;
    color: var(--text-primary) !important;
}

span.flatpickr-weekday {
    color: var(--text-muted) !important;
    font-weight: 600 !important;
}

.flatpickr-day {
    color: var(--text-secondary) !important;
    border-radius: var(--radius-md) !important;
}

.flatpickr-day:hover,
.flatpickr-day.prevMonthDay:hover,
.flatpickr-day.nextMonthDay:hover,
.flatpickr-day.today:hover,
.flatpickr-day.prevMonthDay.today:hover,
.flatpickr-day.nextMonthDay.today:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: transparent !important;
    color: var(--text-primary) !important;
}

.flatpickr-day.today {
    border-color: var(--primary-400) !important;
    color: var(--primary-400) !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover,
.flatpickr-day.selected.prevMonthDay,
.flatpickr-day.startRange.prevMonthDay,
.flatpickr-day.endRange.prevMonthDay,
.flatpickr-day.selected.nextMonthDay,
.flatpickr-day.startRange.nextMonthDay,
.flatpickr-day.endRange.nextMonthDay {
    background: var(--primary-400) !important;
    border-color: var(--primary-400) !important;
    color: #fff !important;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.4) !important;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay,
.flatpickr-day.notAllowed,
.flatpickr-day.notAllowed.prevMonthDay,
.flatpickr-day.notAllowed.nextMonthDay {
    color: rgba(255, 255, 255, 0.15) !important;
}

.flatpickr-time {
    border-top: 1px solid var(--border-color) !important;
    background: rgba(0, 0, 0, 0.1) !important;
}

.flatpickr-time input {
    color: var(--text-primary) !important;
}

.flatpickr-time input:hover,
.flatpickr-time .numInputWrapper:hover,
.flatpickr-time input:focus {
    background: rgba(255, 255, 255, 0.05) !important;
}

.flatpickr-time .flatpickr-am-pm {
    color: var(--text-secondary) !important;
}

.flatpickr-time .numInputWrapper span.arrowUp:after {
    border-bottom-color: var(--text-muted) !important;
}
.flatpickr-time .numInputWrapper span.arrowDown:after {
    border-top-color: var(--text-muted) !important;
}

/* Custom Info List in Form */
.info-list-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin-top: var(--space-2);
}

.info-list-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.info-list-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: rgba(59, 130, 246, 0.12);
    color: var(--primary-400);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

.info-list-text {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
}

/* Filter Toolbar Harmonization & Equal Height */
.filter-toolbar {
    padding: var(--space-3) var(--space-4) !important;
}

.filter-toolbar .form-input-sm,
.filter-toolbar .custom-select-container,
.filter-toolbar .custom-select-trigger,
.filter-toolbar .btn {
    height: 34px !important;
    box-sizing: border-box !important;
}

.filter-toolbar .form-input-sm,
.filter-toolbar .btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.filter-toolbar .btn {
    padding: 0 var(--space-4) !important;
    line-height: 1 !important;
    font-size: 0.85rem !important;
}

/* Custom Stepper Component Styles */
.stepper-btn {
    width: 40px;
    height: 100%;
    border: none !important;
    background: transparent !important;
    color: var(--text-secondary) !important;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}
.stepper-btn:hover {
    background: var(--bg-hover) !important;
    color: var(--text-primary) !important;
}
.stepper-btn svg {
    display: block !important;
    margin: 0 auto !important;
}
.stepper-input-container:focus-within {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}
/* Hide default number input arrows globally */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
    -webkit-appearance: none; 
    margin: 0; 
}
input[type=number] {
    -moz-appearance: textfield;
}

/* ==========================================================================
   MOBILE & RESPONSIVE UX OPTIMIZATIONS (Antigravity Responsive System)
   ========================================================================== */

/* -- Desktop defaults for mobile-only elements (hidden on desktop) -- */
.mobile-filter-fab { display: none; }
.mobile-only-list  { display: none; }
.bottom-sheet-handle { display: none; }
.bottom-sheet-header { display: none; }
.bottom-sheet-backdrop { display: none; }

/* -- Mobile Topbar / Header Fixes -- */
@media (max-width: 768px) {
    .topbar {
        padding: 0 var(--space-3) !important;
        gap: var(--space-2) !important;
    }
    .topbar-left {
        gap: var(--space-2) !important;
        flex: 1;
        min-width: 0;
    }
    .page-title {
        font-size: 0.95rem !important;
        font-weight: 700 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 140px;
    }
    .topbar-right {
        gap: var(--space-1) !important;
    }
    .user-info {
        display: none !important;
    }
    .user-menu {
        gap: 0 !important;
    }
    .topbar-btn {
        width: 32px !important;
        height: 32px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .topbar-btn svg {
        width: 18px !important;
        height: 18px !important;
    }
    .content-area {
        padding: var(--space-3) !important;
    }
}

/* -- Mobile Bottom Sheet Filters & FAB -- */
@media (max-width: 768px) {
    .mobile-filter-fab {
        display: flex !important;
        align-items: center;
        gap: 8px;
        position: fixed;
        bottom: 24px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 999;
        box-shadow: 0 6px 24px rgba(102, 126, 234, 0.4);
        border-radius: 50px;
        padding: 10px 22px;
        font-size: 0.85rem;
        font-weight: 600;
        background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
        color: #fff;
        border: none;
        cursor: pointer;
        transition: all 0.2s ease;
        letter-spacing: 0.02em;
    }
    .mobile-filter-fab:active {
        transform: translateX(-50%) scale(0.94);
    }

    /* Bottom Sheet Backdrop */
    .bottom-sheet-backdrop {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 1050;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }
    .bottom-sheet-backdrop.open {
        display: block !important;
        opacity: 1;
        pointer-events: auto;
    }

    /* Filter Card as Bottom Sheet */
    .filter-card {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        background: var(--bg-secondary) !important;
        border: none !important;
        border-top: 1px solid var(--border-color) !important;
        border-radius: 16px 16px 0 0 !important;
        box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.45) !important;
        z-index: 1051 !important;
        margin: 0 !important;
        padding: 16px 20px 24px 20px !important;
        transform: translateY(100%);
        transition: transform 0.35s cubic-bezier(0.32, 0.94, 0.6, 1) !important;
        max-height: 80vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .filter-card.open {
        transform: translateY(0) !important;
    }

    .bottom-sheet-handle {
        display: block !important;
        width: 36px;
        height: 4px;
        background: var(--text-muted);
        opacity: 0.3;
        border-radius: 2px;
        margin: 0 auto 14px auto;
    }

    .bottom-sheet-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 14px;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--border-color);
    }
}

/* -- Desktop / Mobile List Toggle -- */
.desktop-only-table { display: block; }

@media (max-width: 768px) {
    .desktop-only-table {
        display: none !important;
    }
    .mobile-only-list {
        display: flex !important;
        flex-direction: column;
        gap: 10px;
        padding: var(--space-3);
    }
}

/* -- Mobile Service Card (msc-*) Premium Design -- */
.mobile-service-card {
    display: none;
}
@media (max-width: 768px) {
    .mobile-service-card {
        display: block;
        text-decoration: none;
        color: inherit;
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        padding: 14px 14px 10px 14px;
        transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
        box-shadow: var(--shadow-sm);
    }
    .mobile-service-card:active {
        transform: scale(0.985);
        box-shadow: var(--shadow-md);
    }

    /* Header: title + badges */
    .msc-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 4px;
    }
    .msc-title {
        font-size: 0.9rem;
        font-weight: 700;
        color: var(--primary-color);
        line-height: 1.3;
        flex: 1;
        min-width: 0;
        word-break: break-word;
    }
    .msc-badges {
        display: flex;
        gap: 4px;
        flex-shrink: 0;
    }
    .msc-badges .badge {
        font-size: 0.65rem;
        padding: 2px 6px;
        white-space: nowrap;
    }

    /* Subtitle: service/product */
    .msc-subtitle {
        font-size: 0.78rem;
        color: var(--text-secondary);
        margin-bottom: 10px;
        line-height: 1.4;
    }
    .msc-dot {
        color: var(--text-muted);
        font-weight: 700;
        margin: 0 3px;
    }

    /* Meta info rows */
    .msc-meta {
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 8px 0;
        margin-bottom: 8px;
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
    }
    .msc-meta-item {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 0.78rem;
        color: var(--text-secondary);
    }
    .msc-meta-item svg {
        color: var(--text-muted);
        flex-shrink: 0;
    }

    /* Avatar chip inside meta */
    .msc-avatar-chip {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        background: var(--bg-hover);
        border-radius: 20px;
        padding: 1px 8px 1px 2px;
        font-size: 0.72rem;
        font-weight: 500;
    }
    .msc-avatar-initials {
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: var(--primary-color);
        color: #fff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.55rem;
        font-weight: 700;
        flex-shrink: 0;
    }

    /* Footer: action hint + edit */
    .msc-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 4px;
    }
    .msc-action-hint {
        font-size: 0.75rem;
        font-weight: 600;
        color: var(--primary-color);
        opacity: 0.8;
    }
    .msc-edit-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        border-radius: var(--radius-md);
        background: var(--bg-hover);
        color: var(--info-color, var(--primary-color));
        cursor: pointer;
        transition: background 0.15s ease;
    }
    .msc-edit-btn:active {
        background: var(--border-color);
    }
}

/* -- Mobile Details Actions Grid -- */
@media (max-width: 768px) {
    .service-detail-page .d-flex.gap-2.flex-wrap {
        width: 100% !important;
        gap: var(--space-2) !important;
    }
    .service-detail-page .d-flex.gap-2.flex-wrap .btn,
    .service-detail-page .d-flex.gap-2.flex-wrap form,
    .service-detail-page .d-flex.gap-2.flex-wrap a {
        flex: 1 1 calc(50% - var(--space-2)) !important;
        display: inline-flex !important;
        justify-content: center !important;
        height: 38px !important;
    }
    .service-detail-page .d-flex.gap-2.flex-wrap form .btn {
        width: 100% !important;
    }
}

.personnel-phone-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 4px 12px;
    background: rgba(59, 130, 246, 0.08);
    color: var(--primary-400) !important;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(59, 130, 246, 0.15);
    transition: all 0.2s ease;
    width: fit-content;
}
.personnel-phone-pill:hover {
    background: var(--primary-color);
    color: #ffffff !important;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

@media (max-width: 768px) {
    /* Dashboard specific mobile layout */
    .dashboard-header-row {
        flex-direction: column !important;
        gap: var(--space-4) !important;
    }
    .welcome-box {
        width: 100% !important;
        min-width: 100% !important;
    }
    
    /* Stats rows mobile layout */
    .stats-header-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: var(--space-3) !important;
    }
    .stats-header-row > .btn {
        width: 100% !important;
        text-align: center;
        justify-content: center;
    }
    .stats-cards-group {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--space-2) !important;
    }
    .stats-cards-group .stat-card-compact {
        min-width: 0 !important;
    }
    
    /* Table alternative styling for mobile cards */
    .mobile-only-list .card {
        margin-bottom: 0 !important;
    }
    
    /* Bottom Sheet Layout adjustments for mobile */
    .filter-card.bottom-sheet {
        padding: var(--space-4) !important;
    }
    
    /* Quick filters wrapper */
    .quick-filters-bar {
        width: 100% !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        padding-bottom: 4px;
        justify-content: flex-start !important;
    }
    
    /* Pagination responsiveness */
    .card-footer {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: var(--space-4) !important;
    }
    .card-footer form {
        width: 100% !important;
        justify-content: space-between !important;
    }
    .card-footer .pagination-container, 
    .card-footer .pagination {
        width: 100% !important;
        justify-content: center !important;
        margin-left: 0 !important;
    }
}

/* Desktop style for dashboard quick filters container */
.quick-filters-container.filter-card {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    margin: 0;
}

@media (max-width: 768px) {
    .quick-filters-container.filter-card.bottom-sheet .quick-filters-bar {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--space-2) !important;
        width: 100% !important;
        white-space: normal !important;
        overflow-x: visible !important;
        padding-bottom: 0 !important;
    }
    .quick-filters-container.filter-card.bottom-sheet .quick-filters-bar .btn-filter {
        width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
    }
}

/* Randevulu İşlerin Satır Vurgusu */
.row-has-appointment {
    background-color: rgba(245, 158, 11, 0.12) !important;
    transition: background-color 0.2s ease;
}
.row-has-appointment:hover {
    background-color: rgba(245, 158, 11, 0.18) !important;
}

/* Koyu Tema İçin Randevulu İş Vurgusu */
body.dark-mode .row-has-appointment,
body.dark .row-has-appointment,
[data-theme="dark"] .row-has-appointment {
    background-color: rgba(99, 102, 241, 0.15) !important;
}
body.dark-mode .row-has-appointment:hover,
body.dark .row-has-appointment:hover,
[data-theme="dark"] .row-has-appointment:hover {
    background-color: rgba(99, 102, 241, 0.25) !important;
}

/* Mobil Kart Vurgusu */
a.mobile-service-card.row-has-appointment {
    background: rgba(245, 158, 11, 0.12) !important;
    border-right: 3px solid rgba(245, 158, 11, 0.3) !important;
}
body.dark-mode a.mobile-service-card.row-has-appointment,
body.dark a.mobile-service-card.row-has-appointment,
[data-theme="dark"] a.mobile-service-card.row-has-appointment {
    background: rgba(99, 102, 241, 0.15) !important;
    border-right: 3px solid rgba(99, 102, 241, 0.4) !important;
}




