/* ========================================
   SEAL CAR RENTAL - FULL RESPONSIVE CSS
   Mobile-First Design
   ======================================== */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #6366f1;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    /* Responsive breakpoints */
    --mobile: 768px;
    --tablet: 1024px;
    --desktop: 1280px;
}

/* ========================================
   GLOBAL RESET & BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ========================================
   APP CONTAINER (MOBILE-FIRST)
   ======================================== */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ========================================
   SIDEBAR (RESPONSIVE)
   ======================================== */
.sidebar {
    width: 100%;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 1000;
    border-top: 1px solid var(--border-color);
}

.sidebar-header {
    display: none;
    /* Hidden on mobile */
}

.sidebar-nav {
    display: flex;
    justify-content: space-around;
    padding: 0.5rem;
    background: white;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    font-size: 0.75rem;
    min-width: 60px;
}

.nav-link i {
    font-size: 1.25rem;
}

.nav-link span {
    font-size: 0.625rem;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary-gradient);
    color: white;
}

.nav-divider,
.nav-section {
    display: none;
    /* Hidden on mobile */
}

/* ========================================
   MAIN CONTAINER (RESPONSIVE)
   ======================================== */
.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding-bottom: 70px;
    /* Space for bottom nav */
}

/* ========================================
   TOP BAR (RESPONSIVE)
   ======================================== */
.top-bar {
    background: white;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 999;
    padding: 0.75rem 1rem;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-info {
    display: none;
    /* Hidden on mobile */
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-logout span {
    display: none;
    /* Hide text on mobile */
}

.btn-logout:hover {
    background: var(--danger-color);
    color: white;
}

/* ========================================
   PAGE CONTENT (RESPONSIVE)
   ======================================== */
.page-content {
    flex: 1;
    padding: 1rem;
    max-width: 100%;
    overflow-x: hidden;
}

/* Navbar layout tweaks to avoid shifting on smaller widths */
.layout-navbar .navbar-nav-right {
    width: 100%;
}

@media (max-width: 991.98px) {
    .layout-navbar .navbar-nav-right {
        justify-content: space-between;
    }

    .layout-navbar .navbar-nav-right > .d-none.d-md-block {
        display: none !important;
    }
}

/* ========================================
   DASHBOARD STYLES (RESPONSIVE)
   ======================================== */
.dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 1400px;
    margin: 0 auto;
}

.welcome-card {
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.25rem;
    color: white;
    box-shadow: var(--shadow-md);
}

.welcome-title {
    font-size: clamp(1.35rem, 2.4vw, 1.9rem);
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.welcome-subtitle {
    font-size: clamp(0.85rem, 1.6vw, 1.05rem);
    margin: 0;
    opacity: 0.95;
}

/* Stats Grid (Mobile-First) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.stat-card {
    border-radius: var(--radius-md);
    padding: 1.25rem;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: var(--shadow-md);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.stat-card-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stat-card-orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.stat-card-cyan {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
}

.stat-badge {
    background: rgba(255, 255, 255, 0.3);
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    font-size: 0.625rem;
    font-weight: 600;
}

.stat-number {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.95;
}

.stat-button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
}

@media (min-width: 641px) and (max-width: 767px) {
    .stats-grid,
    .quick-actions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .welcome-card {
        padding: 1.25rem 1rem;
    }

    .stat-button {
        width: 100%;
        text-align: center;
    }

    .quick-action-card {
        padding: 1rem 0.85rem;
    }
}

/* If there is an odd number of cards on tablet, make the last one span full width
   so it doesn't look visually "shifted" on the second row. */
@media (min-width: 641px) and (max-width: 1023.98px) {
    .stats-grid > *:last-child:nth-child(2n + 1) {
        grid-column: 1 / -1;
    }

    .quick-actions-grid > *:last-child:nth-child(2n + 1) {
        grid-column: 1 / -1;
    }
}

/* Quick Actions */
.quick-actions-section {
    margin-top: 0.75rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.9rem;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.quick-action-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.1rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-family: inherit;
    height: 100%;
    min-width: 0;
}

.quick-action-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.quick-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quick-card-icon .material-icons {
    font-size: 1.6rem;
    color: white;
}

.quick-card-purple .quick-card-icon { background: linear-gradient(135deg, #7367f0 0%, #9e95f5 100%); }
.quick-card-green .quick-card-icon { background: linear-gradient(135deg, #28c76f 0%, #48da89 100%); }
.quick-card-orange .quick-card-icon { background: linear-gradient(135deg, #ff9f43 0%, #ffb976 100%); }
.quick-card-blue .quick-card-icon { background: linear-gradient(135deg, #00cfe8 0%, #5ce0f5 100%); }

.quick-card-content {
    flex: 1;
    min-width: 0;
}

.quick-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #5e5873;
    margin: 0 0 0.25rem 0;
}

.quick-card-desc {
    font-size: 0.8rem;
    color: #b9b9c3;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-card-arrow {
    font-size: 1.2rem;
    color: #b9b9c3;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.quick-action-card:hover .quick-card-arrow {
    transform: translateX(4px);
}

.quick-card-purple:hover { border-color: #7367f0; }
.quick-card-green:hover { border-color: #28c76f; }
.quick-card-orange:hover { border-color: #ff9f43; }
.quick-card-blue:hover { border-color: #00cfe8; }

.quick-card-purple:hover .quick-card-arrow { color: #7367f0; }
.quick-card-green:hover .quick-card-arrow { color: #28c76f; }
.quick-card-orange:hover .quick-card-arrow { color: #ff9f43; }
.quick-card-blue:hover .quick-card-arrow { color: #00cfe8; }

/* ========================================
   DATA CARDS & TABLES (RESPONSIVE)
   ======================================== */
.data-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    overflow: hidden;
}

.data-card-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.section-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.data-card-body {
    padding: 0;
    overflow-x: auto;
}

/* Radzen DataGrid Responsive */
.rz-datatable {
    min-width: 100%;
    font-size: 0.875rem;
}

.rz-datatable th,
.rz-datatable td {
    padding: 0.75rem 0.5rem !important;
    white-space: nowrap;
}

/* ========================================
   RENTAL MODAL (RESPONSIVE)
   ======================================== */
.modal-card {
    width: 100%;
    max-width: 100%;
}

@media (max-width: 640px) {
    .modal-card {
        max-width: 100%;
        border-radius: 0;
    }

    .modal-card .form-row.form-row-2 {
        grid-template-columns: 1fr;
    }

    .modal-card .form-actions .btn {
        width: 100%;
    }

    .modal-card .form-actions {
        flex-direction: column-reverse;
    }
}

/* ========================================
   BUTTONS (RESPONSIVE)
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon-edit {
    background: #3b82f6;
    color: white;
}

.btn-icon-delete {
    background: var(--danger-color);
    color: white;
}

.btn-icon-success {
    background: var(--success-color);
    color: white;
}

.btn-icon-info {
    background: #06b6d4;
    color: white;
}

/* ========================================
   FORMS (RESPONSIVE)
   ======================================== */
.form-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.form-row-2 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .form-row-2 {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-label .material-icons {
    font-size: 1rem;
    color: var(--primary-color);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    transition: all 0.2s ease;
    font-family: inherit;
    color: #1f2937 !important;
    /* Dark text color for visibility */
    background-color: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.validation-message {
    color: var(--danger-color);
    font-size: 0.75rem;
}

/* ========================================
   MODAL (RESPONSIVE)
   ======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1.5rem;
    box-sizing: border-box;
}

.modal-card {
    background: white;
    border-radius: 18px;
    width: 100%;
    max-width: 920px;
    max-height: 90vh;
    margin: 0 auto;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 1.25rem 1.5rem 1rem;
    overflow-y: auto;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    padding: 0.9rem 1.5rem 1.1rem;
    border-top: 1px solid var(--border-color);
    position: sticky;
    bottom: 0;
    background: white;
}

.form-actions .btn {
    flex: 1;
}

@media (max-width: 640px) {
    .modal-overlay {
        padding: 0.75rem;
        align-items: flex-end;
    }

    .modal-card {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 92vh;
    }

    .modal-body {
        padding: 1rem 1rem 0.75rem;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .btn {
        width: 100%;
    }
}

/* ========================================
   BADGES (RESPONSIVE)
   ======================================== */
.data-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-purple {
    background: #ede9fe;
    color: #7c3aed;
}

.badge-success {
    background: #d1fae5;
    color: #059669;
}

.badge-secondary {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-success {
    background: #d1fae5;
    color: #059669;
}

.status-warning {
    background: #fef3c7;
    color: #d97706;
}

/* ========================================
   SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: var(--radius-sm);
}

/* ========================================
   TABLET (768px+)
   ======================================== */
@media (min-width: 768px) {

    /* Sidebar becomes side panel */
    .app-container {
        flex-direction: row;
    }

    .sidebar {
        width: 240px;
        height: 100vh;
        position: fixed;
        left: 0;
        top: 0;
        bottom: auto;
        border-top: none;
        border-right: 1px solid var(--border-color);
        flex-direction: column;
    }

    .sidebar-header {
        display: block;
        padding: 1.5rem;
        border-bottom: 1px solid var(--border-color);
    }

    .sidebar-nav {
        flex-direction: column;
        padding: 1rem;
        overflow-y: auto;
    }

    .nav-link {
        flex-direction: row;
        justify-content: flex-start;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        min-width: auto;
    }

    .nav-link span {
        font-size: 0.875rem;
    }

    .main-container {
        margin-left: 240px;
        padding-bottom: 0;
    }

    .top-bar {
        padding: 1rem 1.5rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .user-info {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .user-details {
        display: flex;
        flex-direction: column;
    }

    .user-name {
        font-weight: 600;
        font-size: 0.875rem;
    }

    .user-role {
        font-size: 0.75rem;
        color: var(--text-secondary);
    }

    .btn-logout span {
        display: inline;
    }

    .page-content {
        padding: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quick-actions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-row-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-overlay {
        align-items: center;
        padding: 1rem;
    }

    .modal-card {
        max-width: 820px;
        border-radius: var(--radius-lg);
        max-height: 85vh;
    }
}

/* ========================================
   DESKTOP (1024px+)
   ======================================== */
@media (min-width: 1024px) {
    .sidebar {
        width: 280px;
    }

    .main-container {
        margin-left: 280px;
    }

    .page-content {
        padding: 2rem;
    }

    .stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .quick-actions-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .welcome-title {
        font-size: 1.75rem;
    }

    .welcome-subtitle {
        font-size: 1rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .modal-card {
        max-width: 920px;
    }
}

/* ========================================
   LARGE DESKTOP (1280px+)
   ======================================== */
@media (min-width: 1280px) {
    .page-content {
        max-width: 1400px;
        margin: 0 auto;
    }
}

/* ========================================
   FUEL SECTION STYLES
   ======================================== */
.fuel-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
}

.fuel-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fuel-badge {
    background: var(--primary-gradient);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 700;
}

.fuel-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #ef4444 0%, #f59e0b 50%, #10b981 100%);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.fuel-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 3px solid var(--primary-color);
}

.fuel-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 3px solid var(--primary-color);
}

.fuel-segments {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.375rem;
    margin-top: 0.5rem;
}

.fuel-segment {
    height: 32px;
    border-radius: 6px;
    background: #e5e7eb;
    transition: all 0.3s ease;
}

.fuel-segment.fuel-low {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.fuel-segment.fuel-medium {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.fuel-segment.fuel-high {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.fuel-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ========================================
   MULTISELECT DROPDOWN STYLES
   ======================================== */
/* MultiSelect Dropdown - button görünümü */
.msd-root .form-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;              /* sizin modal input yüksekliği neyse ona eşitle */
  border-radius: 14px;       /* ekrandaki yuvarlak forma göre */
  padding: 0 16px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  color: #222;
}

.msd-root .form-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); /* soft focus */
  border-color: rgba(99, 102, 241, 0.45);
}

.msd-root .form-select .text-truncate {
  max-width: calc(100% - 28px);
}

/* Dropdown panel */
.msd-root .dropdown-menu {
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.10);
}

/* Checkbox satır hover */
.msd-root .dropdown-menu label:hover {
  background: rgba(0,0,0,.04);
}

/* + butonu tasarımı */
.msd-add-btn {
  height: 56px;
  width: 56px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  color: #222;
  display: grid;
  place-items: center;
  flex: 0 0 56px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 24px;
  line-height: 1;
}

.msd-add-btn:hover {
  background: rgba(0,0,0,.03);
}

.msd-add-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.45);
}

/* ========================================
   RENTAL MODAL - Header/Body/Footer Layout
   ======================================== */
.rental-modal {
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

/* Header: okunur, sabit, box-shadow ile ayrım - !important ile Bootstrap override */
.modal-content.rental-modal .rental-modal__header,
.rental-modal__header {
  position: sticky !important;
  top: 0 !important;
  z-index: 2 !important;
  background: #f7f8fb !important;
  border-bottom: 1px solid #e4e8f0 !important;
  padding: 1rem 1.5rem !important; /* 16px 24px - dengeli padding */
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04) !important;
  gap: 1rem !important; /* Başlık ve close butonu arasında boşluk */
}

.modal-content.rental-modal .rental-modal__header .modal-title,
.rental-modal__header .modal-title {
  font-size: 1.125rem !important;
  font-weight: 700 !important;
  margin: 0 !important;
  color: #1f2937 !important;
  line-height: 1.4 !important;
  flex: 1 !important; /* Başlık esnek, close butonu sağda sabit */
}

/* Close butonu - modern ve ergonomik */
.modal-content.rental-modal .rental-modal__header .btn-close,
.rental-modal__header .btn-close {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M12 4L4 12M4 4l8 8' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 18px 18px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0 !important;
  position: relative !important; /* Absolute positioning yok, normal flow */
  opacity: 1 !important; /* Görünür olmalı */
}

.modal-content.rental-modal .rental-modal__header .btn-close:hover,
.rental-modal__header .btn-close:hover {
  background-color: #f3f4f6 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M12 4L4 12M4 4l8 8' stroke='%234b5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  opacity: 1 !important;
}

.modal-content.rental-modal .rental-modal__header .btn-close:focus,
.rental-modal__header .btn-close:focus {
  background-color: #f3f4f6 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M12 4L4 12M4 4l8 8' stroke='%234b5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  opacity: 1 !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2) !important;
}

/* Bootstrap'ın ::before pseudo-element'ini kaldır */
.modal-content.rental-modal .rental-modal__header .btn-close::before,
.rental-modal__header .btn-close::before {
  display: none !important;
}

/* Body: sadece burası scroll, header'dan sonra boşluk - !important ile Bootstrap override */
.modal-content.rental-modal .rental-modal__body,
.rental-modal__body {
  max-height: calc(90vh - 140px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 1rem !important; /* 16px - azaltıldı */
  padding-top: 1.25rem !important; /* 20px - azaltıldı */
  flex: 1 !important;
  padding-bottom: 0.75rem !important; /* 12px - azaltıldı */
}

/* Footer: en altta sabit, buton stilleri - !important ile Bootstrap override */
.modal-content.rental-modal .rental-modal__footer,
.rental-modal__footer {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 2 !important;
  background: #fff !important;
  border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
  padding: 16px !important;
  display: flex !important;
  gap: 12px !important;
  justify-content: flex-end !important;
  flex-shrink: 0 !important;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.04) !important;
}

.modal-content.rental-modal .rental-modal__footer .btn,
.rental-modal__footer .btn {
  min-width: 120px !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}

/* İptal butonu: daha soluk, outline style */
.modal-content.rental-modal .rental-modal__footer .btn-light,
.rental-modal__footer .btn-light {
  background: #f9fafb !important;
  border: 1px solid #e5e7eb !important;
  color: #6b7280 !important;
}

.modal-content.rental-modal .rental-modal__footer .btn-light:hover,
.rental-modal__footer .btn-light:hover {
  background: #f3f4f6 !important;
  border-color: #d1d5db !important;
  color: #4b5563 !important;
}

/* Kaydet butonu: daha baskın, gradient */
.modal-content.rental-modal .rental-modal__footer .btn-primary,
.rental-modal__footer .btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border: none !important;
  color: white !important;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3) !important;
}

.modal-content.rental-modal .rental-modal__footer .btn-primary:hover:not(:disabled),
.rental-modal__footer .btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%) !important;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
  transform: translateY(-1px) !important;
}

.modal-content.rental-modal .rental-modal__footer .btn-primary:disabled,
.rental-modal__footer .btn-primary:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* Spinner için */
.rental-modal__footer .btn-primary .spinner-border-sm {
  width: 0.875rem;
  height: 0.875rem;
  border-width: 0.15em;
  margin-right: 0.5rem;
}

/* ========================================
   RENTAL MODAL FORM - Compact & Symmetric
   ======================================== */
.rental-modal__body .form-container {
  gap: 0.375rem !important; /* 6px - daha kompakt */
  margin: 0 !important;
}

.rental-modal__body .form-row {
  gap: 0.75rem !important;
  margin-bottom: 0 !important;
}

/* Satırlar arası boşluk - minimal dikey ritim */
.rental-modal__body .form-row:not(:last-child) {
  margin-bottom: 0.5rem !important; /* 8px - azaltıldı */
}

/* Section içindeki son form-row'un alt boşluğunu kaldır */
.rental-modal__body .form-section .form-row:last-child {
  margin-bottom: 0 !important;
}

/* Hasar Notu satırından önce normalleştirilmiş boşluk */
.rental-modal__body .form-row:has(.form-textarea) {
  margin-top: 0 !important; /* Kaldırıldı */
}

.modal-content.rental-modal .rental-modal__body .form-row-2,
.rental-modal__body .form-row-2 {
  grid-template-columns: 1fr 1fr !important;
  gap: 0.75rem !important;
}

/* Hasar Notu / Ek Paket için 55/45 oranı - textarea içeren satır */
.modal-content.rental-modal .rental-modal__body .form-row-2:has(.form-textarea),
.rental-modal__body .form-row-2:has(.form-textarea) {
  grid-template-columns: 1.22fr 1fr !important; /* ~55/45 oranı */
}

.rental-modal__body .form-group {
  gap: 0.25rem !important; /* 4px - azaltıldı */
  margin-bottom: 0 !important;
}

/* Label-input arası boşluk standardizasyonu - minimal */
.modal-content.rental-modal .rental-modal__body .form-label,
.rental-modal__body .form-label {
  margin-bottom: 0.1875rem !important; /* 3px - azaltıldı */
}

.rental-modal__body .form-label {
  margin-bottom: 0 !important;
  font-size: 0.8125rem !important;
  gap: 0.4rem !important;
  line-height: 1.2 !important;
}

.rental-modal__body .form-label .material-icons {
  font-size: 1rem !important;
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0 !important;
  color: #6b7280 !important;
}

.rental-modal__body .form-input,
.rental-modal__body .form-select,
.rental-modal__body .form-textarea {
  padding: 0.6rem 0.75rem !important;
  font-size: 0.875rem !important;
  min-height: 40px !important;
  line-height: 1.4 !important;
}

/* Placeholder renkleri - daha okunur */
.modal-content.rental-modal .rental-modal__body .form-input::placeholder,
.rental-modal__body .form-input::placeholder,
.modal-content.rental-modal .rental-modal__body .form-textarea::placeholder,
.rental-modal__body .form-textarea::placeholder {
  color: #6b7280 !important;
  opacity: 1 !important;
}

.modal-content.rental-modal .rental-modal__body .form-select option:first-child,
.rental-modal__body .form-select option:first-child {
  color: #6b7280 !important;
}

.rental-modal__body .form-textarea {
  min-height: 70px !important;
  resize: vertical !important;
}

/* Form section başlıkları - boşluk tamamen kaldırıldı */
.rental-modal__body .form-section {
  margin-bottom: 0 !important; /* Boşluk tamamen kaldırıldı */
}

.rental-modal__body .form-section:last-of-type {
  margin-bottom: 0 !important;
}

.rental-modal__body .form-section-header {
  margin-bottom: 0.125rem !important; /* Sadece başlık altında minimal boşluk (2px) */
}

.rental-modal__body .form-section-title {
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: #9ca3af !important;
}

/* Label açıklama metni (ör: Opsiyonel, Birden fazla seçilebilir) */
.rental-modal__body .form-label-hint {
  color: #6b7280 !important;
  font-weight: 400 !important;
  font-size: 0.8125rem !important;
}

.rental-modal__body .validation-message {
  font-size: 0.6875rem !important;
  margin-top: 0.2rem !important;
  margin-bottom: 0 !important;
  line-height: 1.2 !important;
}

/* Fuel section compact - daha kompakt ve hizalı */
.modal-content.rental-modal .rental-modal__body .fuel-section,
.rental-modal__body .fuel-section {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 0.625rem !important; /* 10px - azaltıldı */
  background: #f9fafb !important;
  border-radius: 8px !important;
  border: 1px solid #e5e7eb !important;
}

.rental-modal__body .fuel-header-section {
  margin-bottom: 0.375rem !important; /* 6px - azaltıldı */
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.5rem;
}

.rental-modal__body .fuel-header-section .form-label {
  margin-bottom: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
}

.rental-modal__body .fuel-header-section .form-label .material-icons {
  font-size: 0.9375rem !important;
  width: 18px !important;
  height: 18px !important;
}

.rental-modal__body .fuel-badge {
  font-size: 0.8125rem !important;
  padding: 0.25rem 0.625rem !important;
  flex-shrink: 0;
}

.rental-modal__body .fuel-slider {
  margin: 0.5rem 0 !important;
  height: 6px !important;
}

.rental-modal__body .fuel-segments {
  margin: 0.4rem 0 !important;
  gap: 0.3rem !important;
}

.rental-modal__body .fuel-segment {
  height: 28px !important;
}

.rental-modal__body .fuel-labels {
  margin-top: 0.35rem !important;
  font-size: 0.6875rem !important;
  gap: 0.25rem;
}

/* Vehicle picker, employee picker compact - hizalama */
.modal-content.rental-modal .rental-modal__body .vehicle-picker,
.rental-modal__body .vehicle-picker,
.modal-content.rental-modal .rental-modal__body .employee-picker,
.rental-modal__body .employee-picker {
  gap: 0.5rem !important;
  display: flex !important;
  align-items: stretch !important;
}

.rental-modal__body .vehicle-picker__select,
.rental-modal__body .employee-picker__select {
  flex: 1 !important;
  min-width: 0 !important;
}

.modal-content.rental-modal .rental-modal__body .vehicle-picker__add,
.rental-modal__body .vehicle-picker__add,
.modal-content.rental-modal .rental-modal__body .employee-picker__add,
.rental-modal__body .employee-picker__add,
.modal-content.rental-modal .rental-modal__body .msd-add-btn,
.rental-modal__body .msd-add-btn {
  min-width: 40px !important;
  width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  border-radius: 8px !important;
  border: 2px solid #e5e7eb !important;
  background: #fff !important;
  color: #6366f1 !important;
  transition: all 0.2s ease !important;
  font-size: 1.25rem !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

/* Material Icons içindeki add ikonunu aynı boyutta göster */
.modal-content.rental-modal .rental-modal__body .vehicle-picker__add .material-icons,
.rental-modal__body .vehicle-picker__add .material-icons,
.modal-content.rental-modal .rental-modal__body .employee-picker__add .material-icons,
.rental-modal__body .employee-picker__add .material-icons,
.modal-content.rental-modal .rental-modal__body .msd-add-btn .material-icons,
.rental-modal__body .msd-add-btn .material-icons {
  font-size: 1.25rem !important;
  line-height: 1 !important;
  color: #6366f1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.modal-content.rental-modal .rental-modal__body .vehicle-picker__add:hover,
.rental-modal__body .vehicle-picker__add:hover,
.modal-content.rental-modal .rental-modal__body .employee-picker__add:hover,
.rental-modal__body .employee-picker__add:hover,
.modal-content.rental-modal .rental-modal__body .msd-add-btn:hover,
.rental-modal__body .msd-add-btn:hover {
  border-color: #6366f1 !important;
  background: #f0f4ff !important;
  transform: scale(1.05) !important;
}

.modal-content.rental-modal .rental-modal__body .vehicle-picker__add:active,
.rental-modal__body .vehicle-picker__add:active,
.modal-content.rental-modal .rental-modal__body .employee-picker__add:active,
.rental-modal__body .employee-picker__add:active,
.modal-content.rental-modal .rental-modal__body .msd-add-btn:active,
.rental-modal__body .msd-add-btn:active {
  transform: scale(0.95) !important;
}

/* MultiSelectDropdown in modal - hizalama ve stil - GRİ BLOK SORUNU ÇÖZÜMÜ */
.modal-content.rental-modal .rental-modal__body .multiselect-dropdown,
.rental-modal__body .multiselect-dropdown {
  margin: 0 !important;
  display: flex !important;
  align-items: stretch !important;
  width: 100% !important;
}

/* MultiSelectDropdown butonu - GRİ BLOK SORUNU ÇÖZÜMÜ */
.modal-content.rental-modal .rental-modal__body .multiselect-button,
.rental-modal__body .multiselect-button {
  min-height: 40px !important;
  padding: 0.6rem 0.75rem !important;
  padding-right: 2.75rem !important;
  border: 2px solid #e5e7eb !important;
  border-radius: 8px !important;
  background: #ffffff !important; /* GRİ BLOK SORUNU: Gradient yerine düz beyaz */
  background-image: none !important; /* Gradient'i kaldır */
  color: #1f2937 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  text-align: left !important;
  box-shadow: none !important;
}

.modal-content.rental-modal .rental-modal__body .multiselect-button:hover:not(:disabled),
.rental-modal__body .multiselect-button:hover:not(:disabled) {
  background: #ffffff !important; /* Hover'da da beyaz */
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
}

.modal-content.rental-modal .rental-modal__body .multiselect-button:focus,
.rental-modal__body .multiselect-button:focus,
.modal-content.rental-modal .rental-modal__body .multiselect-button.is-open,
.rental-modal__body .multiselect-button.is-open {
  background: #ffffff !important; /* Focus'ta da beyaz */
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
}

/* MultiSelectDropdown text - placeholder görünürlüğü */
.modal-content.rental-modal .rental-modal__body .multiselect-text,
.rental-modal__body .multiselect-text {
  flex: 1 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  padding-right: 0.5rem !important;
  color: #1f2937 !important;
  background: transparent !important; /* Arka plan yok */
}

.modal-content.rental-modal .rental-modal__body .multiselect-text .placeholder,
.rental-modal__body .multiselect-text .placeholder {
  color: #6b7280 !important;
  font-weight: 400 !important;
  opacity: 1 !important;
  display: inline !important;
  visibility: visible !important;
}

/* Payment method section - hizalama */
.modal-content.rental-modal .rental-modal__body .d-flex.gap-2,
.rental-modal__body .d-flex.gap-2 {
  gap: 0.5rem !important;
  display: flex !important;
  align-items: stretch !important;
}

/* ========================================
   MULTISELECT DROPDOWN - GRİ BLOK SORUNU ÇÖZÜMÜ
   app.css'teki form-select gradient'ini override et
   ======================================== */
/* Tüm olası selector kombinasyonları ile override - EN YÜKSEK ÖNCELİK */
button.multiselect-button,
button.multiselect-button:hover,
button.multiselect-button:focus,
button.multiselect-button.is-open,
.modal-content.rental-modal button.multiselect-button,
.rental-modal button.multiselect-button,
.modal-content.rental-modal .rental-modal__body button.multiselect-button,
.rental-modal__body button.multiselect-button,
.modal button.multiselect-button,
body .rental-modal button.multiselect-button,
div[class*="rental-modal"] button.multiselect-button,
div[class*="modal"] button.multiselect-button {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important; /* Gradient'i kaldır */
  -webkit-background-image: none !important;
  -moz-background-image: none !important;
  -o-background-image: none !important;
  background-size: auto !important;
  background-position: unset !important;
  background-repeat: no-repeat !important;
  /* Gradient override için ekstra güvenlik */
  background-clip: padding-box !important;
  -webkit-background-clip: padding-box !important;
  -moz-background-clip: padding-box !important;
}

/* Multiselect text içeriği - placeholder görünürlüğü */
.modal-content.rental-modal .multiselect-text,
.rental-modal .multiselect-text,
.modal-content.rental-modal .rental-modal__body .multiselect-text,
.rental-modal__body .multiselect-text,
.modal .multiselect-text,
body .rental-modal .multiselect-text {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  -webkit-background-image: none !important;
  -moz-background-image: none !important;
  -o-background-image: none !important;
}

.modal-content.rental-modal .multiselect-text .placeholder,
.rental-modal .multiselect-text .placeholder,
.modal-content.rental-modal .rental-modal__body .multiselect-text .placeholder,
.rental-modal__body .multiselect-text .placeholder,
.modal .multiselect-text .placeholder,
body .rental-modal .multiselect-text .placeholder {
  color: #6b7280 !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: inline !important;
  font-weight: 400 !important;
}

/* Label'lar için tutarlı stil - uzun metinler için wrap */
.rental-modal__body .form-label {
  position: relative;
  flex-wrap: wrap;
  word-break: break-word;
}

/* Responsive: Mobile'da tek sütun ve full-width butonlar */
@media (max-width: 768px) {
  .rental-modal__body .form-row-2 {
    grid-template-columns: 1fr !important;
    gap: 0.625rem !important;
  }
  
  /* Hasar Notu / Ek Paket mobile'da da tek sütun */
  .rental-modal__body .form-row-2:has(.form-textarea) {
    grid-template-columns: 1fr !important;
  }
  
  .rental-modal__body {
    padding: 1rem !important;
    padding-top: 1.25rem !important;
  }
  
  .rental-modal__footer {
    flex-direction: column-reverse;
    gap: 0.75rem;
  }
  
  .rental-modal__footer .btn {
    width: 100%;
    min-width: unset;
  }
  
  /* Yakıt kartı mobile'da daha kompakt */
  .rental-modal__body .fuel-section {
    padding: 0.625rem !important;
  }
}

/* === Son güvenlik: ödeme yöntemleri butonundaki gri bloklarını ve overlay'lerini tamamen kapat === */
.multiselect-dropdown,
.multiselect-button,
.multiselect-button *,
.multiselect-text {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
}

.multiselect-button::before,
.multiselect-button::after,
.multiselect-dropdown::before,
.multiselect-dropdown::after {
  content: none !important;
  display: none !important;
}

button.multiselect-button {
  appearance: none !important;
  -webkit-appearance: none !important;
}