* {
    box-sizing: border-box;
}


.table-card {
    overflow-x: auto;
}

body {
    margin: 0;
    font-family: Inter, sans-serif;

    background: #f5f7fa;
    color: #222;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;

    background: #0f172a;
    color: white;

    display: flex;
    flex-direction: column;

    padding: 24px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 40px;

    font-size: 1.2rem;
    font-weight: 700;
}

.sidebar-logo img {
    width: 36px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-nav a,
.logout-link {
    color: white;
    text-decoration: none;

    padding: 12px 16px;

    border-radius: 10px;

    transition: .2s;
}


.sidebar-nav a:hover,
.logout-link:hover {
    background: rgba(255,255,255,.1);
}

.logout-link {
    margin-top: auto;
}

.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    margin: 0 0 8px;
    color: #1e3a8a;
}

.page-header p {
    color: #64748b;
}


.stat-card {
    background: white;

    padding: 24px;

    border-radius: 16px;

    box-shadow:
            0 10px 30px rgba(15,23,42,.08);
}

.stat-title {
    color: #64748b;
}

.main-content {
    flex: 1;
    padding: 40px;
    min-width: 0;
}

.page-header {
    margin-bottom: 32px;
}

.stats-grid,
.quick-actions {
    width: 100%;
    max-width: 980px;

    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.stats-grid {
    margin-bottom: 28px;
}

.action-card {
    background: white;
    text-decoration: none;
    color: #1e293b;

    min-height: 80px;
    padding: 0 28px;
    border-radius: 16px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;

    font-weight: 700;

    box-shadow: 0 10px 30px rgba(15,23,42,.08);
    transition: .2s;
}

.action-card i {
    font-size: 2rem;
    color: #2563eb;
    flex-shrink: 0;
}

.action-card span {
    line-height: 1;
}

.stat-number {
    font-size: 2.4rem;
    font-weight: 700;

    margin: 12px 0;

    color: #2563eb;
}

.stat-subtitle {
    color: #94a3b8;
}


.action-card {
    background: white;

    text-decoration: none;

    color: #1e293b;

    padding: 24px;

    border-radius: 16px;

    text-align: center;

    font-weight: 600;

    transition: .2s;

    box-shadow:
            0 10px 30px rgba(15,23,42,.08);
}

.action-card:hover {
    transform: translateY(-3px);

    box-shadow:
            0 15px 35px rgba(37,99,235,.15);
}


.container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

h1,
h2,
h3 {
    margin-top: 0;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

form {
    background: white;

    padding: 20px;

    border-radius: 8px;

    margin-bottom: 20px;
}

form div {
    margin-bottom: 15px;
}

label {
    display: block;

    margin-bottom: 5px;

    font-weight: bold;
}

input,
select,
textarea {
    width: 100%;

    padding: 10px;

    border: 1px solid #ccc;

    border-radius: 6px;
}

textarea {
    resize: vertical;
}

button,
.btn {
    display: inline-block;

    padding: 10px 16px;

    border: none;

    border-radius: 6px;

    cursor: pointer;

    background: #2563eb;
    color: white;
}

button:hover,
.btn:hover {
    background: #1d4ed8;
}

table {
    width: 100%;

    border-collapse: collapse;

    background: white;
}

th,
td {
    padding: 12px;

    border-bottom: 1px solid #ddd;

    text-align: left;
}

th {
    background: #f3f4f6;
}

tr:hover {
    background: #f9fafb;
}

.card {
    background: white;

    padding: 20px;

    border-radius: 8px;

    margin-bottom: 20px;

    box-shadow:
            0 1px 3px rgba(0,0,0,.1);
}

nav {
    margin-bottom: 20px;
}

nav a {
    margin-right: 15px;
    font-weight: 600;
}

.login-page {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
            linear-gradient(
                    135deg,
                    #dbeafe 0%,
                    #93c5fd 35%,
                    #60a5fa 70%,
                    #2563eb 100%
            );
}

.login-card {
    width: 430px;

    background: rgba(255,255,255,.95);

    backdrop-filter: blur(12px);

    border-radius: 20px;

    padding: 40px;

    padding-top: 25px;

    box-shadow:
            0 25px 60px rgba(0,0,0,.18);
}

.login-card h1 {
    text-align: center;

    margin-bottom: 10px;

    color: #1e3a8a;
}

.login-subtitle {
    text-align: center;

    margin-bottom: 30px;

    color: #666;
}

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

.form-group label {
    display: block;

    margin-bottom: 6px;

    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;

    padding: 12px;

    border: 1px solid #d1d5db;

    border-radius: 8px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;

    border-color: #2563eb;
}

.remember-row {
    margin: 18px 0 22px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    font-weight: 500;
    color: #333;
    cursor: pointer;
}

.checkbox-label input {
    width: auto;
    margin: 0;
}

.btn-login {
    width: 100%;

    padding: 14px;

    border: none;

    border-radius: 8px;

    background: #2563eb;

    color: white;

    font-size: 16px;
    font-weight: 600;

    cursor: pointer;
}

.btn-login:hover {
    background: #1d4ed8;
}

.error-box {
    margin-top: 20px;

    padding: 12px;

    background: #fee2e2;

    color: #991b1b;

    border-radius: 8px;
}

.login-logo {
    text-align: center;
    margin-bottom: 10px;
}

.login-logo img {
    width: 60px;
    height: auto;
}

.login-card h1 {
    margin-top: 0;
}


.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 24px;
}

.page-header h1 {
    margin: 0 0 6px;
}

.page-header p {
    margin: 0;
    color: #64748b;
}

.btn-primary {
    background: #2563eb;
    color: white;

    text-decoration: none;

    padding: 12px 18px;

    border-radius: 10px;

    font-weight: 600;

    transition: .2s;
}

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

.table-card {
    background: white;

    border-radius: 16px;

    overflow: hidden;

    box-shadow:
            0 10px 30px rgba(15,23,42,.08);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #f8fafc;
}

.data-table th {
    text-align: left;
    padding: 16px;

    font-size: .9rem;
    color: #64748b;

    border-bottom: 1px solid #e2e8f0;
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.user-link {
    color: #1e293b;
    text-decoration: none;
    font-weight: 600;
}

.user-link:hover {
    color: #2563eb;
}

.status-badge {
    display: inline-block;

    padding: 4px 10px;

    border-radius: 999px;

    font-size: .8rem;
    font-weight: 600;
}

.status-badge.active {
    background: #dcfce7;
    color: #166534;
}

.status-badge.inactive {
    background: #fee2e2;
    color: #991b1b;
}

.role-badge {
    display: inline-block;

    padding: 4px 10px;

    background: #eff6ff;
    color: #1d4ed8;

    border-radius: 999px;

    font-size: .8rem;
}

.btn-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}
.page-container {
    width: 100%;
    max-width: 1200px;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.details-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(15,23,42,.08);
}

.details-card h2 {
    margin: 0 0 20px;
    color: #1e3a8a;
    font-size: 1.2rem;
}

.details-list {
    display: flex;
    flex-direction: column;
}

.details-row {
    display: flex;
    justify-content: space-between;
    gap: 24px;

    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.details-row span {
    color: #64748b;
}

.details-row strong {
    color: #1e293b;
    text-align: right;
}

.vehicle-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vehicle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;

    padding: 14px 16px;

    background: #f8fafc;
    border-radius: 12px;
}

.vehicle-item p {
    margin: 4px 0 0;
    color: #64748b;
}

.back-link {
    display: inline-block;
    margin-top: 24px;

    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

/* форм админ за юзър */

.form-card {
    background: white;

    border-radius: 16px;

    padding: 30px;

    box-shadow:
            0 8px 24px rgba(15,23,42,.08);
}

.admin-form {
    width: 100%;
}

.form-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 20px;
}

.full-width {
    grid-column: 1 / -1;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;

    color: #475569;

    font-weight: 600;
}

.form-group input,
.form-group select {

    height: 46px;

    padding: 0 14px;

    border: 1px solid #dbe3ee;

    border-radius: 10px;

    font-size: .95rem;

    background: white;

    transition: .2s;
}

.form-group input:focus,
.form-group select:focus {

    outline: none;

    border-color: #2563eb;

    box-shadow:
            0 0 0 3px rgba(37,99,235,.15);
}

.form-actions {

    display: flex;

    justify-content: flex-end;

    gap: 12px;

    margin-top: 30px;
}

.btn-secondary {

    display: inline-flex;

    align-items: center;

    padding: 12px 18px;

    border-radius: 10px;

    background: #e2e8f0;

    color: #334155;

    text-decoration: none;

    font-weight: 600;
}

.page-container.narrow {
    max-width: 900px;
}

/* автомобили */
.mileage-cell {
    font-weight: 600;
    color: #0088ff;
}

.tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    margin-bottom: 24px;
}

.tabs-nav a {
    padding: 10px 14px;

    background: white;
    color: #334155;

    border-radius: 10px;

    text-decoration: none;
    font-weight: 600;

    box-shadow: 0 4px 14px rgba(15,23,42,.06);
}

.tabs-nav a:hover,
.tabs-nav a.active {
    background: #2563eb;
    color: white;
}

.notes-box {
    margin-top: 20px;
    padding: 16px;

    background: #f8fafc;
    border-radius: 12px;
}

.notes-box p {
    margin: 8px 0 0;
    color: #475569;
}

.assignment-note-row td {
    background: #f8fafc;
    color: #64748b;

    font-size: .9rem;
    font-style: italic;
}

.table-wrapper {
    overflow-x: auto;
}

.form-group input:not([type="checkbox"]),
.form-group select,
.form-group textarea {
    padding: 0 14px;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    font-size: .95rem;
    background: white;
    transition: .2s;
}

.form-group input:not([type="checkbox"]),
.form-group select {
    height: 46px;
}

.form-group textarea {
    padding-top: 12px;
    resize: vertical;
}

.alert {
    margin-top: 20px;
    padding: 14px 16px;

    border-radius: 10px;
    font-weight: 500;
}

.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

@media (max-width: 900px) {
    .app-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
    }

    .sidebar-nav {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .logout-link {
        margin-top: 16px;
    }

    .main-content {
        padding: 24px 16px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .form-grid,
    .stats-grid,
    .quick-actions,
    .details-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .form-actions .btn-primary,
    .form-actions .btn-secondary {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .data-table {
        min-width: 720px;
    }
}

.reports-grid {
    max-width: 980px;
    margin-top: 28px;
}

.report-stats {
    margin-top: 24px;
    margin-bottom: 24px;

    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-stats .stat-card {
    min-height: 110px;
}

.report-stats .stat-card h3 {
    margin: 0 0 12px;
    font-size: 1.4rem;
    color: #1e293b;
}

.report-stats .stat-card p {
    margin: 0;
    color: #475569;
}

@media (max-width: 1100px) {
    .report-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .report-stats {
        grid-template-columns: 1fr;
    }
}

/* тест */
.report-stats {
    margin: 28px 0;

    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.report-stats .stat-card {
    background: #ffffff;

    border-radius: 18px;

    padding: 24px;

    box-shadow:
            0 8px 20px rgba(15, 23, 42, 0.06);

    border: 1px solid #e2e8f0;

    transition: all 0.2s ease;
}

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

    box-shadow:
            0 12px 28px rgba(15, 23, 42, 0.10);
}

.report-stats .stat-card h3 {
    margin: 0;

    font-size: 2rem;
    font-weight: 700;

    color: #1d4ed8;
}

.report-stats .stat-card p {
    margin-top: 10px;

    font-size: 0.95rem;

    color: #64748b;
}

/* тест1 */
.report-stats {
    margin: 28px 0;

    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.report-stats .stat-card {
    background: #ffffff;

    border-radius: 18px;

    padding: 24px;

    box-shadow:
            0 8px 20px rgba(15, 23, 42, 0.06);

    border: 1px solid #e2e8f0;

    transition: all 0.2s ease;
}

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

    box-shadow:
            0 12px 28px rgba(15, 23, 42, 0.10);
}

.report-stats .stat-card h3 {
    margin: 0;

    font-size: 2rem;
    font-weight: 700;

    color: #1d4ed8;
}

.report-stats .stat-card p {
    margin-top: 10px;

    font-size: 0.95rem;

    color: #64748b;
}

.report-stats .stat-card {
    position: relative;
}

.report-stats .stat-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;
    right: 0;

    height: 4px;

    border-radius: 18px 18px 0 0;

    background: linear-gradient(
            90deg,
            #2563eb,
            #3b82f6
    );
}

.report-stats .stat-card::before {
    height: 3px;
}

.report-stats {
    margin: 28px 0 32px;
}

/*дашборд */
.dashboard-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;

    margin-top: 28px;
}

.dashboard-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dashboard-list-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;

    padding: 14px 16px;

    background: #f8fafc;
    border-radius: 12px;
}

.dashboard-list-item p {
    margin: 4px 0 0;
    color: #64748b;
}

@media (max-width: 900px) {
    .dashboard-panels {
        grid-template-columns: 1fr;
    }
}

.dashboard-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 28px;
}

.dashboard-panels .details-card {
    min-height: 260px;
}

.dashboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dashboard-list-item {
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-list-item strong {
    display: block;
    margin-bottom: 4px;
}

.dashboard-list-item p {
    margin: 0;
    color: #64748b;
    font-size: .9rem;
}

.dashboard-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    text-decoration: none;
    color: inherit;

    padding: 16px;
    border-radius: 12px;

    transition: all .2s ease;
}

.dashboard-list-item:hover {
    background: #f8fafc;
    transform: translateX(4px);
}
.section-subtitle {
    margin-top: 28px;
}
.reports-chart-card {
    margin-top: 28px;
    padding-top: 1%;
}

.chart-header h2 {
    margin-bottom: 6px;
}

.chart-header p {
    margin: 0;
    color: #64748b;
}

.chart-wrapper {
    height: 320px;
    margin-top: 24px;
}

.reports-grid .action-card {
    border: 1px solid #dbeafe;
    background: linear-gradient(135deg, #ffffff, #f8fbff);
    transition: all 0.2s ease;
}

.reports-grid .action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 35px rgba(37, 99, 235, 0.14);
}

.reports-grid .action-card i {
    font-size: 2rem;
}

.reports-grid .action-card:nth-child(1) i {
    color: #2563eb;
}

.reports-grid .action-card:nth-child(2) i {
    color: #16a34a;
}

.reports-grid .action-card:nth-child(3) i {
    color: #7c3aed;
}

.reports-chart-card {
    margin-top: 28px;
    padding: 28px;
}

.chart-wrapper {
    height: 360px;
    margin-top: 24px;
}

.sidebar-nav a,
.logout-link {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-nav a i,
.logout-link i {
    width: 20px;
    font-size: 18px;
    text-align: center;
}

.sidebar-nav a {
    padding: 12px 16px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.sidebar-nav a:hover {
    background: rgba(255,255,255,0.08);
}

.form-error {
    margin-bottom: 18px;
    padding: 14px 16px;

    border-radius: 12px;

    background: #fee2e2;
    color: #b91c1c;

    font-weight: 600;
}

.sidebar-section-title {
    margin: 24px 16px 8px;

    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;

    color: rgba(255, 255, 255, 0.45);
}

.error-page {
    max-width: 900px;
    margin: 80px auto;

    display: flex;
    align-items: center;
    gap: 60px;
}

.error-content {
    flex: 1;
}

.error-illustration {
    width: 380px;
    flex-shrink: 0;
}

.section-actions {
    margin-bottom: 1rem;
}

.vehicle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.vehicle-item-info {
    flex: 1;
}

.vehicle-item-actions {
    flex-shrink: 0;
}

.vehicle-item-actions .btn-sm {
    white-space: nowrap;
    min-width: 110px;
    text-align: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;

    font-weight: 600;
    color: #344767;

    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
}

.checkbox-list{

    display:grid;

    grid-template-columns:repeat(auto-fill,minmax(250px,1fr));

    gap:12px;

    margin-top:10px;

}

.form-hint{

    display:block;

    margin-top:10px;

    color:#6b7280;

    font-size:13px;

}

.fuel-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 5px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
}

.fuel-status.normal {
    color: #166534;
    background: #dcfce7;
}

.fuel-status.warning {
    color: #92400e;
    background: #fef3c7;
}

.fuel-status.danger {
    color: #991b1b;
    background: #fee2e2;
}

.fuel-diff.normal {
    color: #166534;
}

.fuel-diff.warning {
    color: #92400e;
}

.fuel-diff.danger {
    color: #991b1b;
}

.mileage-anomaly-alert {
    margin: 22px 0 6px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 18px 22px;

    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 16px;

    text-decoration: none;
    color: inherit;

    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);

    transition: all 0.2s ease;
}

.mileage-anomaly-alert:hover {
    transform: translateY(-2px);

    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
}

.mileage-anomaly-alert strong {
    display: block;

    margin-bottom: 6px;

    font-size: 1rem;
    color: #9a3412;
}

.mileage-anomaly-alert strong i {
    margin-right: 8px;
}

.mileage-anomaly-alert p {
    margin: 0;

    font-size: 0.95rem;
    color: #7c2d12;
}

.mileage-anomaly-alert > i {
    font-size: 18px;
    color: #ea580c;
}

.anomaly-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;

    box-shadow:
            0 8px 20px rgba(15, 23, 42, 0.05);
}

.anomaly-card .dashboard-list-item {
    border-radius: 0;
    background: #f8fafc;
}

.anomaly-actions {
    padding: 20px;

    border-top: 1px solid #e2e8f0;
}

.anomaly-actions textarea {
    width: 100%;
    box-sizing: border-box;

    margin-bottom: 12px;
}