/* ====================================
   CRM Συνεργείο Αυτοκινήτων - Styles
   ==================================== */

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

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

/* Vehicle for sale highlighting */
.vehicle-for-sale {
    background-color: #d4edda !important;
    border-left: 4px solid #28a745 !important;
}

.vehicle-for-sale:hover {
    background-color: #c3e6cb !important;
}

/* ====================================
   Vehicle Selection & Action Toolbar
   ==================================== */

/* Action toolbar container */
.vehicles-action-toolbar {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Selection counter */
.selection-info {
    font-weight: 600;
    color: #2a5298;
    font-size: 14px;
}

/* Action buttons container */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* Disabled button styles */
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(50%);
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Selected vehicle row styling */
.vehicle-row-selected {
    background-color: #e3f2fd !important;
    border-left: 4px solid #2196f3 !important;
}

.vehicle-row-selected:hover {
    background-color: #bbdefb !important;
}

/* Checkbox styling in table */
table thead th input[type="checkbox"],
table tbody td input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #2a5298;
}

/* Indeterminate checkbox state */
input[type="checkbox"]:indeterminate {
    opacity: 0.8;
}

/* Appointments action toolbar - reuse vehicles styles */
.appointments-action-toolbar {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Selected appointment row styling */
.appointment-row-selected {
    background-color: #e3f2fd !important;
    border-left: 4px solid #2196f3 !important;
}

.appointment-row-selected:hover {
    background-color: #bbdefb !important;
}

/* Selected customer row styling */
.customer-row-selected {
    background-color: #e3f2fd !important;
    border-left: 4px solid #2196f3 !important;
}

.customer-row-selected:hover {
    background-color: #bbdefb !important;
}

/* Welcome Box Collapse Styles */
#welcomeToggleBtn {
    background: #6c757d !important;
    border: 1px solid #5a6268 !important;
    color: white !important;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#welcomeToggleBtn:hover {
    background: #5a6268 !important;
    transform: scale(1.05);
}

#welcomeToggleBtn:active {
    transform: scale(0.95);
}

#welcomeButtonsContainer {
    max-height: 200px;
    opacity: 1;
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

/* Mobile responsive - increase height for smaller screens */
@media (max-width: 768px) {
    #welcomeButtonsContainer {
        max-height: 350px !important;
    }
}

@media (max-width: 480px) {
    #welcomeButtonsContainer {
        max-height: 500px !important;
    }
}

#welcomeButtonsContainer.collapsed {
    max-height: 0 !important;
    opacity: 0 !important;
    margin-bottom: 0 !important;
}

/* Κεντρικό Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

header h1 {
    font-size: 2em;
    margin: 0;
    flex: 1;
}

.user-info-header {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9em;
}

.user-name {
    color: white;
}

.role-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.75em;
    text-transform: uppercase;
    white-space: nowrap;
}

.role-admin {
    background: #d9534f;
    color: white;
}

.role-manager {
    background: #f0ad4e;
    color: white;
}

.role-user {
    background: #5bc0de;
    color: white;
}

header .btn-sm {
    padding: 6px 12px;
    font-size: 0.85em;
}


/* Navigation */
nav {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    display: block;
    padding: 15px 25px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

nav ul li a:hover,
nav ul li a.active {
    background-color: #f0f0f0;
    border-bottom: 3px solid #2a5298;
    color: #2a5298;
}

/* Card Layout */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 25px;
    margin-bottom: 25px;
}

.card h2 {
    color: #2a5298;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    margin: 5px;
}

.btn-primary {
    background-color: #2a5298;
    color: white;
}

.btn-primary:hover {
    background-color: #1e3c72;
}

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

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

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

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

.btn-warning {
    background-color: #ffc107;
    color: #333;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2a5298;
}

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

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

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
}

table thead {
    background: #f8f9fa;
    color: #333;
}

table thead th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s ease;
}

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

table tbody td {
    padding: 12px 15px;
}

/* Calendar */
.calendar {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.calendar-header h3 {
    color: #2a5298;
    font-size: 1.5em;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day-header {
    text-align: center;
    font-weight: bold;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    color: #555;
}

.calendar-day {
    min-height: 80px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 5px;
    background-color: #fff;
    transition: all 0.2s ease;
    cursor: pointer;
}

.calendar-day:hover {
    background-color: #f8f9fa;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.calendar-day.other-month {
    background-color: #f9f9f9;
    color: #999;
}

.calendar-day.today {
    background-color: #fff3cd;
    border: 2px solid #ffc107;
}

.calendar-day-number {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.calendar-appointment {
    background-color: #2a5298;
    color: white;
    padding: 4px 6px;
    margin: 3px 0;
    border-radius: 3px;
    font-size: 11px;
    line-height: 1.3;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

.calendar-appointment:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 10;
}

.calendar-appointment.pending {
    background-color: #ff4444;
    color: white;
}

.calendar-appointment.scheduled {
    background-color: #17a2b8;
}

.calendar-appointment.in_progress {
    background-color: #ffc107;
    color: #333;
}

.calendar-appointment.completed {
    background-color: #28a745;
}

.calendar-appointment.cancelled {
    background-color: #dc3545;
}

/* Calendar Todos */
.calendar-todo {
    background: linear-gradient(135deg, #ffeb3b 0%, #fdd835 100%);
    color: #000000;
    padding: 6px 8px;
    margin: 3px 0;
    border-radius: 2px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.2), 
                0 0 0 1px rgba(255,235,59,0.8);
    font-weight: 500;
    border-left: 3px solid #f9a825;
}

.calendar-todo:hover {
    transform: translateY(-2px) rotate(1deg);
    box-shadow: 3px 5px 8px rgba(0,0,0,0.3),
                0 0 0 1px rgba(255,235,59,0.9);
    z-index: 10;
    background: linear-gradient(135deg, #fff176 0%, #ffeb3b 100%);
}

/* Only overdue todos blink (past due date) */
.calendar-todo.overdue-todo {
    animation: blink-warning 1.5s ease-in-out infinite;
    border-left: 3px solid #ff6f00;
    font-weight: bold;
}

@keyframes blink-warning {
    0%, 100% {
        opacity: 1;
        background: linear-gradient(135deg, #ffeb3b 0%, #fdd835 100%);
        box-shadow: 2px 2px 4px rgba(0,0,0,0.2), 
                    0 0 0 2px #ff9800;
    }
    50% {
        opacity: 0.8;
        background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
        box-shadow: 2px 2px 6px rgba(255,152,0,0.4),
                    0 0 0 2px #ff5722;
    }
}

/* Status Quick Change Menu */
.appointment-status-menu {
    position: absolute;
    background: white;
    border: 2px solid #007bff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    padding: 8px;
    z-index: 10000;
    min-width: 200px;
    display: none;
}

.appointment-status-menu.show {
    display: block;
}

.status-menu-item {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    margin: 2px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    font-size: 0.9em;
}

.status-menu-item:hover {
    background: #f0f0f0;
    transform: translateX(4px);
}

.status-menu-item.current {
    background: #e3f2fd;
    font-weight: bold;
    border-left: 3px solid #007bff;
}

.status-menu-item .status-icon {
    font-size: 1.2em;
}

/* Quick action buttons in status menu */
.status-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 5px;
}

.status-menu-action-btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.9em;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    white-space: nowrap;
    color: #333;
}

.status-menu-action-btn:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.status-menu-action-btn:active {
    transform: translateY(0);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
    max-height: 85vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.modal-header h2 {
    color: #2a5298;
    margin: 0;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close:hover,
.close:focus {
    color: #000;
}

/* Search Box */
.search-box {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box input[type="text"] {
    flex: 1;
    min-width: 250px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.search-box input[type="date"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    min-width: 150px;
}

.search-box select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
}

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

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

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background-color: #ffe0e0;
    color: #cc0000;
}

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

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

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

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

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    display: none;
}

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

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

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

/* Loading */
.loading {
    text-align: center;
    padding: 20px;
    color: #2a5298;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    flex-wrap: wrap;
    gap: 15px;
}

.pagination-info {
    color: #555;
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.pagination-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
}

.pagination-buttons {
    display: flex;
    gap: 5px;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background-color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    min-width: 35px;
    text-align: center;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #2a5298;
    color: white;
    border-color: #2a5298;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.active {
    background-color: #2a5298;
    color: white;
    border-color: #2a5298;
    font-weight: bold;
}

/* Print Styles */
@media print {
    nav, .btn, .search-box {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    body {
        background: white;
    }
}

/* Customer Search Results */
.search-results {
    position: relative;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 5px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 100;
}

.search-results:empty {
    display: none;
}

.search-result-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background-color: #f5f5f5;
}

.search-result-item:last-child {
    border-bottom: none;
}

.selected-customer-info,
.selected-vehicle-info,
.selected-part-info {
    margin-top: 10px;
}

.selected-customer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #e8f5e9;
    border: 1px solid #4caf50;
    border-radius: 4px;
    color: #2e7d32;
}

.selected-customer strong {
    margin-right: 10px;
}

.btn-remove {
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove:hover {
    background-color: #d32f2f;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 2px;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
}

.autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.autocomplete-item:hover {
    background-color: #e3f2fd;
    color: #1976d2;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
    }
    
    nav ul li a {
        border-bottom: 1px solid #e0e0e0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-box input[type="text"],
    .search-box input[type="date"],
    .search-box select {
        width: 100%;
        min-width: auto;
    }
    
    .calendar-grid {
        gap: 2px;
    }
    
    .calendar-day {
        min-height: 80px;
        font-size: 12px;
    }
    
    .calendar-appointment {
        font-size: 9px;
        padding: 3px 4px;
        margin: 2px 0;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    table {
        font-size: 12px;
    }
    
    table thead {
        display: none;
    }
    
    table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #e0e0e0;
        border-radius: 5px;
    }
    
    table tbody td {
        display: block;
        text-align: right;
        padding: 10px;
        border-bottom: 1px solid #e0e0e0;
    }
    
    table tbody td:before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        color: #2a5298;
    }
    
    table tbody td:last-child {
        border-bottom: none;
    }
    
    /* Pagination on mobile */
    .pagination-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pagination-info {
        text-align: center;
        margin-bottom: 10px;
    }
    
    .pagination-controls {
        justify-content: center;
        margin-bottom: 10px;
    }
    
    .pagination-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .pagination-btn {
        min-width: 40px;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5em;
    }
    
    .container {
        padding: 10px;
    }
    
    .card {
        padding: 15px;
    }
}

/* ========================================
   Vehicle Attachments Styles
   ======================================== */

.attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.attachment-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.3s ease;
}

.attachment-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.attachment-preview {
    width: 100%;
    height: 200px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
}

.attachment-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.attachment-preview img:hover {
    transform: scale(1.05);
}

.pdf-icon {
    font-size: 48px;
    color: #d9534f;
    text-align: center;
    cursor: pointer;
    user-select: none;
}

.pdf-icon:hover {
    color: #c9302c;
}

.attachment-info {
    padding: 15px;
}

.attachment-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attachment-description {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.attachment-meta {
    color: #999;
    font-size: 0.85em;
}

.attachment-actions {
    padding: 10px 15px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* File input styling */
input[type="file"] {
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 4px;
    background: #fafafa;
    cursor: pointer;
    width: 100%;
}

input[type="file"]:hover {
    border-color: #5cb85c;
    background: #f0fff0;
}

/* Mobile adjustments for attachments */
@media (max-width: 768px) {
    .attachments-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .attachment-preview {
        height: 150px;
    }
    
    .attachment-info {
        padding: 10px;
    }
    
    .attachment-actions {
        padding: 8px 10px;
    }
}

/* ========================================
   RESPONSIVE BUTTONS FOR MOBILE/TABLET
   ======================================== */

/* Tablet Sizes (iPad, etc.) */
@media (max-width: 768px) {
    /* Larger buttons in table lists on tablets */
    table tbody td .btn-sm {
        padding: 10px 15px !important;
        font-size: 14px !important;
        margin: 3px 2px;
        display: inline-block;
    }
    
    /* Make emoji/icon buttons more prominent */
    table tbody td .btn-warning {
        padding: 12px 16px !important;
        font-size: 16px !important;
    }
    
    /* Improve touch targets for all action buttons */
    .btn {
        min-height: 44px; /* Apple's recommended touch target size */
        touch-action: manipulation; /* Prevents double-tap zoom */
    }
}

/* ============================================
   GREEK HOLIDAYS STYLING
   ============================================ */

/* Holiday calendar days */
.calendar-day.holiday {
    background-color: #ffe0e0 !important;
    border: 2px solid #ff6b6b;
}

.calendar-day.holiday .calendar-day-number {
    color: #d63031;
    font-weight: bold;
}

.calendar-day.holiday::after {
    content: "🔴 Αργία";
    display: block;
    font-size: 10px;
    color: #d63031;
    font-weight: bold;
    margin-top: 2px;
}

.calendar-day.holiday.other-month {
    background-color: #fff0f0 !important;
    opacity: 0.7;
}

/* Holiday that is also today */
.calendar-day.holiday.today {
    background-color: #ffd4d4 !important;
    border: 2px solid #ff0000;
}

/* Mobile Phones */
@media (max-width: 480px) {
    /* Even larger buttons on mobile phones */
    table tbody td .btn-sm {
        padding: 12px 18px !important;
        font-size: 15px !important;
        margin: 5px 2px;
        display: block;
        width: 100%;
        text-align: center;
    }
    
    /* Stack buttons vertically on very small screens */
    table tbody td[data-label="Ενέργειες"] {
        text-align: center !important;
    }
    
    /* Make emoji/icon buttons even more prominent */
    table tbody td .btn-warning {
        padding: 14px 20px !important;
        font-size: 18px !important;
    }
    
    /* Vehicles action toolbar responsive */
    .vehicles-action-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .action-buttons .btn {
        width: 100%;
        margin: 0;
    }
    
    .selection-info {
        text-align: center;
        width: 100%;
    }
}

/* Tablet responsive for action toolbar */
@media (max-width: 768px) {
    .vehicles-action-toolbar {
        padding: 12px;
    }
    
    .action-buttons {
        gap: 6px;
    }
    
    .action-buttons .btn-sm {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* ====================================
   QR Code Modal Styles
   ==================================== */

.qr-display {
    padding: 20px;
}

.qr-image-container {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.qr-image {
    max-width: 400px;
    width: 100%;
    border: 3px solid #ddd;
    padding: 15px;
    background: white;
    border-radius: 8px;
}

.qr-info {
    margin-bottom: 25px;
}

.qr-info .info-row {
    margin-bottom: 15px;
}

.qr-info .info-row strong {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
}

.url-box {
    display: flex;
    gap: 10px;
}

.url-box input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

.btn-copy {
    padding: 10px 15px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-copy:hover {
    background: #2980b9;
}

.qr-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.qr-actions .btn {
    flex: 1;
    min-width: 150px;
}

.no-qr-state {
    text-align: center;
    padding: 60px 20px;
}

.no-qr-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.no-qr-state h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.no-qr-state p {
    color: #6c757d;
    margin-bottom: 30px;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 1.1em;
}

.loading-state {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.error-state {
    text-align: center;
    padding: 40px;
    color: #e74c3c;
}

@media (max-width: 768px) {
    .qr-image {
        max-width: 300px;
    }
    
    .url-box {
        flex-direction: column;
    }
    
    .qr-actions {
        flex-direction: column;
    }
    
    .qr-actions .btn {
        width: 100%;
    }
}

/* ========================================
   Vehicle Featured Image Styles
   ======================================== */

/* Vehicle thumbnail in list - Desktop */
.vehicle-thumbnail {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid #e9ecef;
    transition: all 0.2s ease;
    display: block;
}

.vehicle-thumbnail:hover {
    border-color: #2a5298;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Placeholder for vehicles without image */
.vehicle-placeholder {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 4px;
    color: #6c757d;
    font-size: 20px;
}

/* Mobile responsive - smaller thumbnails */
@media (max-width: 768px) {
    .vehicle-thumbnail {
        width: 30px !important;
        height: 30px !important;
        max-width: 30px !important;
        max-height: 30px !important;
    }
    
    .vehicle-placeholder {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
}

/* Featured image indicator in attachments modal */
.attachment-item.featured {
    border: 2px solid #27ae60;
    background-color: #f0fff4;
    position: relative;
}

.attachment-item.featured::before {
    content: "⭐ ΚΥΡΙΑ ΕΙΚΟΝΑ";
    position: absolute;
    top: 5px;
    right: 5px;
    background: #27ae60;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.7em;
    font-weight: bold;
    z-index: 10;
}

/* ====================================
   Page-Specific Visual Differentiation
   ==================================== */

/* Customers Page - Blue Theme */
.page-customers {
    background-color: #E3F2FD !important;
}

.page-customers .card {
    border-top: 6px solid #2196F3;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.15);
}

.page-customers .card h2 {
    color: #1976D2;
}

/* Vehicles Page - Orange Theme */
.page-vehicles {
    background-color: #FFF3E0 !important;
}

.page-vehicles .card {
    border-top: 6px solid #FF5722;
    box-shadow: 0 2px 8px rgba(255, 87, 34, 0.15);
}

.page-vehicles .card h2 {
    color: #E64A19;
}

/* Appointments Page - Green Theme */
.page-appointments {
    background-color: #E8F5E9 !important;
}

.page-appointments .card {
    border-top: 6px solid #4CAF50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
}

.page-appointments .card h2 {
    color: #388E3C;
}

