/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.login-header h1 {
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 1.8rem;
}

.login-header p {
    color: #666;
    font-size: 0.9rem;
}

.login-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 2px solid #e1e5e9;
}

.login-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
}

.login-tab.active {
    color: #667eea;
    border-bottom: 2px solid #667eea;
}

.login-form {
    display: block;
}

.login-form.active {
    display: block;
}

/* Container Layout */
.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo {
    display: flex;
    align-items: center;
    padding: 0 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.logo i {
    font-size: 2rem;
    margin-right: 10px;
    color: #ffd700;
}

.logo h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-links {
    list-style: none;
    padding: 0 20px;
}

.nav-links li {
    margin-bottom: 5px;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-links li:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-links li.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-links li {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: white;
    text-decoration: none;
    font-weight: 500;
}

.nav-links li i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 250px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: white;
    padding: 20px 30px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
}

.user-info i {
    font-size: 1.2rem;
}

/* Content Area */
.content {
    flex: 1;
    padding: 30px;
}

/* Page Navigation */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 1.5rem;
    color: white;
}

.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.stat-card:nth-child(5) .stat-icon {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-content p {
    color: #666;
    font-size: 0.9rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.dashboard-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dashboard-card h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.2rem;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

td {
    color: #333;
}

tr:hover {
    background-color: #f8f9fa;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

/* Enhanced Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.btn-secondary {
    background: #6c757d;
    border: none;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

/* Page Headers */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h2 {
    color: #2c3e50;
    font-size: 1.8rem;
}

/* Filters */
.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.filters select,
.filters input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.filters input {
    min-width: 200px;
}

/* Inventory Tabs */
.inventory-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.tab-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tab-pane {
    display: none;
    padding: 20px;
}

.tab-pane.active {
    display: block;
}

/* Finance Cards */
.finance-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.finance-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.finance-card h3 {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.finance-card p {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
}

/* Reports Grid */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.report-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.report-card h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

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

.modal {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 25px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.modal-header h3 {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    padding: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Enhanced Modal Body Spacing */
.modal-body {
    padding: 30px;
}

.modal-body > *:first-child {
    margin-top: 0;
}

.modal-body > *:last-child {
    margin-bottom: 0;
}

/* Form Section Dividers */
.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

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

/* Enhanced Input Groups */
.input-group {
    position: relative;
}

.input-group .form-group {
    margin-bottom: 20px;
}

.input-group .form-group:last-child {
    margin-bottom: 0;
}

/* Better Visual Feedback */
.form-group input:valid,
.form-group select:valid {
    border-color: #28a745;
}

.form-group input:invalid:not(:placeholder-shown),
.form-group select:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
}

/* Enhanced Date Inputs */
.form-group input[type="date"] {
    position: relative;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

/* Enhanced Number Inputs */
.form-group input[type="number"] {
    -moz-appearance: textfield;
}

.form-group input[type="number"]::-webkit-outer-spin-button,
.form-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input[readonly] {
    background: #e9ecef;
    color: #495057;
    cursor: not-allowed;
}

/* Enhanced Select Styling */
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.form-group select:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23667eea' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

/* Multiple Select Styling */
.form-group select[multiple] {
    background-image: none;
    padding-right: 16px;
    min-height: 120px;
}

.form-group select[multiple] option {
    padding: 8px 12px;
    border-bottom: 1px solid #f1f3f4;
}

.form-group select[multiple] option:checked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Battery Pricing Section */
.battery-pricing-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #e9ecef;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.battery-pricing-section:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.battery-pricing-section label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    display: block;
    font-size: 1rem;
}

.battery-pricing-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.pricing-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.pricing-option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    z-index: 0;
}

.pricing-option:hover::before {
    width: 4px;
}

.pricing-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateX(4px);
}

.pricing-option input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: #667eea;
    position: relative;
    z-index: 1;
}

.pricing-option input[type="radio"]:checked + label {
    color: #667eea;
    font-weight: 600;
}

.pricing-option label {
    margin: 0;
    cursor: pointer;
    flex: 1;
    font-size: 1rem;
    position: relative;
    z-index: 1;
}

.battery-total {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    text-align: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    }
}

.battery-total strong {
    color: #28a745;
    font-size: 1.1em;
    animation: pulse 2s infinite;
}

/* Cost breakdown styles */
.cost-breakdown {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border-left: 4px solid #007bff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.cost-breakdown:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.cost-breakdown > div:first-child {
    font-weight: 600;
    margin-bottom: 12px;
    color: #007bff;
    font-size: 1.05em;
}

.cost-breakdown > div:not(:first-child):not(:last-child) {
    margin-bottom: 8px;
    padding: 4px 0;
    border-bottom: 1px solid #dee2e6;
}

.cost-breakdown > div:last-child {
    border-top: 2px solid #dee2e6;
    padding-top: 12px;
    margin-top: 12px;
    font-weight: 600;
    color: #28a745;
    font-size: 1.1em;
}

.cost-breakdown strong {
    color: #495057;
    font-weight: 600;
}

/* Table cost breakdown styles */
td div:first-child {
    color: #495057;
    font-size: 0.9em;
    margin-bottom: 2px;
}

td div:nth-child(2) {
    color: #6c757d;
    font-size: 0.9em;
    margin-bottom: 4px;
}

td div:last-child {
    color: #28a745;
    font-weight: 600;
    font-size: 1em;
    border-top: 1px solid #dee2e6;
    padding-top: 4px;
    margin-top: 4px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    margin-top: 30px;
}

.form-actions .btn {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.form-actions .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.form-actions .btn:hover::before {
    left: 100%;
}

.form-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Status Badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-completed {
    background: #d1ecf1;
    color: #0c5460;
}

.status-overdue {
    background: #f8d7da;
    color: #721c24;
}

.status-repair {
    background: #fff3cd;
    color: #856404;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    
    .sidebar .logo h2,
    .sidebar .nav-links span {
        display: none;
    }
    
    .main-content {
        margin-left: 60px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .header {
        padding: 15px 20px;
    }
    
    .content {
        padding: 20px;
    }

    .modal-overlay {
        padding: 10px;
    }
    
    .modal {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 20px 25px;
        border-radius: 12px 12px 0 0;
    }
    
    .modal-header h3 {
        font-size: 1.3rem;
    }
    
    .modal-body {
        padding: 20px 25px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-actions .btn {
        width: 100%;
        min-width: auto;
    }
    
    .battery-pricing-options {
        gap: 10px;
    }
    
    .pricing-option {
        padding: 10px 14px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

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

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.hidden {
    display: none;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success/Error Messages */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 16px;
    border-radius: 6px;
    font-weight: 500;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Detail Rows */
.detail-row {
    padding: 8px 0;
    border-bottom: 1px solid #e1e5e9;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row strong {
    color: #2c3e50;
    min-width: 120px;
    display: inline-block;
}

/* Rental Details */
.rental-details h4,
.customer-details h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #667eea;
}

/* Report Content */
.report-content {
    margin-bottom: 20px;
}

.report-content h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.report-content h4 {
    color: #495057;
    margin: 20px 0 10px 0;
}

.report-content p {
    margin: 8px 0;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
}

/* Status Badge for Logs */
.status-rental {
    background: #d4edda;
    color: #155724;
}

.status-inventory {
    background: #d1ecf1;
    color: #0c5460;
}

.status-customer {
    background: #fff3cd;
    color: #856404;
}

.status-finance {
    background: #f8d7da;
    color: #721c24;
}

.status-general {
    background: #e2e3e5;
    color: #383d41;
}

.status-sales {
    background: #e8f5e8;
    color: #2d5a2d;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

/* Sales Details */
.sale-details {
    margin-bottom: 20px;
}

.sale-details h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #667eea;
} 

/* Enhanced Focus States and Accessibility */
.modal-close:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.pricing-option:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Loading State for Modal */
.modal.loading .modal-body {
    position: relative;
    min-height: 200px;
}

.modal.loading .modal-body::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced Modal Scrollbar */
.modal::-webkit-scrollbar {
    width: 8px;
}

.modal::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.modal::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Rental Extension Styles */
.rental-extension-form {
    padding: 20px;
}

.rental-extension-form h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.rental-extension-form p {
    margin-bottom: 10px;
    color: #495057;
}

.rental-extension-form .form-group {
    margin-bottom: 20px;
}

.rental-extension-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.rental-extension-form input,
.rental-extension-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.rental-extension-form input:focus,
.rental-extension-form textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.extension-preview {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #667eea;
    margin-top: 20px;
}

.extension-preview h5 {
    color: #495057;
    margin-bottom: 10px;
    font-weight: 600;
}

.extension-preview p {
    margin-bottom: 8px;
    color: #495057;
}

.extension-preview strong {
    color: #2c3e50;
}

.cost-breakdown {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.cost-breakdown p {
    margin-bottom: 8px;
    padding: 5px 0;
    border-bottom: 1px solid #e9ecef;
}

.cost-breakdown p:last-child {
    border-bottom: none;
    margin-bottom: 0;
    font-weight: 600;
    color: #28a745;
}

/* Enhanced Button Styles for Rental Actions */
.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    border: none;
    color: white;
    font-weight: 500;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e0a800 0%, #e8590c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
    font-weight: 500;
}

.btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

/* Rental Action Buttons Container */
.rental-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.rental-actions .btn {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.rental-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Alert Styles */
.alert {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 6px;
    border-left: 4px solid;
    font-weight: 500;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left-color: #ffc107;
}

.alert-warning i {
    margin-right: 8px;
    color: #ffc107;
} 