/* =========================================================
   AUTO SERVICE MANAGER - GLOBAL STYLE
   ========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
    color: #1f2937;
    line-height: 1.5;
}

body.sidebar-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
    display: block;
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;

    width: 260px;

    display: flex;
    flex-direction: column;

    background: #111827;
    color: #fff;

    z-index: 1000;

    overflow-y: auto;

    transition: transform 0.25s ease;
}

.sidebar-brand {
    min-height: 76px;

    display: flex;
    align-items: center;

    padding: 16px 18px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-icon {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    margin-right: 12px;

    border-radius: 10px;

    background: rgba(255, 255, 255, 0.1);

    font-size: 21px;
}

.brand-text {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.brand-text strong {
    font-size: 17px;
    white-space: nowrap;
}

.brand-text span {
    margin-top: 1px;

    color: #9ca3af;

    font-size: 12px;
}

.sidebar-close {
    display: none;

    margin-left: auto;

    width: 38px;
    height: 38px;

    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 8px;

    background: transparent;
    color: #fff;

    font-size: 28px;
    line-height: 1;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.08);
}


/* =========================================================
   SIDEBAR NAVIGATION
   ========================================================= */

.sidebar-nav {
    flex: 1;

    padding: 16px 12px;
}

.nav-label {
    margin: 20px 12px 7px;

    color: #6b7280;

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.nav-label:first-child {
    margin-top: 5px;
}

.nav-item {
    display: flex;
    align-items: center;

    min-height: 45px;

    margin-bottom: 4px;
    padding: 10px 12px;

    border-radius: 8px;

    color: #d1d5db;

    font-size: 14px;

    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

.nav-item.active {
    background: #2563eb;
    color: #fff;
}

.nav-icon {
    width: 27px;

    flex-shrink: 0;

    margin-right: 8px;

    text-align: center;
    font-size: 17px;
}


/* =========================================================
   SIDEBAR FOOTER
   ========================================================= */

.sidebar-footer {
    padding: 14px;

    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user {
    display: flex;
    align-items: center;

    margin-bottom: 10px;
}

.user-avatar,
.header-avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 50%;

    font-weight: 700;
}

.user-avatar {
    width: 38px;
    height: 38px;

    margin-right: 10px;

    background: #2563eb;
    color: #fff;
}

.user-info {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.user-info strong {
    overflow: hidden;

    color: #fff;

    font-size: 13px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-info span {
    color: #9ca3af;
    font-size: 11px;
}

.logout-link {
    display: flex;
    align-items: center;

    min-height: 40px;

    padding: 8px 10px;

    border-radius: 7px;

    color: #d1d5db;

    font-size: 13px;
}

.logout-link span {
    margin-right: 8px;
}

.logout-link:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}


/* =========================================================
   MAIN CONTENT
   ========================================================= */

.main-content {
    min-height: 100vh;

    margin-left: 260px;

    transition: margin-left 0.25s ease;
}


/* =========================================================
   HEADER
   ========================================================= */

.top-header {
    min-height: 76px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 30px;

    background: #fff;

    border-bottom: 1px solid #e5e7eb;
}

.header-left,
.header-right,
.header-user {
    display: flex;
    align-items: center;
}

.mobile-menu-btn {
    display: none;

    width: 42px;
    height: 42px;

    align-items: center;
    justify-content: center;

    margin-right: 12px;

    border: 1px solid #e5e7eb;
    border-radius: 8px;

    background: #fff;
    color: #111827;

    font-size: 21px;
}

.header-title h1 {
    color: #111827;

    font-size: 22px;
    font-weight: 700;
}

.header-user-text {
    display: flex;
    flex-direction: column;

    margin-right: 10px;

    text-align: right;
}

.header-user-text strong {
    max-width: 180px;

    overflow: hidden;

    color: #111827;

    font-size: 13px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-user-text span {
    color: #6b7280;
    font-size: 11px;
}

.header-avatar {
    width: 38px;
    height: 38px;

    background: #e8efff;
    color: #2563eb;
}


/* =========================================================
   PAGE CONTENT
   ========================================================= */

.page-content {
    width: 100%;
    max-width: 1600px;

    margin: 0 auto;
    padding: 28px 30px;
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 24px;
}

.page-heading h2 {
    color: #111827;
    font-size: 21px;
}

.page-heading p {
    margin-top: 4px;

    color: #6b7280;
    font-size: 13px;
}


/* =========================================================
   CARDS
   ========================================================= */

.card {
    background: #fff;

    border: 1px solid #e5e7eb;
    border-radius: 12px;

    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.card-header {
    padding: 18px 20px;

    border-bottom: 1px solid #e5e7eb;
}

.card-header h3 {
    color: #111827;
    font-size: 16px;
}

.card-body {
    padding: 20px;
}


/* =========================================================
   STATISTICS GRID
   ========================================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 18px;

    margin-bottom: 24px;
}

.stat-card {
    min-width: 0;

    padding: 20px;

    background: #fff;

    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.stat-label {
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
}

.stat-value {
    margin-top: 6px;

    color: #111827;

    font-size: 27px;
    font-weight: 700;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    padding: 9px 15px;

    border: 0;
    border-radius: 8px;

    font-size: 13px;
    font-weight: 600;

    transition:
        opacity 0.15s ease,
        background 0.15s ease;
}

.btn:hover {
    opacity: 0.9;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.btn-success {
    background: #15803d;
    color: #fff;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

.btn-warning {
    background: #d97706;
    color: #fff;
}


/* =========================================================
   FORMS
   ========================================================= */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 18px;
}

.form-group {
    min-width: 0;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;

    margin-bottom: 6px;

    color: #374151;

    font-size: 12px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    min-height: 44px;

    padding: 9px 11px;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    background: #fff;
    color: #111827;

    outline: none;
}

textarea.form-control {
    min-height: 110px;
    resize: vertical;
}

.form-control:focus {
    border-color: #2563eb;

    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-actions {
    display: flex;
    align-items: center;

    gap: 10px;

    margin-top: 22px;
}


/* =========================================================
   TABLES
   ========================================================= */

.table-responsive {
    width: 100%;

    overflow-x: auto;

    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;

    border-collapse: collapse;

    background: #fff;
}

.data-table th,
.data-table td {
    padding: 12px 14px;

    border-bottom: 1px solid #e5e7eb;

    text-align: left;
    vertical-align: middle;

    white-space: nowrap;
}

.data-table th {
    background: #f9fafb;
    color: #6b7280;

    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.data-table td {
    color: #374151;
    font-size: 13px;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}


/* =========================================================
   MESSAGES
   ========================================================= */

.alert {
    margin-bottom: 18px;
    padding: 12px 14px;

    border-radius: 8px;

    font-size: 13px;
}

.alert-success {
    background: #ecfdf3;
    color: #166534;

    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;

    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;

    border: 1px solid #fde68a;
}


/* =========================================================
   BADGES
   ========================================================= */

.badge {
    display: inline-flex;
    align-items: center;

    padding: 4px 8px;

    border-radius: 999px;

    font-size: 11px;
    font-weight: 600;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1d4ed8;
}


/* =========================================================
   MOBILE SIDEBAR OVERLAY
   ========================================================= */

.sidebar-overlay {
    position: fixed;
    inset: 0;

    display: none;

    background: rgba(17, 24, 39, 0.55);

    z-index: 900;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* =========================================================
   MOBILE / TABLET
   ========================================================= */

@media (max-width: 900px) {

    .sidebar {
        transform: translateX(-100%);

        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-close {
        display: flex;
    }

    .sidebar-overlay.show {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .top-header {
        min-height: 68px;

        padding: 0 20px;
    }

    .page-content {
        padding: 22px 20px;
    }

}


/* =========================================================
   PHONE
   ========================================================= */

@media (max-width: 600px) {

    .top-header {
        padding: 0 14px;
    }

    .header-title h1 {
        font-size: 18px;
    }

    .header-user-text {
        display: none;
    }

    .page-content {
        padding: 18px 14px;
    }

    .page-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .page-heading .btn {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 10px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-value {
        font-size: 23px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full-width {
        grid-column: auto;
    }

    .form-control {
        font-size: 16px;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .card-header,
    .card-body {
        padding: 15px;
    }

    .data-table {
        min-width: 720px;
    }

}


/* =========================================================
   SMALL PHONE
   ========================================================= */

@media (max-width: 400px) {

    .sidebar {
        width: min(290px, 88vw);
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .mobile-menu-btn {
        width: 40px;
        height: 40px;

        margin-right: 9px;
    }

    .header-title h1 {
        font-size: 16px;
    }

    .header-avatar {
        width: 35px;
        height: 35px;
    }

}
/* =========================================================
   FOOTER
   ========================================================= */

.app-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin: 0 30px;
    padding: 20px 0;

    border-top: 1px solid #e5e7eb;

    color: #9ca3af;
    font-size: 11px;
}

@media (max-width: 900px) {
    .app-footer {
        margin: 0 20px;
    }
}

@media (max-width: 600px) {
    .app-footer {
        align-items: flex-start;
        flex-direction: column;

        gap: 4px;

        margin: 0 14px;
        padding: 16px 0;
    }
}
/* =========================================================
   DASHBOARD
   ========================================================= */

.dashboard-finance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 18px;

    margin-bottom: 24px;
}

.dashboard-finance-label {
    margin-bottom: 7px;

    color: #6b7280;

    font-size: 12px;
    font-weight: 600;
}

.dashboard-finance-value {
    color: #111827;

    font-size: 25px;
    font-weight: 700;
}

.dashboard-finance-value small {
    color: #6b7280;

    font-size: 12px;
    font-weight: 600;
}

.dashboard-finance-note {
    margin-top: 5px;

    color: #9ca3af;

    font-size: 11px;
}


.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 18px;
}


.dashboard-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;
}

.dashboard-card-header > div {
    min-width: 0;
}

.dashboard-card-header span {
    display: block;

    margin-top: 3px;

    color: #9ca3af;

    font-size: 11px;
}

.dashboard-view-link {
    flex-shrink: 0;

    color: #2563eb;

    font-size: 12px;
    font-weight: 600;
}

.dashboard-view-link:hover {
    text-decoration: underline;
}


.dashboard-card-body {
    padding-top: 5px;
    padding-bottom: 5px;
}


.dashboard-list {
    width: 100%;
}

.dashboard-list-item {
    display: flex;
    align-items: center;

    gap: 12px;

    min-height: 68px;

    padding: 10px 0;

    border-bottom: 1px solid #f1f5f9;
}

.dashboard-list-item:last-child {
    border-bottom: 0;
}


.dashboard-time {
    width: 54px;

    flex-shrink: 0;

    color: #111827;

    font-size: 14px;
    font-weight: 700;
}


.dashboard-order-number {
    min-width: 90px;

    flex-shrink: 0;

    color: #2563eb;

    font-size: 11px;
    font-weight: 700;
}


.dashboard-item-main {
    min-width: 0;

    display: flex;
    flex: 1;
    flex-direction: column;
}

.dashboard-item-main strong {
    overflow: hidden;

    color: #111827;

    font-size: 13px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-item-main span {
    overflow: hidden;

    margin-top: 2px;

    color: #6b7280;

    font-size: 11px;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.dashboard-empty {
    min-height: 220px;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    padding: 30px 15px;

    text-align: center;
}

.dashboard-empty-icon {
    margin-bottom: 10px;

    font-size: 32px;
}

.dashboard-empty strong {
    color: #374151;

    font-size: 14px;
}

.dashboard-empty span {
    margin-top: 4px;

    color: #9ca3af;

    font-size: 11px;
}


/* =========================================================
   DASHBOARD RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 600px) {

    .dashboard-finance-grid {
        grid-template-columns: 1fr;

        gap: 10px;
    }

    .dashboard-finance-value {
        font-size: 22px;
    }

    .dashboard-list-item {
        align-items: flex-start;

        flex-wrap: wrap;

        gap: 7px 10px;

        padding: 12px 0;
    }

    .dashboard-item-main {
        min-width: calc(100% - 70px);
    }

    .dashboard-list-item .badge {
        margin-left: 64px;
    }

    .dashboard-order-number {
        min-width: 78px;
    }

    .dashboard-card-header {
        align-items: flex-start;
    }

}


@media (max-width: 400px) {

    .dashboard-card-header {
        flex-direction: column;
    }

    .dashboard-list-item .badge {
        margin-left: 0;
    }

}
/* =========================================================
   CLIENTS
   ========================================================= */

.clients-filter-card {
    margin-bottom: 20px;
}

.clients-filters {
    display: grid;
    grid-template-columns: minmax(250px, 1fr) 180px auto;

    align-items: end;

    gap: 14px;
}

.clients-search,
.clients-status-filter {
    min-width: 0;
}

.clients-search label,
.clients-status-filter label {
    display: block;

    margin-bottom: 6px;

    color: #374151;

    font-size: 12px;
    font-weight: 600;
}

.clients-filter-actions {
    display: flex;
    align-items: center;

    gap: 8px;
}


.clients-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.clients-card-header span {
    display: block;

    margin-top: 3px;

    color: #9ca3af;

    font-size: 11px;
}


.client-name-cell {
    display: flex;
    align-items: center;

    gap: 10px;
}

.client-avatar {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 9px;

    background: #f3f4f6;

    font-size: 17px;
}

.client-name-cell > div:last-child {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.client-name-cell strong {
    color: #111827;

    font-size: 13px;
}

.client-name-cell span {
    margin-top: 2px;

    color: #9ca3af;

    font-size: 10px;
}


.client-contact-link {
    color: #374151;
}

.client-contact-link:hover {
    color: #2563eb;
}


.client-vehicle-count {
    display: inline-flex;
    align-items: center;

    gap: 4px;

    font-weight: 600;
}


.table-actions {
    display: flex;
    align-items: center;

    gap: 6px;
}

.table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 32px;

    padding: 5px 9px;

    border: 1px solid #e5e7eb;
    border-radius: 6px;

    background: #fff;
    color: #374151;

    font-size: 11px;
    font-weight: 600;
}

.table-action:hover {
    border-color: #bfdbfe;

    background: #eff6ff;
    color: #2563eb;
}


.text-muted {
    color: #9ca3af;
}


.clients-empty {
    min-height: 320px;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    padding: 40px 20px;

    text-align: center;
}

.clients-empty-icon {
    margin-bottom: 12px;

    font-size: 40px;
}

.clients-empty strong {
    color: #374151;

    font-size: 15px;
}

.clients-empty span {
    margin-top: 5px;
    margin-bottom: 18px;

    color: #9ca3af;

    font-size: 12px;
}


/* =========================================================
   PAGINATION
   ========================================================= */

.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding: 16px 20px;

    border-top: 1px solid #e5e7eb;
}

.pagination-info {
    color: #6b7280;

    font-size: 11px;
}

.pagination {
    display: flex;
    align-items: center;

    gap: 5px;
}

.pagination-btn {
    min-width: 34px;
    height: 34px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 8px;

    border: 1px solid #e5e7eb;
    border-radius: 6px;

    background: #fff;
    color: #374151;

    font-size: 12px;
    font-weight: 600;
}

.pagination-btn:hover {
    border-color: #bfdbfe;

    color: #2563eb;
}

.pagination-btn.active {
    border-color: #2563eb;

    background: #2563eb;
    color: #fff;
}


/* =========================================================
   CLIENTS RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

    .clients-filters {
        grid-template-columns: 1fr 170px;
    }

    .clients-filter-actions {
        grid-column: 1 / -1;
    }

}


@media (max-width: 600px) {

    .clients-filters {
        grid-template-columns: 1fr;
    }

    .clients-filter-actions {
        grid-column: auto;
    }

    .clients-filter-actions .btn {
        flex: 1;
    }

    .pagination-wrapper {
        align-items: stretch;
        flex-direction: column;
    }

    .pagination {
        flex-wrap: wrap;
    }

}
/* =========================================================
   CLIENT FORM
   ========================================================= */

.client-form-card {
    margin-bottom: 20px;
}

.client-type-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 14px;
}

.client-type-option {
    cursor: pointer;
}

.client-type-option input {
    position: absolute;

    opacity: 0;
    pointer-events: none;
}

.client-type-box {
    min-height: 78px;

    display: flex;
    align-items: center;

    gap: 13px;

    padding: 15px;

    border: 2px solid #e5e7eb;
    border-radius: 10px;

    background: #fff;

    transition:
        border-color 0.15s ease,
        background 0.15s ease;
}

.client-type-option input:checked + .client-type-box {
    border-color: #2563eb;

    background: #eff6ff;
}

.client-type-icon {
    width: 43px;
    height: 43px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 9px;

    background: #f3f4f6;

    font-size: 20px;
}

.client-type-box > span:last-child {
    display: flex;
    flex-direction: column;
}

.client-type-box strong {
    color: #111827;

    font-size: 13px;
}

.client-type-box small {
    margin-top: 3px;

    color: #6b7280;

    font-size: 11px;
}


.client-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 10px;
}


.form-error-list {
    margin-top: 7px;
    padding-left: 20px;
}

.form-error-list li {
    margin-top: 3px;
}


@media (max-width: 600px) {

    .client-type-selector {
        grid-template-columns: 1fr;
    }

    .client-form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .client-form-actions .btn {
        width: 100%;
    }

}
/* =========================================================
   CLIENT PROFILE
   ========================================================= */

.client-profile-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.client-status-text {
    font-weight: 600;
}

.client-status-text.active {
    color: #15803d;
}

.client-status-text.inactive {
    color: #dc2626;
}


.client-profile-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 18px;

    margin-bottom: 20px;
}


.client-profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);

    gap: 18px;

    margin-bottom: 20px;
}


.client-detail-list {
    display: flex;
    flex-direction: column;
}

.client-detail-row {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);

    gap: 15px;

    padding: 12px 0;

    border-bottom: 1px solid #f1f5f9;
}

.client-detail-row:first-child {
    padding-top: 0;
}

.client-detail-row:last-child {
    border-bottom: 0;
}

.client-detail-row > span {
    color: #6b7280;
    font-size: 12px;
}

.client-detail-row strong {
    min-width: 0;

    color: #111827;

    font-size: 13px;
    font-weight: 600;

    overflow-wrap: anywhere;
}

.client-detail-row a:hover {
    color: #2563eb;
}


.client-notes {
    margin-top: 18px;
    padding-top: 16px;

    border-top: 1px solid #e5e7eb;
}

.client-notes > span {
    color: #6b7280;

    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.client-notes p {
    margin-top: 7px;

    color: #374151;

    font-size: 13px;
    white-space: normal;
}


.client-finance-item {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding: 14px 0;

    border-bottom: 1px solid #f1f5f9;
}

.client-finance-item:first-child {
    padding-top: 0;
}

.client-finance-item:last-child {
    border-bottom: 0;
}

.client-finance-item span {
    color: #6b7280;

    font-size: 12px;
}

.client-finance-item strong {
    color: #111827;

    font-size: 14px;
}

.client-finance-item .amount-due {
    color: #dc2626;
}


.client-vehicles-card {
    margin-bottom: 20px;
}

.client-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;
}

.client-section-header > div {
    min-width: 0;
}

.client-section-header span {
    display: block;

    margin-top: 3px;

    color: #9ca3af;

    font-size: 11px;
}


.client-vehicles-empty {
    min-height: 240px;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    padding: 30px;

    text-align: center;
}

.client-vehicles-empty > div {
    margin-bottom: 10px;

    font-size: 36px;
}

.client-vehicles-empty strong {
    color: #374151;

    font-size: 14px;
}

.client-vehicles-empty span {
    margin: 4px 0 17px;

    color: #9ca3af;

    font-size: 11px;
}


.license-plate {
    display: inline-flex;

    padding: 4px 8px;

    border: 1px solid #d1d5db;
    border-radius: 5px;

    background: #f9fafb;
    color: #111827;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.5px;
}


/* =========================================================
   CLIENT PROFILE RESPONSIVE
   ========================================================= */

@media (max-width: 1000px) {

    .client-profile-grid {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 800px) {

    .client-profile-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 600px) {

    .client-profile-actions {
        align-items: stretch;
        flex-direction: column;

        width: 100%;
    }

    .client-profile-actions .btn {
        width: 100%;
    }

    .client-profile-stats {
        gap: 10px;
    }

    .client-detail-row {
        grid-template-columns: 1fr;

        gap: 3px;
    }

    .client-section-header {
        align-items: stretch;
        flex-direction: column;
    }

    .client-section-header .btn {
        width: 100%;
    }

}
/* =========================================================
   VEHICLE FORM
   ========================================================= */

.vehicle-form-card {
    margin-bottom: 20px;
}

.form-help {
    display: block;

    margin-top: 5px;

    color: #9ca3af;

    font-size: 10px;
}

.vehicle-uppercase {
    text-transform: uppercase;
}

@media (max-width: 600px) {

    .vehicle-form-card .form-grid {
        grid-template-columns: 1fr;
    }

}
/* =========================================================
   VEHICLE PROFILE
   ========================================================= */

.vehicle-profile-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vehicle-profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(270px, 1fr);

    gap: 18px;

    margin-bottom: 20px;
}

.vehicle-profile-grid > div:last-child {
    display: flex;
    flex-direction: column;

    gap: 18px;
}

.vehicle-owner-card {
    margin-bottom: 0;
}

.vehicle-owner {
    display: flex;
    align-items: center;

    gap: 12px;
}

.vehicle-owner-icon {
    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 10px;

    background: #f3f4f6;

    font-size: 21px;
}

.vehicle-owner > div:last-child {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.vehicle-owner strong {
    overflow: hidden;

    color: #111827;

    font-size: 13px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.vehicle-owner span {
    margin-top: 3px;

    color: #6b7280;

    font-size: 11px;
}

.vehicle-owner-button {
    width: 100%;

    margin-top: 17px;
}

.vehicle-history-card {
    margin-bottom: 20px;
}

.vehicle-history-empty {
    min-height: 240px;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    padding: 30px;

    text-align: center;
}

.vehicle-history-empty > div {
    margin-bottom: 10px;

    font-size: 35px;
}

.vehicle-history-empty strong {
    color: #374151;

    font-size: 14px;
}

.vehicle-history-empty span {
    margin-top: 4px;

    color: #9ca3af;

    font-size: 11px;
}


/* =========================================================
   VEHICLE PROFILE RESPONSIVE
   ========================================================= */

@media (max-width: 1000px) {

    .vehicle-profile-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 600px) {

    .vehicle-profile-actions {
        align-items: stretch;
        flex-direction: column;

        width: 100%;
    }

    .vehicle-profile-actions .btn {
        width: 100%;
    }

}
/* =========================================================
   VEHICLES LIST
   ========================================================= */

.vehicle-list-main {
    display: flex;
    align-items: center;

    gap: 10px;

    min-width: 180px;
}

.vehicle-list-icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 9px;

    background: #f3f4f6;

    font-size: 17px;
}

.vehicle-list-main > div:last-child {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.vehicle-list-main strong {
    color: #111827;

    font-size: 13px;
}

.vehicle-list-main span {
    margin-top: 2px;

    color: #9ca3af;

    font-size: 10px;
}


.vehicle-list-owner {
    min-width: 135px;

    display: flex;
    flex-direction: column;
}

.vehicle-list-owner a {
    color: #111827;

    font-size: 12px;
    font-weight: 600;
}

.vehicle-list-owner a:hover {
    color: #2563eb;
}

.vehicle-list-owner span {
    margin-top: 2px;

    color: #9ca3af;

    font-size: 10px;
}
/* =========================================================
   APPOINTMENT FORM
   ========================================================= */

.appointment-form-card {
    margin-bottom: 20px;
}

.appointment-problem {
    min-height: 110px;
}

#vehicle_id:disabled {
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}

@media (max-width: 600px) {

    .appointment-form-card .form-grid {
        grid-template-columns: 1fr;
    }

}
/* =========================================================
   APPOINTMENT PROFILE
   ========================================================= */

.appointment-profile-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.appointment-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.appointment-stat-content {
    display: flex;
    align-items: center;
    min-height: 35px;
    margin-top: 7px;
}

.appointment-stat-value {
    margin-top: 6px;
    font-size: 18px;
}

.appointment-profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(270px, 1fr);
    gap: 18px;
    margin-bottom: 20px;
}

.appointment-profile-grid > div {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.appointment-info-card,
.appointment-problem-card,
.appointment-side-card {
    margin-bottom: 0;
}

.appointment-description {
    color: #374151;
    font-size: 14px;
    line-height: 1.7;
}

.appointment-vehicle {
    display: flex;
    align-items: center;
    gap: 12px;
}

.appointment-vehicle-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 10px;
    background: #f3f4f6;
    font-size: 21px;
}

.appointment-vehicle > div:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.appointment-vehicle strong {
    color: #111827;
    font-size: 13px;
}

.appointment-vehicle-meta {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.appointment-vehicle-meta span {
    color: #6b7280;
    font-size: 11px;
}

.appointment-vehicle-meta strong {
    color: #374151;
}

.appointment-workorder-card {
    margin-bottom: 20px;
}

.appointment-workorder-ready {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.appointment-workorder-ready > div {
    display: flex;
    flex-direction: column;
}

.appointment-workorder-ready span {
    color: #6b7280;
    font-size: 11px;
}

.appointment-workorder-ready strong {
    margin-top: 4px;
    color: #111827;
    font-size: 14px;
}

.appointment-workorder-disabled {
    padding: 8px 0;
    color: #6b7280;
    font-size: 12px;
}


/* =========================================================
   APPOINTMENT PROFILE RESPONSIVE
   ========================================================= */

@media (max-width: 1000px) {

    .appointment-profile-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 800px) {

    .appointment-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 600px) {

    .appointment-profile-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .appointment-profile-actions .btn {
        width: 100%;
    }

    .appointment-summary-grid {
        gap: 10px;
    }

    .appointment-workorder-ready {
        align-items: stretch;
        flex-direction: column;
    }

    .appointment-workorder-ready .btn {
        width: 100%;
    }

}
/* =========================================================
   APPOINTMENTS LIST
   ========================================================= */

.appointments-filter-card {
    margin-bottom: 20px;
}

.appointments-filters {
    display: grid;
    grid-template-columns:
        minmax(220px, 1fr)
        160px
        170px
        auto;
    align-items: end;
    gap: 14px;
}

.appointments-search label,
.appointments-date-filter label,
.appointments-status-filter label {
    display: block;
    margin-bottom: 6px;
    color: #374151;
    font-size: 12px;
    font-weight: 600;
}

.appointments-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.appointments-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.appointments-card-header span {
    display: block;
    margin-top: 3px;
    color: #9ca3af;
    font-size: 11px;
}

.appointment-date-cell,
.appointment-client-cell,
.appointment-vehicle-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.appointment-date-cell strong {
    color: #111827;
    font-size: 12px;
}

.appointment-date-cell span {
    margin-top: 4px;
    color: #6b7280;
    font-size: 11px;
}

.appointment-client-cell a,
.appointment-vehicle-cell a {
    color: #111827;
    font-size: 12px;
    font-weight: 600;
}

.appointment-client-cell a:hover,
.appointment-vehicle-cell a:hover {
    color: #2563eb;
}

.appointment-client-cell > span {
    margin-top: 3px;
    color: #9ca3af;
    font-size: 10px;
}

.appointment-vehicle-cell .license-plate {
    margin-top: 5px;
}

.appointment-problem-preview {
    max-width: 230px;
    overflow: hidden;
    color: #4b5563;
    font-size: 11px;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.appointments-empty {
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 40px 20px;
    text-align: center;
}

.appointments-empty-icon {
    margin-bottom: 12px;
    font-size: 40px;
}

.appointments-empty strong {
    color: #374151;
    font-size: 15px;
}

.appointments-empty span {
    margin: 5px 0 18px;
    color: #9ca3af;
    font-size: 12px;
}


/* =========================================================
   APPOINTMENTS LIST
   ========================================================= */

.appointments-filter-card {
    margin-bottom: 20px;
}

.appointments-filter-card .card-body {
    padding: 20px;
}


/* FILTERS */

.appointments-filters {
    display: grid;
    grid-template-columns:
        minmax(260px, 1.6fr)
        minmax(160px, 0.8fr)
        minmax(170px, 0.8fr)
        auto;
    gap: 16px;
    align-items: end;
}

.appointments-search,
.appointments-date-filter,
.appointments-status-filter {
    min-width: 0;
}

.appointments-search label,
.appointments-date-filter label,
.appointments-status-filter label {
    display: block;
    margin-bottom: 7px;

    color: #374151;

    font-size: 12px;
    font-weight: 600;
}

.appointments-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.appointments-filter-actions .btn {
    min-height: 40px;
    white-space: nowrap;
}


/* LIST CARD */

.appointments-list-card {
    overflow: hidden;
}

.appointments-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 18px 20px;
}

.appointments-card-header h3 {
    margin: 0;

    color: #111827;

    font-size: 15px;
}

.appointments-card-header span {
    display: block;

    margin-top: 4px;

    color: #9ca3af;

    font-size: 11px;
}


/* =========================================================
   TABLE
   ========================================================= */

.appointments-list-card .table-responsive {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;

    -webkit-overflow-scrolling: touch;
}

.appointments-list-card table {
    width: 100%;
    min-width: 1080px;

    border-collapse: collapse;

    table-layout: fixed;
}

.appointments-list-card thead {
    background: #f8fafc;
}

.appointments-list-card th {
    padding: 13px 14px;

    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;

    color: #374151;

    font-size: 11px;
    font-weight: 700;

    text-align: left;
    vertical-align: middle;

    white-space: nowrap;
}

.appointments-list-card td {
    padding: 15px 14px;

    border-bottom: 1px solid #eef2f7;

    color: #374151;

    font-size: 12px;

    vertical-align: middle;
}

.appointments-list-card tbody tr:last-child td {
    border-bottom: 0;
}

.appointments-list-card tbody tr:hover {
    background: #fafcff;
}


/* COLUMN WIDTHS */

.appointments-list-card th:nth-child(1),
.appointments-list-card td:nth-child(1) {
    width: 120px;
}

.appointments-list-card th:nth-child(2),
.appointments-list-card td:nth-child(2) {
    width: 155px;
}

.appointments-list-card th:nth-child(3),
.appointments-list-card td:nth-child(3) {
    width: 165px;
}

.appointments-list-card th:nth-child(4),
.appointments-list-card td:nth-child(4) {
    width: 220px;
}

.appointments-list-card th:nth-child(5),
.appointments-list-card td:nth-child(5) {
    width: 120px;
}

.appointments-list-card th:nth-child(6),
.appointments-list-card td:nth-child(6) {
    width: 95px;
}

.appointments-list-card th:nth-child(7),
.appointments-list-card td:nth-child(7) {
    width: 110px;
}

.appointments-list-card th:nth-child(8),
.appointments-list-card td:nth-child(8) {
    width: 125px;
}


/* DATA / TIME */

.appointment-date-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 4px;
}

.appointment-date-cell strong {
    color: #111827;

    font-size: 12px;
    font-weight: 700;

    white-space: nowrap;
}

.appointment-date-cell span {
    color: #6b7280;

    font-size: 11px;

    white-space: nowrap;
}


/* CLIENT */

.appointment-client-cell {
    min-width: 0;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 3px;
}

.appointment-client-cell a {
    display: block;

    max-width: 100%;

    overflow: hidden;

    color: #111827;

    font-size: 12px;
    font-weight: 700;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.appointment-client-cell a:hover {
    color: #2563eb;
}

.appointment-client-cell > span {
    display: block;

    max-width: 100%;

    overflow: hidden;

    color: #9ca3af;

    font-size: 10px;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* VEHICLE */

.appointment-vehicle-cell {
    min-width: 0;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 5px;
}

.appointment-vehicle-cell a {
    display: block;

    max-width: 100%;

    overflow: hidden;

    color: #111827;

    font-size: 12px;
    font-weight: 700;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.appointment-vehicle-cell a:hover {
    color: #2563eb;
}

.appointment-vehicle-cell .license-plate {
    margin: 0;

    white-space: nowrap;
}


/* PROBLEM */

.appointment-problem-preview {
    display: -webkit-box;

    max-width: 100%;

    overflow: hidden;

    color: #4b5563;

    font-size: 11px;
    line-height: 1.5;

    white-space: normal;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}


/* MECHANIC */

.appointments-list-card td:nth-child(5) {
    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* BADGES */

.appointments-list-card .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    max-width: 100%;

    white-space: nowrap;
}


/* ACTIONS */

.appointments-list-card .table-actions {
    display: flex;
    align-items: center;

    gap: 6px;

    white-space: nowrap;
}

.appointments-list-card .table-action {
    flex-shrink: 0;
}


/* EMPTY STATE */

.appointments-empty {
    min-height: 320px;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    padding: 40px 20px;

    text-align: center;
}

.appointments-empty-icon {
    margin-bottom: 12px;

    font-size: 40px;
}

.appointments-empty strong {
    color: #374151;

    font-size: 15px;
}

.appointments-empty span {
    margin: 5px 0 18px;

    color: #9ca3af;

    font-size: 12px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1200px) {

    .appointments-filters {
        grid-template-columns:
            minmax(240px, 1fr)
            160px
            170px;
    }

    .appointments-filter-actions {
        grid-column: 1 / -1;
    }

}


@media (max-width: 800px) {

    .appointments-filters {
        grid-template-columns: 1fr 1fr;
    }

    .appointments-search {
        grid-column: 1 / -1;
    }

    .appointments-filter-actions {
        grid-column: 1 / -1;
    }

}


@media (max-width: 600px) {

    .appointments-filter-card .card-body {
        padding: 15px;
    }

    .appointments-filters {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .appointments-search,
    .appointments-filter-actions {
        grid-column: auto;
    }

    .appointments-filter-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .appointments-filter-actions .btn {
        width: 100%;
    }

    .appointments-card-header {
        padding: 15px;
    }

    .appointments-list-card table {
        min-width: 1000px;
    }

    .appointments-list-card th,
    .appointments-list-card td {
        padding: 12px;
    }

}