/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Touch device optimizations */
.touch-device * {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.touch-device input,
.touch-device textarea,
.touch-device [contenteditable] {
    -webkit-user-select: text;
    -khtml-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Smooth scrolling for better mobile experience */
html {
    scroll-behavior: smooth;
}

/* Improved focus states for accessibility */
*:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

button:focus,
.btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Page Management */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-header {
    margin-bottom: 30px;
}

.login-header i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 10px;
}

.login-header h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 5px;
}

.login-header p {
    color: #666;
    font-size: 1.1rem;
}

.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group label i {
    margin-right: 8px;
    color: #667eea;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #f5c6cb;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #c3e6cb;
}

.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
    font-size: 0.9rem;
    color: #666;
}

/* Navigation */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.nav-brand i {
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    text-decoration: none;
    color: #666;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item:hover,
.nav-item.active {
    color: #667eea;
    background: #f8f9ff;
}

.badge {
    background: #dc3545;
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 10px;
    position: absolute;
    top: 5px;
    right: 5px;
}

.nav-user {
    position: relative;
}

.user-menu {
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.user-menu:hover {
    background: #f8f9ff;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 10px 0;
    min-width: 180px;
    display: none;
}

.user-menu:hover .user-dropdown {
    display: block;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    text-decoration: none;
    color: #666;
    transition: background 0.3s ease;
}

.user-dropdown a:hover {
    background: #f8f9ff;
    color: #667eea;
}

/* Main Content */
.main-content {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.content-page {
    display: none;
}

.content-page.active {
    display: block;
}

.page-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header h1 {
    font-size: 2rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 15px;
}

.page-header h1 i {
    color: #667eea;
}

.page-header p {
    color: #666;
    margin-top: 5px;
}

.page-actions {
    display: flex;
    gap: 15px;
}

/* Dashboard */
.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 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card.urgent {
    border-left: 5px solid #dc3545;
}

.stat-card.warning {
    border-left: 5px solid #ffc107;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    background: #667eea;
}

.stat-card.urgent .stat-icon {
    background: #dc3545;
}

.stat-card.warning .stat-icon {
    background: #ffc107;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.stat-content p {
    color: #666;
    font-size: 0.9rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    padding: 20px 25px;
    background: #f8f9ff;
    border-bottom: 1px solid #e1e5e9;
}

.card-header h3 {
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-content {
    padding: 25px;
}

.expiration-list,
.activity-list {
    max-height: 300px;
    overflow-y: auto;
}

.expiration-item,
.activity-item {
    padding: 15px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: background 0.3s ease;
}

.expiration-item:hover,
.activity-item:hover {
    background: #f8f9ff;
}

.expiration-item.urgent {
    border-color: #dc3545;
    background: #fff5f5;
}

.expiration-item.warning {
    border-color: #ffc107;
    background: #fffbf0;
}

.no-data {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

/* Filters */
.filters {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* Vehicles Grid */
.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.vehicle-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.vehicle-card:hover {
    transform: translateY(-5px);
}

.vehicle-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.vehicle-header h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.vehicle-header p {
    opacity: 0.9;
}

.vehicle-body {
    padding: 20px;
}

.vehicle-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 2px;
}

.info-value {
    font-weight: 500;
    color: #333;
}

.vehicle-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Documents Table */
.documents-table {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

.table th {
    background: #f8f9ff;
    font-weight: 600;
    color: #333;
}

.table tbody tr:hover {
    background: #f8f9ff;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-expired {
    background: #f8d7da;
    color: #721c24;
}

.status-urgent {
    background: #fff3cd;
    color: #856404;
}

.status-warning {
    background: #cce5ff;
    color: #004085;
}

.status-ok {
    background: #d4edda;
    color: #155724;
}

/* Notifications */
.notifications-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 30px;
    background: white;
    border-radius: 8px;
    padding: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn.active {
    background: #667eea;
    color: white;
}

.notifications-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 25px;
}

.notification-item {
    padding: 20px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.notification-item:hover {
    background: #f8f9ff;
    border-color: #667eea;
}

.notification-item.urgent {
    border-color: #dc3545;
    background: #fff5f5;
}

.notification-item.warning {
    border-color: #ffc107;
    background: #fffbf0;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.notification-title {
    font-weight: 600;
    color: #333;
}

.notification-date {
    font-size: 0.9rem;
    color: #666;
}

.notification-body {
    color: #666;
    line-height: 1.5;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 25px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #333;
    font-size: 1.3rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f8f9ff;
    color: #667eea;
}

.modal-form {
    padding: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group small {
    color: #666;
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.modal-footer {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding: 20px 25px;
    border-top: 1px solid #e1e5e9;
    background: #f8f9ff;
}

.modal-body {
    padding: 25px;
}

/* Confirmation Modal Styles */
.confirmation-modal {
    max-width: 500px;
}

.confirmation-modal .modal-body {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.confirmation-icon {
    flex-shrink: 0;
}

.confirmation-icon i {
    font-size: 3rem;
    color: #ffc107;
}

.confirmation-icon i.fa-exclamation-triangle {
    color: #dc3545;
}

.confirmation-icon i.fa-info-circle {
    color: #17a2b8;
}

.confirmation-content {
    flex: 1;
}

.confirmation-content p {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: #333;
}

.confirmation-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-top: 15px;
}

.confirmation-details h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1rem;
}

.confirmation-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.confirmation-details li {
    padding: 5px 0;
    color: #666;
    display: flex;
    justify-content: space-between;
}

.confirmation-details li strong {
    color: #333;
}

/* Details Modal Styles */
.details-content {
    max-height: 60vh;
    overflow-y: auto;
}

.detail-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e1e5e9;
}

.detail-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.detail-section h4 {
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-section h4 i {
    color: #667eea;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 3px;
    font-weight: 500;
}

.detail-value {
    color: #333;
    font-weight: 500;
}

.detail-value.empty {
    color: #999;
    font-style: italic;
}

.document-preview {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 15px;
}

.document-preview i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 10px;
}

.document-preview p {
    color: #666;
    margin: 5px 0;
}

/* Action Buttons Enhancement */
.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    min-width: 40px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.action-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.action-buttons .btn i {
    font-size: 0.9rem;
}

.action-buttons .btn-view {
    background: #17a2b8;
    color: white;
}

.action-buttons .btn-view:hover {
    background: #138496;
}

.action-buttons .btn-edit {
    background: #667eea;
    color: white;
}

.action-buttons .btn-edit:hover {
    background: #5a6fd8;
}

.action-buttons .btn-download {
    background: #28a745;
    color: white;
}

.action-buttons .btn-download:hover {
    background: #218838;
}

.action-buttons .btn-delete {
    background: #dc3545;
    color: white;
}

.action-buttons .btn-delete:hover {
    background: #c82333;
}

/* Tooltip for action buttons */
.action-buttons .btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

.action-buttons .btn[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    z-index: 1000;
}

/* File count badge */
.file-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    font-size: 0.7rem;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Document Files List in Details Modal */
.document-files-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.document-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.document-file-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.document-file-item .file-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.document-file-item .file-icon {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    flex-shrink: 0;
}

.document-file-item .file-details {
    flex: 1;
    min-width: 0;
}

.document-file-item .file-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    word-break: break-word;
    font-size: 1rem;
}

.document-file-item .file-size {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 2px;
}

.document-file-item .file-date {
    font-size: 0.85rem;
    color: #999;
}

.document-file-item .file-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.document-file-item .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.document-file-item .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Empty state for files */
.no-files {
    text-align: center;
    padding: 30px;
    color: #666;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #e1e5e9;
}

.no-files i {
    font-size: 2rem;
    color: #ccc;
    margin-bottom: 10px;
}

/* Mobile responsive for document files */
@media (max-width: 768px) {
    .document-file-item {
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .document-file-item .file-info {
        width: 100%;
        gap: 12px;
    }
    
    .document-file-item .file-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .document-file-item .file-name {
        font-size: 0.95rem;
    }
    
    .document-file-item .file-size,
    .document-file-item .file-date {
        font-size: 0.8rem;
    }
    
    .document-file-item .file-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .document-file-item .btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .document-file-item .file-info {
        gap: 10px;
    }
    
    .document-file-item .file-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .document-file-item .file-actions {
        justify-content: center;
    }
    
    .document-file-item .btn {
        flex: 1;
        justify-content: center;
        max-width: 120px;
    }
}

/* Email Management Styles */
.email-management {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 25px;
}

.email-management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e1e5e9;
}

.email-management-header h3 {
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.email-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.email-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9ff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.email-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.email-item.inactive {
    background: #f8f9fa;
    opacity: 0.7;
}

.email-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.email-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.email-status.active {
    background: #28a745;
}

.email-status.inactive {
    background: #6c757d;
}

.email-details {
    flex: 1;
    min-width: 0;
}

.email-address {
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
    word-break: break-word;
}

.email-name {
    font-size: 0.9rem;
    color: #666;
}

.email-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.email-actions .btn {
    padding: 6px 12px;
    font-size: 0.85rem;
    min-width: auto;
}

/* Checkbox Styles */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    color: #333;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-label:hover .checkmark {
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Empty state for emails */
.no-emails {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #e1e5e9;
}

.no-emails i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 15px;
}

.no-emails h4 {
    color: #333;
    margin-bottom: 10px;
}

.no-emails p {
    margin-bottom: 20px;
}

/* Mobile responsive for email management */
@media (max-width: 768px) {
    .email-management-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .email-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px;
    }
    
    .email-info {
        width: 100%;
        gap: 12px;
    }
    
    .email-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .email-actions .btn {
        flex: 1;
        max-width: 80px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .email-management {
        padding: 20px 15px;
    }
    
    .email-management-header h3 {
        font-size: 1.1rem;
    }
    
    .email-item {
        padding: 10px;
    }
    
    .email-info {
        gap: 10px;
    }
    
    .email-address {
        font-size: 0.9rem;
    }
    
    .email-name {
        font-size: 0.8rem;
    }
    
    .email-actions {
        gap: 6px;
    }
    
    .email-actions .btn {
        padding: 5px 8px;
        font-size: 0.8rem;
    }
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.loading-spinner {
    text-align: center;
    color: #667eea;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease;
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 15px;
    animation: spin 1s linear infinite;
}

.loading-spinner p {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: scale(0.9);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile loading improvements */
@media (max-width: 768px) {
    .loading-spinner {
        padding: 25px;
        margin: 20px;
    }
    
    .loading-spinner i {
        font-size: 2.5rem;
        margin-bottom: 12px;
    }
    
    .loading-spinner p {
        font-size: 1rem;
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 4000;
}

.toast {
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    padding: 15px 20px;
    margin-bottom: 10px;
    min-width: 300px;
    border-left: 4px solid #667eea;
    animation: slideIn 0.3s ease;
    position: relative;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.success {
    border-left-color: #28a745;
}

.toast.error {
    border-left-color: #dc3545;
}

.toast.warning {
    border-left-color: #ffc107;
}

.toast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.toast-title {
    font-weight: 600;
    color: #333;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
    padding: 0;
}

.toast-body {
    color: #666;
    font-size: 0.9rem;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        height: auto;
        padding: 10px 15px;
        position: relative;
    }
    
    .nav-brand {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    
    .nav-menu {
        display: flex;
        overflow-x: auto;
        gap: 15px;
        padding: 5px 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .nav-menu::-webkit-scrollbar {
        display: none;
    }
    
    .nav-item {
        white-space: nowrap;
        padding: 8px 12px;
        font-size: 0.9rem;
        min-width: fit-content;
    }
    
    .nav-user {
        position: absolute;
        top: 10px;
        right: 15px;
    }
    
    .main-content {
        padding: 15px 10px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .page-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .page-actions .btn {
        flex: 1;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
        flex-direction: row;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .vehicles-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .vehicle-card {
        margin-bottom: 15px;
    }
    
    .vehicle-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .vehicle-actions .btn-sm {
        flex: 1;
        min-width: 80px;
        justify-content: center;
    }
    
    .filters {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .modal-header {
        padding: 20px 15px;
    }
    
    .modal-form {
        padding: 20px 15px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Table responsive */
    .documents-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        font-size: 0.85rem;
        min-width: 600px;
    }
    
    .table th,
    .table td {
        padding: 8px;
        white-space: nowrap;
    }
    
    .table td:first-child {
        position: sticky;
        left: 0;
        background: white;
        z-index: 1;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    }
    
    /* Notifications */
    .notifications-tabs {
        flex-direction: column;
        gap: 2px;
    }
    
    .tab-btn {
        padding: 15px;
        text-align: center;
    }
    
    .notification-item {
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .notification-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    /* Toast notifications */
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    /* Login page improvements */
    .login-container {
        padding: 10px;
    }
    
    .login-card {
        padding: 25px 15px;
        margin: 10px;
    }
    
    .login-header h1 {
        font-size: 1.8rem;
    }
    
    .login-header i {
        font-size: 2.5rem;
    }
    
    /* Navigation improvements */
    .navbar {
        padding: 8px 10px;
    }
    
    .nav-brand {
        font-size: 1.2rem;
    }
    
    .nav-brand i {
        font-size: 1.5rem;
    }
    
    .nav-menu {
        gap: 8px;
        padding: 8px 0;
    }
    
    .nav-item {
        padding: 6px 10px;
        font-size: 0.85rem;
        border-radius: 6px;
    }
    
    .nav-user {
        top: 8px;
        right: 10px;
    }
    
    /* Main content */
    .main-content {
        padding: 10px 8px;
    }
    
    .page-header {
        margin-bottom: 15px;
    }
    
    .page-header h1 {
        font-size: 1.4rem;
    }
    
    .page-header h1 i {
        font-size: 1.2rem;
    }
    
    /* Stats cards */
    .stats-grid {
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px;
        gap: 15px;
    }
    
    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .stat-content h3 {
        font-size: 1.4rem;
    }
    
    .stat-content p {
        font-size: 0.8rem;
    }
    
    /* Dashboard and vehicle cards */
    .dashboard-grid {
        gap: 15px;
    }
    
    .vehicle-card,
    .dashboard-card {
        margin-bottom: 10px;
    }
    
    .card-header,
    .vehicle-header {
        padding: 15px;
    }
    
    .card-content,
    .vehicle-body {
        padding: 15px;
    }
    
    .vehicle-info {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .vehicle-actions {
        gap: 6px;
    }
    
    .vehicle-actions .btn-sm {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    /* Modals full screen on small devices */
    .modal-content {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        margin: 0;
        max-height: 100vh;
    }
    
    .modal-header {
        padding: 15px;
        border-bottom: 2px solid #e1e5e9;
    }
    
    .modal-header h3 {
        font-size: 1.2rem;
    }
    
    .modal-form {
        padding: 15px;
        height: calc(100vh - 120px);
        overflow-y: auto;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 14px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .form-actions {
        position: sticky;
        bottom: 0;
        background: white;
        padding: 15px;
        border-top: 2px solid #e1e5e9;
        margin: 0 -15px -15px -15px;
    }
    
    /* Table improvements */
    .table {
        font-size: 0.8rem;
    }
    
    .table th,
    .table td {
        padding: 6px;
    }
    
    /* Buttons */
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .btn-sm {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    /* Notifications */
    .notifications-tabs {
        margin: 0 -8px 20px -8px;
    }
    
    .tab-btn {
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .notification-item {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    .notification-title {
        font-size: 0.9rem;
    }
    
    .notification-date {
        font-size: 0.8rem;
    }
    
    .notification-body {
        font-size: 0.85rem;
        margin-top: 8px;
    }
    
    /* Toast notifications */
    .toast-container {
        top: 5px;
        right: 5px;
        left: 5px;
    }
    
    .toast {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .toast-title {
        font-size: 0.9rem;
    }
    
    .toast-body {
        font-size: 0.85rem;
    }
    
    /* Filters */
    .filters {
        margin: 0 -8px 15px -8px;
        padding: 0 8px;
    }
    
    .filter-group input,
    .filter-group select {
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Vehicle and Document Status Indicators */
.vehicle-card.expired {
    border-left: 4px solid #dc3545;
}

.vehicle-card.urgent {
    border-left: 4px solid #ffc107;
}

.vehicle-card.warning {
    border-left: 4px solid #17a2b8;
}

.document-row.status-expired {
    background-color: #fff5f5;
}

.document-row.status-urgent {
    background-color: #fffbf0;
}

.document-row.status-warning {
    background-color: #f0f8ff;
}

.days-remaining {
    color: #ffc107;
    font-weight: 500;
}

.days-expired {
    color: #dc3545;
    font-weight: 500;
}

/* Document List in Vehicle Details */
.documents-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.document-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
}

.document-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.document-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.document-details {
    color: #666;
    font-size: 0.9rem;
}

/* Enhanced Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge i {
    font-size: 0.7rem;
}

/* Mobile Responsive Improvements for New Elements */
@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .confirmation-modal .modal-body {
        flex-direction: column;
        gap: 15px;
    }
    
    .confirmation-icon i {
        font-size: 2.5rem;
    }
    
    .action-buttons {
        justify-content: center;
        gap: 6px;
    }
    
    .action-buttons .btn {
        min-width: 36px;
        height: 36px;
        padding: 8px;
    }
    
    .document-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .documents-list {
        gap: 8px;
    }
    
    .document-item {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .modal-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
    
    .confirmation-details {
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .detail-section {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .detail-section h4 {
        font-size: 1rem;
    }
    
    .action-buttons .btn[title]:hover::after,
    .action-buttons .btn[title]:hover::before {
        display: none; /* Hide tooltips on mobile */
    }
}

/* File Upload Styles */
.file-upload-area {
    position: relative;
    border: 2px dashed #e1e5e9;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    background: #f8f9ff;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: #f0f3ff;
}

.file-upload-area.dragover {
    border-color: #667eea;
    background: #e8f0fe;
    transform: scale(1.02);
}

.file-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-text {
    pointer-events: none;
}

.file-upload-text i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.file-upload-text p {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 500;
}

.file-upload-text small {
    color: #666;
    font-size: 0.9rem;
}

/* Selected Files Display */
.selected-files {
    margin-top: 15px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.file-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.file-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.file-icon.pdf {
    background: #dc3545;
}

.file-icon.image {
    background: #28a745;
}

.file-icon.document {
    background: #007bff;
}

.file-icon.default {
    background: #6c757d;
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
    word-break: break-all;
}

.file-size {
    font-size: 0.85rem;
    color: #666;
}

.file-actions {
    display: flex;
    gap: 8px;
}

.file-remove {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-remove:hover {
    background: #c82333;
    transform: scale(1.1);
}

.file-download {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-download:hover {
    background: #218838;
    transform: scale(1.1);
}

/* File Upload Progress */
.upload-progress {
    width: 100%;
    height: 4px;
    background: #e1e5e9;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
    width: 0%;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .file-upload-area {
        padding: 20px;
    }
    
    .file-upload-text i {
        font-size: 2.5rem;
    }
    
    .file-upload-text p {
        font-size: 1rem;
    }
    
    .file-item {
        padding: 10px 12px;
    }
    
    .file-info {
        gap: 10px;
    }
    
    .file-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .file-name {
        font-size: 0.9rem;
    }
    
    .file-size {
        font-size: 0.8rem;
    }
    
    .file-actions {
        gap: 6px;
    }
    
    .file-remove,
    .file-download {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
}
