/* ============================================
   Koluman Smart - Filo Yönetim Portalı
   Kurumsal Renk: #003863
   ============================================ */

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #003863; /* Koluman kurumsal mavi */
    min-height: 100vh;
    color: #1f2933;
    line-height: 1.5;
}

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

/* === TOP BAR === */
.top-bar {
    height: 72px;
    padding: 0 32px;
    background: #ffffff;
    color: #003863;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo {
    height: 50px;
    display: flex;
    align-items: center;
}

.brand-logo-img {
    height: 50px;
    width: auto;
    display: block;
    transition: transform 0.2s ease;
}

.brand-logo-img:hover {
    transform: scale(1.02);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.02em;
    color: #003863;
}

.brand-subtitle {
    font-size: 12px;
    color: #6b7280;
    font-weight: 400;
}

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

.top-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    color: #003863;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: rgba(0, 56, 99, 0.08);
    color: #002244;
}

.nav-link.active {
    background: rgba(0, 56, 99, 0.12);
    color: #003863;
    font-weight: 600;
}

@media (max-width: 768px) {
    .top-nav {
        display: none;
    }
}

.user-info {
    font-size: 13px;
    color: #003863;
    font-weight: 500;
    padding: 8px 16px;
    background: #f0f4f8;
    border-radius: 20px;
}

/* Language Toggle Button */
.btn-lang {
    padding: 8px 14px;
    background: #f0f4f8;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #003863;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-lang .icon {
    width: 18px;
    height: 18px;
}

.btn-lang:hover {
    background: #003863;
    color: white;
    border-color: #003863;
}

/* === SVG ICONS === */
.icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-icon .icon {
    width: 16px;
    height: 16px;
}

.page-title-with-icon {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title-with-icon .icon {
    width: 28px;
    height: 28px;
}

/* === MAIN CONTENT === */
.app-main {
    flex: 1;
    padding: 32px 24px;
}

/* === SCREENS === */
.screen {
    display: none;
    animation: fadeIn 0.3s ease;
}

.screen.active {
    display: block;
}

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

/* === CONTAINER === */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === SECTION HEADER (Mavi arka plan üzerinde) === */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.section-header h1 {
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.section-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin-top: 4px;
}

/* ============================================
   LOGIN SCREEN
   ============================================ */
.login-layout {
    max-width: 1100px;
    margin: 60px auto;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 60px;
    align-items: center;
}

.login-intro {
    padding-right: 40px;
}

.login-intro h1 {
    font-size: 36px;
    margin-bottom: 16px;
    color: #ffffff;
    font-weight: 700;
    line-height: 1.2;
}

.login-intro p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 24px;
    line-height: 1.7;
}

.feature-list {
    list-style: none;
    padding-left: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
}

.feature-list li {
    margin-bottom: 12px;
    padding-left: 28px;
    position: relative;
}

.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #60a5fa;
    font-weight: bold;
    font-size: 14px;
}

/* Login Card */
.login-container {
    background: white;
    padding: 40px 36px;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.login-container h2 {
    text-align: left;
    color: #003863;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 28px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 600;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s ease;
    background: #f9fafb;
}

.form-group input:focus {
    outline: none;
    border-color: #003863;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 56, 99, 0.1);
}

.form-group input::placeholder {
    color: #9ca3af;
}

/* Password Input with Toggle */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 48px;
}

.btn-toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #6b7280;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-toggle-password:hover {
    color: #003863;
}

.btn-toggle-password .eye-icon {
    width: 20px;
    height: 20px;
}

/* Inline Form Group (Remember Me) */
.form-group-inline {
    margin-bottom: 20px;
}

/* Custom Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #4b5563;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 20px;
    width: 20px;
    background-color: #f3f4f6;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-label:hover .checkmark {
    border-color: #003863;
}

.checkbox-label input:checked ~ .checkmark {
    background-color: #003863;
    border-color: #003863;
}

.checkbox-label input:checked ~ .checkmark::after {
    content: "✓";
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-label input:focus ~ .checkmark {
    box-shadow: 0 0 0 3px rgba(0, 56, 99, 0.2);
}

/* === BUTTONS === */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:active {
    transform: scale(0.98);
}

.btn.full-width {
    width: 100%;
}

.btn-primary {
    background: #003863;
    color: white;
    box-shadow: 0 4px 14px rgba(0, 56, 99, 0.3);
}

.btn-primary:hover {
    background: #004d8a;
    box-shadow: 0 6px 20px rgba(0, 56, 99, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #ffffff;
    color: #003863;
    border: 2px solid #003863;
}

.btn-secondary:hover {
    background: #003863;
    color: #ffffff;
}

.btn-outline-light {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
}

/* === ERROR MESSAGES === */
.error-message {
    color: #ef4444;
    margin-top: 12px;
    font-size: 14px;
    padding: 12px 16px;
    background: #fef2f2;
    border-radius: 8px;
    border-left: 4px solid #ef4444;
    display: none;
}

.error-message:not(:empty) {
    display: block;
}

/* Mavi arka planda hata mesajı */
.section-header ~ .error-message,
#selection-error {
    background: rgba(239, 68, 68, 0.15);
    color: #fecaca;
    border-left-color: #f87171;
}

/* ============================================
   SELECTION SCREEN
   ============================================ */
.truck-list-container {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    max-height: 500px;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Custom Scrollbar */
.truck-list-container::-webkit-scrollbar,
.fleet-list::-webkit-scrollbar {
    width: 8px;
}

.truck-list-container::-webkit-scrollbar-track,
.fleet-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.truck-list-container::-webkit-scrollbar-thumb,
.fleet-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.truck-list-container::-webkit-scrollbar-thumb:hover,
.fleet-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.truck-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.truck-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 10px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.truck-item:hover {
    background: #f0f7ff;
    border-color: #003863;
}

.truck-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    accent-color: #003863;
    cursor: pointer;
}

.truck-item label {
    cursor: pointer;
    flex: 1;
    font-weight: 500;
    color: #1e293b;
    font-size: 14px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   DASHBOARD SCREEN
   ============================================ */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 24px 28px;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.header h1 {
    color: #003863;
    font-size: 24px;
    font-weight: 700;
}

.header .section-subtitle {
    color: #6b7280;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.dashboard-content {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
}

/* Sidebar */
.sidebar {
    background: white;
    padding: 24px;
    border-radius: 16px;
    height: fit-content;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.sidebar h2 {
    margin-bottom: 16px;
    color: #003863;
    font-size: 18px;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f4f8;
}

.fleet-list {
    max-height: 350px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.fleet-item {
    padding: 14px 16px;
    margin-bottom: 10px;
    background: #f8fafc;
    border-radius: 10px;
    border-left: 4px solid #003863;
    cursor: pointer;
    transition: all 0.2s ease;
    cursor: pointer;
}

.fleet-item:hover {
    background: #f0f7ff;
    transform: translateX(4px);
}

.fleet-item.selected {
    background: #e0f2fe;
    border-left-color: #0284c7;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.2);
}

.fleet-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.truck-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}

/* Status Badges */
.truck-status {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.truck-status {
    background: #fef3c7;
    color: #92400e;
}

.truck-status.active {
    background: #d1fae5;
    color: #065f46;
}

.truck-status.offline {
    background: #fee2e2;
    color: #991b1b;
}

/* Stats */
.stats {
    border-top: 2px solid #f0f4f8;
    padding-top: 16px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.stat-item:not(:last-child) {
    border-bottom: 1px solid #f0f4f8;
}

.stat-label {
    color: #64748b;
    font-size: 14px;
}

.stat-value {
    font-weight: 700;
    font-size: 20px;
    color: #003863;
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Map Container */
.map-container {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    height: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

/* Truck Details Card */
.truck-details {
    background: white;
    padding: 24px 28px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-height: 600px;
    overflow-y: auto;
}

.truck-details h3 {
    margin-bottom: 16px;
    color: #003863;
    font-size: 18px;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f4f8;
    position: sticky;
    top: -24px;
    background: white;
    z-index: 1;
}

#truck-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#truck-info > p {
    color: #64748b;
    text-align: center;
    padding: 40px 20px;
}

/* Detail Sections */
.detail-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
}

.detail-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #003863;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-icon {
    width: 18px;
    height: 18px;
    stroke: #003863;
    flex-shrink: 0;
}

.section-icon-small {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    flex-shrink: 0;
    vertical-align: middle;
    margin-right: 4px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.brake-grid,
.tire-grid {
    grid-template-columns: repeat(6, 1fr);
}

.detail-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.detail-item:hover {
    border-color: #003863;
    box-shadow: 0 2px 8px rgba(0, 56, 99, 0.1);
}

.detail-label {
    font-size: 10px;
    color: #64748b;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.detail-value {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

/* Status Colors - Mobil app ile aynı mantık */

/* Yeşil: ABS/EBS mevcut, VDC/ROP normal, Voltaj uygun, Lastik basıncı >= 80 PSI */
.detail-item.status-ok {
    background: #dcfce7;
    border-color: #2E7D32;
}

.detail-item.status-ok .detail-value {
    color: #2E7D32;
}

/* Kırmızı: ABS/EBS yok, VDC/ROP müdahale, Voltaj uygun değil, Lastik basıncı < 80 PSI */
.detail-item.status-danger {
    background: #fee2e2;
    border-color: #d32f2f;
}

.detail-item.status-danger .detail-value {
    color: #d32f2f;
}

/* Turuncu: Veri yok */
.detail-item.status-nodata {
    background: #fef3c7;
    border-color: #f39c12;
}

.detail-item.status-nodata .detail-value {
    color: #f39c12;
}

/* Siyah/Normal: VDC/ROP pasif (normal durum) */
.detail-item.status-normal {
    background: #f8fafc;
    border-color: #334155;
}

.detail-item.status-normal .detail-value {
    color: #1e293b;
}

/* Detail Footer */
.detail-footer {
    text-align: right;
    font-size: 12px;
    color: #64748b;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

/* ============================================
   FOOTER
   ============================================ */
.app-footer {
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.footer-content span:not(:last-child)::after {
    content: "•";
    margin-left: 24px;
    opacity: 0.5;
}

/* ============================================
   LOADING STATES
   ============================================ */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.loading::before {
    content: "";
    display: block;
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    border: 3px solid #e5e7eb;
    border-top-color: #003863;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* === BUTTON LOADING SPINNER === */
.btn.loading-btn {
    position: relative;
    pointer-events: none;
    opacity: 0.85;
}

.btn.loading-btn .btn-text {
    visibility: hidden;
}

.btn.loading-btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn-primary.loading-btn::after {
    border-top-color: #ffffff;
}

.btn-secondary.loading-btn::after {
    border-top-color: #003863;
}

/* === SKELETON LOADING === */
.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Skeleton Table Row */
.skeleton-row {
    display: table-row;
}

.skeleton-row td {
    padding: 12px;
}

.skeleton-cell {
    height: 20px;
    border-radius: 4px;
}

.skeleton-cell.w-20 { width: 20%; }
.skeleton-cell.w-30 { width: 30%; }
.skeleton-cell.w-40 { width: 40%; }
.skeleton-cell.w-50 { width: 50%; }
.skeleton-cell.w-60 { width: 60%; }
.skeleton-cell.w-80 { width: 80%; }
.skeleton-cell.w-full { width: 100%; }

/* Skeleton Card */
.skeleton-card {
    background: white;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 12px;
}

.skeleton-card .skeleton-title {
    height: 16px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-card .skeleton-text {
    height: 12px;
    width: 80%;
    margin-bottom: 8px;
}

.skeleton-card .skeleton-text:last-child {
    width: 40%;
    margin-bottom: 0;
}

/* Skeleton for truck list */
.skeleton-truck-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 12px;
}

.skeleton-truck-item .skeleton-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 12px;
}

.skeleton-truck-item .skeleton-label {
    height: 16px;
    flex: 1;
}

/* Skeleton for stats */
.skeleton-stat {
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    padding: 20px;
    border-radius: 12px;
}

.skeleton-stat .skeleton-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
}

.skeleton-stat .skeleton-number {
    height: 28px;
    width: 60px;
    margin-bottom: 8px;
}

.skeleton-stat .skeleton-label-small {
    height: 14px;
    width: 80px;
}

/* Pulse animation alternative */
.skeleton-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Large Tablets & Small Laptops (1200px - 1400px) */
@media (max-width: 1400px) {
    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .brake-grid,
    .tire-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablets Landscape (900px - 1024px) */
@media (min-width: 900px) and (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 0 24px;
    }
    
    .login-layout {
        grid-template-columns: 1fr 380px;
        gap: 40px;
        max-width: 900px;
    }
    
    .login-intro h1 {
        font-size: 30px;
    }
    
    .dashboard-content {
        grid-template-columns: 280px 1fr;
        gap: 20px;
    }
    
    .sidebar {
        padding: 20px;
    }
    
    .fleet-list {
        max-height: 280px;
    }
    
    .map-container {
        height: 400px;
    }
    
    .truck-details {
        padding: 20px;
    }
    
    .history-filters {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    .filter-actions {
        grid-column: span 3;
        justify-content: center;
        margin-left: 0;
    }
    
    .history-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablets Portrait (768px - 900px) */
@media (min-width: 768px) and (max-width: 899px) {
    .container {
        padding: 0 20px;
    }
    
    .login-layout {
        grid-template-columns: 1fr;
        max-width: 500px;
        gap: 32px;
        margin: 40px auto;
    }
    
    .login-intro {
        text-align: center;
        padding-right: 0;
    }
    
    .login-intro h1 {
        font-size: 28px;
    }
    
    .dashboard-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sidebar {
        order: 2;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .sidebar h2 {
        grid-column: span 2;
    }
    
    .fleet-list {
        max-height: 200px;
    }
    
    .stats {
        border-top: none;
        padding-top: 0;
        grid-column: span 1;
    }
    
    .main-content {
        order: 1;
    }
    
    .map-container {
        height: 380px;
    }
    
    .header {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .header-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .header-actions .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .brake-grid,
    .tire-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .history-filters {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .filter-actions {
        grid-column: span 2;
        margin-left: 0;
    }
    
    .history-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .history-table th,
    .history-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
}

/* Small Tablets & Large Phones (max-width: 768px) */
@media (max-width: 1024px) {
    .login-layout {
        grid-template-columns: 1fr;
        max-width: 480px;
        gap: 40px;
    }
    
    .login-intro {
        text-align: center;
        padding-right: 0;
    }
    
    .login-intro h1 {
        font-size: 28px;
    }
    
    .feature-list li {
        text-align: left;
    }
    
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: 2;
    }
    
    .main-content {
        order: 1;
    }
    
    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .brake-grid,
    .tire-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .top-bar {
        padding: 0 16px;
        height: 64px;
    }
    
    .brand-logo-img {
        height: 40px;
    }
    
    .brand-text {
        display: none;
    }
    
    .app-main {
        padding: 20px 16px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .section-header h1 {
        font-size: 24px;
    }
    
    .truck-list {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    .map-container {
        height: 350px;
    }
    
    #truck-info {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 8px;
    }
    
    .footer-content span:not(:last-child)::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 28px 20px;
    }
    
    .login-intro h1 {
        font-size: 24px;
    }
    
    .header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* ============================================
   HISTORY SCREEN
   ============================================ */
.history-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 150px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.form-select,
.form-input {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #1f2937;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-select:focus,
.form-input:focus {
    outline: none;
    border-color: #003863;
    box-shadow: 0 0 0 3px rgba(0, 56, 99, 0.1);
}

.filter-actions {
    display: flex;
    gap: 12px;
    flex-direction: row;
    margin-left: auto;
}

.history-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 48px;
    height: 48px;
    padding: 10px;
    background: rgba(0, 56, 99, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 28px;
    height: 28px;
    stroke: #003863;
}

.stat-icon-truck {
    background: rgba(16, 185, 129, 0.1);
}

.stat-icon-truck svg {
    stroke: #10b981;
}

.stat-icon-alert {
    background: rgba(239, 68, 68, 0.1);
}

.stat-icon-alert svg {
    stroke: #ef4444;
}

.stat-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #003863;
}

.stat-card .stat-label {
    font-size: 13px;
    color: #6b7280;
}

.history-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.history-table thead {
    background: #003863;
    color: white;
}

.history-table th {
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.history-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.15s;
}

.history-table tbody tr:hover {
    background-color: #f9fafb;
}

.history-table td {
    padding: 12px;
    vertical-align: middle;
}

.history-table .no-data {
    text-align: center;
    padding: 40px 12px;
    color: #6b7280;
    font-style: italic;
}

/* Durum badge'leri */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Kritik kayıt satırı */
.history-table tbody tr.critical {
    background-color: #fef2f2;
}

.history-table tbody tr.critical:hover {
    background-color: #fee2e2;
}

/* Responsive tablo */
@media (max-width: 1024px) {
    .history-table-container {
        overflow-x: auto;
    }
    
    .history-filters {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-actions {
        margin-left: 0;
        width: 100%;
        justify-content: stretch;
    }
    
    .filter-actions button {
        flex: 1;
    }
}

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

/* ============================================
   MODAL
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #ffffff;
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #003863;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close-btn:hover {
    color: #ef4444;
}

.modal-body {
    padding: 0;
}

.modal-map {
    width: 100%;
    height: 350px;
    min-height: 350px;
    background: #e5e7eb;
    position: relative;
    z-index: 1;
}

.modal-map.leaflet-container {
    background: #e5e7eb;
}

.modal-info {
    padding: 20px 24px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
}

.modal-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-info-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-info-value {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

/* Tıklanabilir konum hücresi */
.location-link {
    color: #003863;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
    background: rgba(0, 56, 99, 0.05);
}

.location-link:hover {
    background: rgba(0, 56, 99, 0.15);
    color: #002244;
}

.location-link svg {
    width: 14px;
    height: 14px;
}

@media (max-width: 640px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-map {
        height: 280px;
    }
    
    .modal-info {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   INFO PAGES (Hakkımızda, İletişim, KVKK)
   ============================================ */
.info-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px;
}

.info-header {
    margin-bottom: 30px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.2s;
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

.back-link svg {
    width: 18px;
    height: 18px;
}

.info-page h1 {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 30px;
}

.info-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.info-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e5e7eb;
}

.info-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.info-section h2 {
    font-size: 20px;
    font-weight: 600;
    color: #003863;
    margin-bottom: 16px;
}

.info-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-top: 20px;
    margin-bottom: 12px;
}

.intro-section {
    background: #f0f4f8;
    border-radius: 8px;
    padding: 20px !important;
    border: none !important;
}

.intro-section p {
    font-size: 16px;
    color: #374151;
    margin: 0;
}

.contact-list {
    list-style: none !important;
}

.contact-list li {
    padding-left: 0 !important;
}

.contact-list li::before {
    display: none !important;
}

.info-section p {
    font-size: 15px;
    line-height: 1.8;
    color: #4b5563;
}

.info-section ul {
    list-style: none;
    padding: 0;
    margin-top: 12px;
}

.info-section ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    font-size: 15px;
    color: #4b5563;
    line-height: 1.6;
}

.info-section ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background: #003863;
    border-radius: 50%;
}

.feature-list-page li::before {
    background: #10b981;
}

/* İletişim Kartları */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.contact-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.2s;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.contact-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: #003863;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon svg {
    width: 28px;
    height: 28px;
    stroke: #ffffff;
}

.contact-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #003863;
    margin-bottom: 12px;
}

.contact-card p {
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 4px;
    line-height: 1.5;
}

.contact-card a {
    color: #003863;
    text-decoration: none;
}

.contact-card a:hover {
    text-decoration: underline;
}

.contact-card-wide {
    grid-column: span 2;
}

.contact-card .fax {
    color: #6b7280;
    font-size: 13px;
}

.contact-card-ethics {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
}

.ethics-icon {
    background: #f59e0b !important;
}

.ethics-desc {
    font-size: 13px;
    color: #92400e;
    margin-bottom: 8px !important;
}

/* About Page */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-paragraph {
    font-size: 16px;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 24px;
    text-align: justify;
}

.about-paragraph:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .contact-card-wide {
        grid-column: span 1;
    }
}

/* KVKK Legal Content */
.legal-content .info-section ul li::before {
    background: #6b7280;
}

.info-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.info-footer p {
    font-size: 13px;
    color: #9ca3af;
}

/* Footer Güncelleme */
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-info {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive */
@media (max-width: 768px) {
    .info-page h1 {
        font-size: 28px;
    }
    
    .info-content {
        padding: 24px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
    
    .footer-info {
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-white { color: #ffffff; }
.text-muted { color: #64748b; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.hidden { display: none !important; }
