/* Driver Profile Styles */

.driver-profile {
    padding: 2rem 0;
    min-height: 100vh;
    background-color: #f8f9fa;
}

.profile-header {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.5rem;
}

.profile-header p {
    color: #6c757d;
    font-size: 1.1rem;
}

/* Tab Navigation */
.profile-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
    justify-content: center;
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-button:hover {
    background-color: #f8f9fa;
    border-color: #0d6efd;
    color: #0d6efd;
}

.tab-button.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.tab-button.active svg {
    stroke: white;
}

.tab-button svg {
    flex-shrink: 0;
}

/* Tab Content */
.tab-content {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.tab-pane {
    display: none;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #212529;
    margin: 0;
}

/* Documents Section */
.documents-section {
    padding: 0;
}

.documents-progress {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.documents-progress h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.progress-bar-container {
    width: 100%;
    height: 24px;
    background-color: #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0d6efd 0%, #0a58ca 100%);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.5rem;
    color: white;
    font-weight: 600;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.document-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.document-card.completed {
    border-left: 4px solid #28a745;
    background-color: #f8fff9;
}

.document-card.missing {
    border-left: 4px solid #dc3545;
    background-color: #fff5f5;
}

.document-icon {
    margin-bottom: 1rem;
}

.document-icon svg,
.document-icon i {
    color: #6c757d;
    font-size: 2.5rem;
}

.document-card.completed .document-icon svg,
.document-card.completed .document-icon i {
    color: #28a745;
}

.document-card.missing .document-icon svg,
.document-card.missing .document-icon i {
    color: #dc3545;
}

.document-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.status-badge.completed,
.status-badge.paid,
.status-badge.active,
.status-badge.approved {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.missing,
.status-badge.rejected,
.status-badge.overdue {
    background-color: #f8d7da;
    color: #721c24;
}

.status-badge.pending {
    background-color: #fff3cd;
    color: #856404;
}

.upload-date,
.expiry-date {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0.25rem 0;
}

.document-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-action.view {
    background-color: #0d6efd;
    color: white;
}

.btn-action.view:hover {
    background-color: #0b5ed7;
}

.btn-action.delete {
    background-color: #dc3545;
    color: white;
}

.btn-action.delete:hover {
    background-color: #bb2d3b;
}

.btn-action.upload {
    background-color: #28a745;
    color: white;
}

.btn-action.upload:hover {
    background-color: #218838;
}

/* Personal Details Section */
.personal-details-section {
    padding: 0;
}

.detail-group {
    margin-bottom: 2.5rem;
}

.detail-group h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #212529;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.detail-item label {
    display: block;
    font-weight: 600;
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item p {
    font-size: 1.1rem;
    color: #212529;
    margin: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: #0d6efd;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}

/* Invoices Section */
.invoices-section {
    padding: 0;
}

.invoice-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.summary-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-icon.pending {
    background-color: #fff3cd;
}

.summary-icon.pending svg {
    color: #856404;
}

.summary-icon.paid {
    background-color: #d4edda;
}

.summary-icon.paid svg {
    color: #155724;
}

.summary-icon.overdue {
    background-color: #f8d7da;
}

.summary-icon.overdue svg {
    color: #721c24;
}

.summary-icon.total {
    background-color: #d1ecf1;
}

.summary-icon.total svg {
    color: #0c5460;
}

.summary-info h4 {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0 0 0.5rem 0;
}

.summary-info .amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    margin: 0;
}

.summary-info small {
    font-size: 0.85rem;
    color: #6c757d;
}

.invoices-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: #0d6efd;
}

.filter-select {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: #0d6efd;
}

.invoices-table-wrapper {
    overflow-x: auto;
}

.invoices-table {
    width: 100%;
    border-collapse: collapse;
}

.invoices-table th,
.invoices-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.invoices-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.invoices-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Contracts Section */
.contracts-section {
    padding: 0;
}

.contracts-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.overview-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.overview-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.overview-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overview-icon.active {
    background-color: #d4edda;
}

.overview-icon.active svg {
    color: #155724;
}

.overview-icon.pending {
    background-color: #fff3cd;
}

.overview-icon.pending svg {
    color: #856404;
}

.overview-icon.expired {
    background-color: #f8d7da;
}

.overview-icon.expired svg {
    color: #721c24;
}

.overview-icon.total {
    background-color: #d1ecf1;
}

.overview-icon.total svg {
    color: #0c5460;
}

.overview-info h4 {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0 0 0.5rem 0;
}

.overview-info .count {
    font-size: 1.8rem;
    font-weight: 700;
    color: #212529;
    margin: 0;
}

.contracts-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.contracts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state svg {
    color: #adb5bd;
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #495057;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.empty-state .info-text {
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: #0d6efd;
    color: white;
}

.btn-primary:hover {
    background-color: #0b5ed7;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5c636a;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #6c757d;
    padding: 0.5rem;
}

.modal-close:hover {
    color: #212529;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 2px solid #e9ecef;
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-tabs {
        flex-direction: column;
    }

    .tab-button {
        width: 100%;
        justify-content: center;
    }

    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .documents-grid,
    .contracts-grid {
        grid-template-columns: 1fr;
    }

    .invoice-summary,
    .contracts-overview {
        grid-template-columns: 1fr;
    }

    .details-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .invoices-filters,
    .contracts-filters {
        flex-direction: column;
    }

    .search-input,
    .filter-select {
        width: 100%;
    }

    .profile-header h1 {
        font-size: 2rem;
    }

    .profile-header p {
        font-size: 1rem;
    }

    .tab-button {
        width: 100%;
        justify-content: center;
        font-size: 0.95rem;
    }

    .tab-pane {
        padding: 1.5rem;
    }

    .summary-card,
    .overview-card,
    .document-card {
        padding: 1.25rem;
    }
}

/* Profile Sidebar */
.profile-sidebar {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.profile-userpic img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto;
    display: block;
}

.profile-usertitle {
    text-align: center;
    margin-top: 20px;
}

.profile-usertitle-name {
    font-size: 1.5rem;
    font-weight: 600;
}

.profile-usertitle-job {
    color: #6c757d;
    font-size: 0.9rem;
}

.profile-usermenu {
    margin-top: 30px;
}

.profile-usermenu .nav-link {
    color: #495057;
    padding: 10px 15px;
    border-radius: 5px;
}

.profile-usermenu .nav-link.active,
.profile-usermenu .nav-link:hover {
    background-color: #e9ecef;
    color: #0d6efd;
}

.profile-usermenu .nav-link i {
    margin-right: 10px;
}

.profile-content {
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
}

@media (max-width: 991px) {
    .profile-sidebar {
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .driver-profile {
        padding: 1.5rem 0;
    }

    .profile-tabs {
        padding: 0.75rem;
    }

    .tab-button {
        font-size: 0.85rem;
    }

    .section-header h2 {
        font-size: 1.35rem;
    }

    .documents-grid,
    .contracts-grid {
        gap: 1rem;
    }
}

/* ----------------------------------------------------------
   Dark workspace refresh
----------------------------------------------------------- */
:root {
    --primary-color: #7c9bff;
    --secondary-color: #42e3ff;
    --accent-color: #ff7cd8;
    --dark-color: #f4f6ff;
    --light-color: #05060f;
    --border-soft: rgba(255, 255, 255, 0.08);
    --muted-color: #9ca8c9;
    --surface-panel: rgba(8, 10, 24, 0.9);
    --surface-card: rgba(255, 255, 255, 0.04);
}

.driver-profile {
    background: radial-gradient(circle at 25% 15%, rgba(124, 155, 255, 0.3), transparent 40%), #05060f;
    color: var(--dark-color);
}

.profile-header h1 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
}

.profile-header p {
    color: var(--muted-color);
}

.profile-tabs {
    background: var(--surface-panel);
    border: 1px solid var(--border-soft);
    border-radius: 24px;
    box-shadow: 0 25px 65px rgba(5, 6, 15, 0.65);
}

.tab-button {
    border-color: var(--border-soft);
    color: var(--muted-color);
    background: rgba(255, 255, 255, 0.02);
}

.tab-button:hover {
    border-color: var(--secondary-color);
    color: var(--dark-color);
    background: rgba(124, 155, 255, 0.15);
}

.tab-button.active {
    background: linear-gradient(120deg, var(--secondary-color), var(--primary-color));
    border-color: transparent;
    box-shadow: 0 12px 30px rgba(124, 155, 255, 0.35);
}

.tab-content,
.tab-pane {
    background: var(--surface-panel);
    border: 1px solid var(--border-soft);
}

.documents-progress,
.document-card,
.summary-card,
.overview-card,
.invoice-summary,
.contracts-overview,
.profile-content,
.profile-sidebar,
.form-group,
.modal-content {
    background: var(--surface-panel);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    color: var(--dark-color);
}

.document-card,
.summary-card,
.overview-card {
    box-shadow: 0 15px 45px rgba(5, 6, 15, 0.55);
}

.document-icon,
.summary-icon,
.overview-icon {
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.04);
    color: var(--secondary-color);
}

.status-badge {
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.08);
    color: var(--dark-color);
}

.status-badge.missing,
.status-badge.rejected,
.status-badge.overdue {
    border-color: rgba(248, 113, 113, 0.4);
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}

.status-badge.completed,
.status-badge.paid,
.status-badge.active,
.status-badge.approved {
    border-color: rgba(99, 245, 176, 0.4);
    color: #63f5b0;
    background: rgba(99, 245, 176, 0.08);
}

.detail-item label,
.form-group label,
.upload-date,
.expiry-date,
.summary-info small,
.overview-info .count,
.profile-usertitle-job,
.profile-usermenu .nav-link {
    color: var(--muted-color);
}

.form-control,
.search-input,
.filter-select {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-soft);
    color: var(--dark-color);
}

.form-control:focus,
.search-input:focus,
.filter-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(124, 155, 255, 0.25);
}

.invoices-table,
.contracts-grid {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
}

.invoices-table th,
.invoices-table td {
    border-color: rgba(255, 255, 255, 0.04);
    color: var(--dark-color);
}

.btn-primary {
    background: linear-gradient(120deg, var(--secondary-color), var(--primary-color));
    border: none;
    box-shadow: 0 15px 40px rgba(66, 227, 255, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-soft);
    color: var(--dark-color);
}

.profile-sidebar {
    backdrop-filter: blur(16px);
}

.profile-usermenu .nav-link.active,
.profile-usermenu .nav-link:hover {
    background: rgba(124, 155, 255, 0.18);
    color: var(--dark-color);
}

.modal-content {
    box-shadow: 0 25px 65px rgba(5, 6, 15, 0.65);
}
