﻿/* DriveWise - refreshed styling */

:root {
    --navy: #0f172a;
    --navy-light: #1e293b;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --orange: #f97316;
    --orange-dark: #ea580c;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
    --danger: #dc2626;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

html {
    min-height: 100%;
}

body {
    padding-top: 70px;
    padding-bottom: 30px;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 32rem), linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    color: var(--text);
    font-family: "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
}

/* Main layout */

.body-content {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 18px;
}

hr {
    border-top: 1px solid var(--border);
    margin-top: 40px;
}

footer {
    color: var(--muted);
    font-size: 0.95rem;
}

/* Navbar */

.navbar-inverse {
    background: rgba(15, 23, 42, 0.96);
    border: none;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

    .navbar-inverse .navbar-brand {
        color: #ffffff;
        font-weight: 800;
        letter-spacing: 0.03em;
    }

        .navbar-inverse .navbar-brand:hover,
        .navbar-inverse .navbar-brand:focus {
            color: #bfdbfe;
        }

    .navbar-inverse .navbar-nav > li > a {
        color: #cbd5e1;
        font-weight: 600;
    }

        .navbar-inverse .navbar-nav > li > a:hover,
        .navbar-inverse .navbar-nav > li > a:focus {
            color: #ffffff;
            background-color: rgba(255, 255, 255, 0.08);
        }

    .navbar-inverse .navbar-toggle {
        border-color: rgba(255, 255, 255, 0.35);
    }

        .navbar-inverse .navbar-toggle:hover,
        .navbar-inverse .navbar-toggle:focus {
            background-color: rgba(255, 255, 255, 0.12);
        }

/* Headings */

h1,
h2,
h3 {
    color: var(--navy);
    font-weight: 800;
    letter-spacing: -0.03em;
}

h1 {
    font-size: 4.2rem;
}

h2 {
    margin-top: 10px;
    margin-bottom: 22px;
}

    h2 a {
        color: var(--navy);
        font-weight: 800;
    }

        h2 a:hover {
            color: var(--blue);
            text-decoration: none;
        }

p {
    color: var(--muted);
}

/* Home page */

.jumbotron {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(37, 99, 235, 0.86)), linear-gradient(135deg, #0f172a, #2563eb);
    color: #ffffff;
    border-radius: 24px;
    padding: 64px 48px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

    .jumbotron h1 {
        color: #ffffff;
        font-size: clamp(3.4rem, 8vw, 6.8rem);
        font-weight: 900;
    }

    .jumbotron p {
        color: #dbeafe;
        max-width: 720px;
        font-size: 1.8rem;
    }

    .jumbotron .btn {
        margin-top: 12px;
    }

.row .col-md-4 {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .row .col-md-4:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow);
    }

    .row .col-md-4 h2 {
        margin-top: 0;
        color: var(--navy);
    }

    .row .col-md-4 p {
        min-height: 52px;
    }

/* Buttons and links */

a {
    color: var(--blue);
    font-weight: 600;
}

    a:hover,
    a:focus {
        color: var(--blue-dark);
    }

.btn,
.btn-default,
input[type="submit"] {
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 800;
    letter-spacing: 0.01em;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

    .btn:hover,
    .btn-default:hover,
    input[type="submit"]:hover {
        transform: translateY(-1px);
    }

.btn-default {
    background-color: var(--orange);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(249, 115, 22, 0.28);
}

    .btn-default:hover,
    .btn-default:focus {
        background-color: var(--orange-dark);
        color: #ffffff;
    }

.crud_link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 8px 10px 18px 0;
    padding: 9px 15px;
    border-radius: 999px;
    background: #e0f2fe;
    color: var(--blue-dark);
    font-weight: 800;
    text-decoration: none;
}

    .crud_link:hover {
        background: var(--blue);
        color: #ffffff;
        text-decoration: none;
    }

/* List pages */

.list_container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    margin-top: 24px;
}

.list_item {
    margin: 0;
    padding: 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

    .list_item:hover {
        background: #ffffff;
        border-color: #bfdbfe;
        transform: translateY(-5px);
        box-shadow: var(--shadow);
    }

    .list_item h2,
    .list_item h3 {
        margin-top: 0;
        color: var(--navy);
    }

    .list_item p {
        margin-bottom: 8px;
    }

    .list_item a {
        color: var(--navy);
        text-decoration: none;
    }

        .list_item a:hover {
            color: var(--blue);
        }

/* Detail pages */

.car_detail,
.dl-horizontal {
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow);
    line-height: 1.8;
}

    .car_detail p,
    .car_detail div {
        color: var(--text);
    }

    .dl-horizontal dt {
        white-space: normal;
        color: var(--navy);
    }

    .dl-horizontal dd {
        color: var(--muted);
        margin-bottom: 10px;
    }

/* Forms */

.form-horizontal,
.car-form {
    max-width: 720px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.control-label,
.car-form label {
    color: var(--navy);
    font-weight: 800;
}

input,
select,
textarea,
.form-control {
    max-width: 100%;
    color: var(--text);
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    box-shadow: none;
}

.form-control {
    height: 42px;
    padding: 9px 12px;
}

textarea.form-control {
    height: auto;
    min-height: 120px;
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
    outline: none;
}

.car-form div {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.car-form label {
    min-width: 120px;
    margin-right: 0;
}

.car-form input,
.car-form select {
    width: 100%;
    max-width: 320px;
}

/* Tables, if any Bootstrap tables appear */

.table {
    background: var(--card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

    .table > thead > tr > th {
        background: var(--navy);
        color: #ffffff;
        border-bottom: none;
    }

    .table > tbody > tr > td {
        border-top: 1px solid var(--border);
        color: var(--text);
    }

/* Validation and error pages */

.text-danger,
.field-validation-error,
.validation-summary-errors {
    color: var(--danger);
    font-weight: 700;
}

.validation-summary-errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 20px;
}

/* Mobile */

@media (max-width: 767px) {
    body {
        padding-top: 60px;
    }

    .body-content {
        padding: 18px 14px;
    }

    .jumbotron {
        padding: 42px 26px;
        border-radius: 18px;
    }

        .jumbotron p {
            font-size: 1.4rem;
        }

    .row .col-md-4 {
        padding: 22px;
    }

    .car-form div {
        display: block;
    }

    .car-form label {
        display: block;
        margin-bottom: 6px;
    }

    .car-form input,
    .car-form select {
        max-width: 100%;
    }
}

/* Car images */

.list_item {
    min-width: 0;
    overflow: hidden;
}

.car-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    background: #f1f5f9;
    box-sizing: border-box;
}

.car-image-placeholder {
    width: 100%;
    max-width: 100%;
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 12px;
    background: #e2e8f0;
    color: #64748b;
    font-weight: 700;
    box-sizing: border-box;
}

.car-detail-image {
    display: block;
    width: 100%;
    max-width: 500px;
    height: 320px;
    object-fit: cover;
    border-radius: 16px;
    margin: 20px 0;
    border: 1px solid var(--border);
    box-sizing: border-box;
}

.card-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--blue);
    color: #ffffff;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
    transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

    .card-action-link:hover,
    .card-action-link:focus {
        background: var(--blue-dark);
        color: #ffffff;
        text-decoration: none;
        transform: translateY(-1px);
        box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
    }