*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #0b0c10;
    color: #f5f5f5;
}

body {
    display: flex;
    flex-direction: column;
}

.view {
    flex: 1;
}

.view--centered {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.view--hidden {
    display: none;
}

.card {
    background: #11131a;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.card--login {
    max-width: 420px;
    width: 100%;
}

.card--placeholder {
    text-align: center;
    font-size: 14px;
    color: #a0a4b3;
}

.card--detail {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card--small {
    max-width: 360px;
}

.card--hidden {
    display: none;
}

.logo-text {
    margin: 0 0 8px;
    font-size: 28px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.subtitle {
    margin: 0 0 16px;
    color: #a0a4b3;
    font-size: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    font-size: 14px;
}

.field span {
    margin-bottom: 4px;
    color: #d2d5e0;
}

.field input,
.field select,
.field textarea {
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #0b0c10;
    padding: 8px 10px;
    color: #f5f5f5;
    font-size: 14px;
    outline: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: #4caf50;
    box-shadow: 0 0 0 1px rgba(76, 175, 80, 0.4);
}

.field textarea {
    min-height: 60px;
    resize: vertical;
}

.field--inline {
    flex-direction: column;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 8px 16px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
    white-space: nowrap;
}

.btn--primary {
    background: #4caf50;
    color: #0b0c10;
}

.btn--primary:hover {
    background: #5cc963;
}

.btn--secondary {
    background: #1e293b;
    color: #e2e8f0;
}

.btn--secondary:hover {
    background: #273549;
}

.btn--ghost {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.6);
    color: #e2e8f0;
}

.btn--ghost:hover {
    background: rgba(148, 163, 184, 0.16);
}

.btn--danger {
    background: #f97373;
    color: #111827;
}

.btn--danger:hover {
    background: #fb8989;
}

.btn--small {
    padding: 6px 10px;
    font-size: 13px;
}

.btn:active {
    transform: translateY(1px);
}

.hint {
    margin: 4px 0 0;
    font-size: 12px;
    color: #9ca3af;
}

.error {
    color: #fecaca;
    font-size: 13px;
    margin-top: 8px;
}

/* TOPBAR */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    height: 120px; /* ← додано */
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    background: radial-gradient(circle at top left, #111827, #020617);
}

.topbar__left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar__logo {
    height: 100px;
    width: auto;
    object-fit: contain;
}

.topbar__sub {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #9ca3af;
}

.topbar__right {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.counter span {
    font-weight: 600;
}

/* LAYOUT */

.layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr);
    gap: 16px;
    padding: 14px 18px 18px;
    height: calc(100vh - 36px);
}

.layout__controls {
    grid-column: 1 / 2;
}

.layout__list {
    grid-column: 1 / 2;
    overflow: hidden;
}

.layout__detail {
    grid-column: 2 / 3;
    overflow: hidden;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}

.controls__filters {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.cards-list {
    height: calc(100% - 10px);
    overflow-y: auto;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* VEHICLE CARDS */

.car-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    background: #020617;
    border: 1px solid rgba(148, 163, 184, 0.35);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.05s ease;
}

.car-card:hover {
    border-color: #4caf50;
    background: #020617;
    transform: translateY(-1px);
}

.car-card__thumb {
    width: 120px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #020617;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #64748b;
    border: 1px solid rgba(15, 23, 42, 0.9);
}

.car-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.car-card__main {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.car-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.car-card__title {
    font-weight: 600;
    font-size: 20px;
}

.car-card__year {
    font-weight: 700;
    font-size: 25px;
}

.car-card__bottom {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    color: #94a3b8;
    margin-top: 4px;
}

.car-card__actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
}

.car-card__btn {
    font-size: 12px;
    padding: 4px 10px;
}

/* VEHICLE DETAIL */

.car-detail__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.car-detail__title {
    font-size: 18px;
    font-weight: 600;
}

.car-detail__subtitle {
    font-size: 13px;
    color: #94a3b8;
}

.car-detail__meta {
    font-size: 12px;
    color: #9ca3af;
    text-align: right;
}

.car-detail__body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.car-detail__column {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.detail-row span {
    color: #9ca3af;
}

.car-detail__description {
    margin-top: 10px;
    font-size: 13px;
    border-top: 1px dashed rgba(148, 163, 184, 0.5);
    padding-top: 8px;
}

.car-detail__description span {
    color: #9ca3af;
}

.car-detail__actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* MODALS */

.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal--hidden {
    display: none;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
}

.modal__content {
    position: relative;
    max-height: 90vh;
    overflow: hidden;
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.modal__close {
    border: none;
    background: transparent;
    font-size: 20px;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
}

.modal__body {
    max-height: 65vh;
    overflow-y: auto;
}

.modal__footer {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

/* PRINT AREA */

#print-area {
    display: none;
}

/* PRINT STYLES */
@media print {
    body {
        background: #fff;
    }

    #login-view,
    #app-view,
    .modal {
        display: none !important;
    }

    #print-area {
        display: block;
    }

    @page {
        size: 4in 6in;
        margin: 0;
    }

    .label-page {
        width: 4in;
        height: 6in;
        page-break-after: always;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 0;
    }

    .label {
        color: #000;
        width: 100%;
        height: 2.40in;
        padding: 0.18in 0.22in;
        box-sizing: border-box;
        font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        font-size: 9pt;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    .label + .label {
        
    }


    .label--rotated {
        transform: rotate(180deg);
        transform-origin: center;
    }


    .label + .label {
        color: #000;
        border-top: 1px dashed #000;
    }

    .label__header {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 1pt;
    }

    .label__brand {
        display: none;
    }

    .label__logo {
        width: 40%;
        height: auto;
    }

    .label__year {
        color: #000;
        text-align: center;
        font-weight: 500;
        margin: 4pt 0 3pt;
        font-size: 12pt;
    }

    .label__row {
        color: #000;
        font-size: 8pt;
        margin-bottom: 1pt;
    }

   .label__row--center {
    text-align: center;
    font-weight: 700;
    font-size: 8pt;       /* ← головне збільшення */
    letter-spacing: 0.4pt; /* ← робить текст чіткішим */
}

    .label__key {
        display: inline-block;
        min-width: 81pt;
        font-size: 11pt;
        font-weight: 780;
    }

    .label__val {
        display: inline-block;
        font-weight: 780;
        font-size: 11pt;
    }

    .label__row strong {
        font-weight: 600;
    }


    .label__vin {
        color: #000;
        margin-top: 0pt;
        font-size: 10.5pt;
        font-weight: 700;
        letter-spacing: 0.4pt;
    }

   .label__number {
        font-family: 'Inter', sans-serif;
        font-weight: 750;
        font-size: 17pt;
        letter-spacing: 0.18em;
        text-align: center;
        color: #000;
        margin-top: 2pt;
    }
}

    .label__separator {
        margin: 2pt 0 2pt;
        border-top: 1px solid #000;
    }
}

/* RESPONSIVE */

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        height: auto;
    }

    .layout__detail {
        grid-column: 1 / -1;
        margin-top: 10px;
    }

    .card--detail {
        min-height: 220px;
    }
}

@media (max-width: 600px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .controls__filters {
        width: 100%;
    }

    .car-card {
        grid-template-columns: 100px minmax(0, 1fr);
        grid-template-rows: auto auto;
    }

    .car-card__actions {
        flex-direction: row;
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}



/* === INTER FONT === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

/* === UPDATED LABEL TEXT (NO CHANGES TO SITE LAYOUT) === */

@media print {

    .label__row--center {
        text-align: center;
        font-family: 'Inter', sans-serif;
        font-weight: 700;
        font-size: 10.5pt;
        letter-spacing: 0.45pt;
        color: #000;
    }

    .label__number {
        font-family: 'Inter', sans-serif;
        font-weight: 750;
        font-size: 17pt;
        letter-spacing: 0.18em;
        text-align: center;
        color: #000;
        margin-top: 2pt;
    }
}



/* Added larger font for vehicle title and VIN */
.vehicle-title {
    font-size: 20px !important;
    font-weight: 700 !important;
}

.vehicle-vin {
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
}

/* Remove CANCEL button in Print Labels modal */
#labels-modal .btn--ghost {
    display: none !important;
}

