/* =============================================
   2.EL ARAÇ YÖNETİM SİSTEMİ - MODERN UI
   ============================================= */

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

:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --primary-50: #eff6ff;
    --secondary: #0f172a;
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #6366f1;
    --info-light: #e0e7ff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: all 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

/* LOGIN SAYFASI */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #2563eb 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(37,99,235,0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(99,102,241,0.1) 0%, transparent 40%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-20px, -20px) rotate(2deg); }
}

.login-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 48px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--secondary);
    margin-top: 12px;
}

.login-logo .logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--info));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 28px;
    color: white;
}

.login-logo p {
    color: var(--gray-500);
    font-size: 14px;
    margin-top: 4px;
}

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

.sidebar {
    width: 280px;
    background: var(--secondary);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-header h2 .icon-box {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--info));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.sidebar-header .user-info {
    margin-top: 16px;
    padding: 12px;
    background: rgba(255,255,255,0.06);
    border-radius: var(--radius-sm);
}

.sidebar-header .user-info .user-name {
    font-weight: 600;
    font-size: 14px;
}

.sidebar-header .user-info .user-role {
    font-size: 12px;
    color: var(--gray-400);
}

.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--gray-300);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 4px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-nav a.active {
    background: var(--primary);
}

.sidebar-nav a i { width: 20px; text-align: center; }

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

.main-content {
    margin-left: 280px;
    flex: 1;
    min-height: 100vh;
}

.topbar {
    background: white;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar .page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary);
}

.topbar .date-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--primary-50);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.content-area { padding: 32px; }

/* KARTLAR */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    border: 1px solid var(--gray-100);
}

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

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

.stat-card .stat-icon.blue { background: var(--primary-50); color: var(--primary); }
.stat-card .stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-card .stat-icon.yellow { background: var(--warning-light); color: var(--warning); }
.stat-card .stat-icon.purple { background: var(--info-light); color: var(--info); }
.stat-card .stat-icon.red { background: var(--danger-light); color: var(--danger); }

.stat-card .stat-info h3 {
    font-size: 28px;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1;
}

.stat-card .stat-info p {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 4px;
    font-weight: 500;
}

/* TABLO */
.table-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    overflow: hidden;
}

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

.table-card .table-header h3 {
    font-size: 16px;
    font-weight: 700;
}

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

.data-table th {
    background: var(--gray-50);
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--gray-200);
}

.data-table td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.data-table tr:hover { background: var(--gray-50); }

.data-table tr:last-child td { border-bottom: none; }

/* ROZETLER / BADGE */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-draft { background: var(--gray-100); color: var(--gray-600); }
.badge-sent { background: var(--info-light); color: var(--info); }
.badge-contract { background: var(--warning-light); color: #b45309; }
.badge-waiting { background: #fce7f3; color: #be185d; }
.badge-completed { background: var(--success-light); color: #047857; }

/* BUTONLAR */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; }
.btn-warning { background: var(--accent); color: white; }
.btn-warning:hover { background: #d97706; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-outline {
    background: transparent;
    border: 2px solid var(--gray-300);
    color: var(--gray-700);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* FORM */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-group label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    background: white;
    color: var(--gray-800);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.form-control::placeholder { color: var(--gray-400); }

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

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

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.form-check label {
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 0;
}

/* DOSYA YÜKLEME */
.file-upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    background: var(--gray-50);
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: var(--primary-50);
}

.file-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-upload-area i { font-size: 32px; color: var(--gray-400); display: block; margin-bottom: 8px; }
.file-upload-area p { font-size: 13px; color: var(--gray-500); }
.file-upload-area .file-types { font-size: 11px; color: var(--gray-400); margin-top: 4px; }

.uploaded-files { margin-top: 12px; }

.uploaded-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 13px;
}

.uploaded-file .file-name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-700);
}

.uploaded-file .file-name i { color: var(--primary); }

.uploaded-file .delete-file {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
}

/* WİZARD ADIMLAR */
.wizard-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 24px 20px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    overflow-x: auto;
    flex-wrap: wrap;
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-400);
    background: var(--gray-50);
    white-space: nowrap;
    transition: var(--transition);
    cursor: pointer;
}

.wizard-step .step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.wizard-step.active {
    background: var(--primary-50);
    color: var(--primary);
}

.wizard-step.active .step-num {
    background: var(--primary);
    color: white;
}

.wizard-step.completed {
    background: var(--success-light);
    color: var(--success);
}

.wizard-step.completed .step-num {
    background: var(--success);
    color: white;
}

.wizard-connector {
    width: 20px;
    height: 2px;
    background: var(--gray-200);
    flex-shrink: 0;
}

.wizard-panel {
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
}

.wizard-panel .panel-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 4px;
}

.wizard-panel .panel-desc {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 24px;
}

.wizard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

/* SEÇENEK KARTLARI */
.option-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.option-card {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.option-card:hover { border-color: var(--primary-light); }

.option-card.selected {
    border-color: var(--primary);
    background: var(--primary-50);
}

.option-card i { font-size: 28px; color: var(--primary); display: block; margin-bottom: 8px; }
.option-card h4 { font-size: 14px; font-weight: 600; }
.option-card p { font-size: 12px; color: var(--gray-500); margin-top: 4px; }

/* KONDİSYONEL BÖLÜMLER */
.conditional-section {
    display: none;
    animation: fadeSlide 0.3s ease;
}

.conditional-section.show { display: block; }

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

/* SATIŞ FİYATI VURGU */
.price-highlight {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 2px solid var(--danger);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    font-size: 24px;
    font-weight: 800;
    color: var(--danger);
    text-align: center;
}

/* YÜKLEME DURUMU */
.autosave-indicator {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 10px 20px;
    background: var(--gray-800);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

.autosave-indicator.show { opacity: 1; }

.autosave-indicator .spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ALERT */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success { background: var(--success-light); color: #047857; border: 1px solid #a7f3d0; }
.alert-danger { background: var(--danger-light); color: #b91c1c; border: 1px solid #fca5a5; }
.alert-warning { background: var(--warning-light); color: #b45309; border: 1px solid #fcd34d; }
.alert-info { background: var(--info-light); color: #4338ca; border: 1px solid #a5b4fc; }

/* YAZDIR */
.print-container {
    max-width: 210mm;
    margin: 0 auto;
    padding: 20mm;
    background: white;
}

.print-container h1 { font-size: 18px; text-align: center; margin-bottom: 16px; border-bottom: 2px solid #333; padding-bottom: 8px; }
.print-container h2 { font-size: 14px; color: #333; background: #f0f0f0; padding: 6px 12px; margin: 16px 0 8px; }
.print-container .print-row { display: flex; border-bottom: 1px solid #ddd; padding: 4px 0; font-size: 12px; }
.print-container .print-label { width: 40%; font-weight: 600; color: #555; }
.print-container .print-value { width: 60%; }

@media print {
    .sidebar, .topbar, .no-print { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .content-area { padding: 0 !important; }
    .print-container { padding: 10mm; }
    body { background: white; }
}

/* MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.show { display: flex; }

.modal-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-box h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.modal-box p { font-size: 14px; color: var(--gray-600); margin-bottom: 24px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .topbar { padding: 12px 16px; }
    .content-area { padding: 16px; }
    .wizard-steps { gap: 2px; }
    .form-row { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* NOTIFICATION PULSE */
.notification-dot {
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239,68,68,0); }
    100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-400);
}

.empty-state i { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; color: var(--gray-600); margin-bottom: 8px; }
.empty-state p { font-size: 14px; margin-bottom: 20px; }
