.card {
    background: var(--surface);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid var(--border);
    position: relative;
}

.card.is-clickable,
.prospect-company-contact.is-clickable {
    cursor: pointer;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--background);
}

.vehicle-photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.1rem 1.25rem;
    color: #374151;
    background: #e5e7eb;
}

.vehicle-photo-placeholder-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    max-width: 100%;
}

.vehicle-photo-placeholder-details span {
    max-width: 100%;
    overflow: hidden;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-body {
    padding: 1.25rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.card-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.card-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
    font-size: 0.875rem;
}

.card-info-item {
    display: grid;
    grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
    align-items: start;
    gap: 0.75rem;
}

.card-info-label {
    color: var(--text-secondary);
    min-width: 0;
}

.card-info-value {
    min-width: 0;
    font-weight: 500;
    color: var(--text);
    overflow-wrap: anywhere;
    text-align: right;
}

.vehicle-detail-availability {
    margin: 0 0 0.75rem;
}

.vehicle-detail-group {
    margin: 0 0 0.75rem;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: var(--background);
}

.vehicle-detail-group-title {
    margin: 0 0 0.65rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.vehicle-detail-group .card-info {
    margin: 0;
}

.vehicle-detail-multiline-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
}

.vehicle-detail-multiline-item .card-info-value {
    text-align: left;
}

.vehicle-detail-group-last {
    margin-bottom: 1.5rem;
}

.card-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 1rem 0;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.card.is-selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.cards-grid.reorder-active .card.is-clickable {
    cursor: grab;
}

.cards-grid.reorder-active {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

#vehicles-list.cards-grid.reorder-active .card > :not(.card-image) {
    display: none;
}

.cards-grid.reorder-active .card-image {
    height: 120px;
}

.cards-grid.reorder-active .card.is-dragging {
    opacity: 0.7;
    transform: scale(0.98);
}

body.pwa-standalone #vehicles-list.cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 0.75rem;
}

body.pwa-standalone #vehicles-list .card.pwa-compact-card .card-subtitle,
body.pwa-standalone #vehicles-list .card.pwa-compact-card .card-info,
body.pwa-standalone #vehicles-list .card.pwa-compact-card .vehicle-prospects-block,
body.pwa-standalone #vehicles-list .card.pwa-compact-card .card-actions {
    display: none;
}

body.pwa-standalone #vehicles-list .card.pwa-compact-card .card-image {
    height: 110px;
}

body.pwa-standalone #vehicles-list .card.pwa-compact-card .card-body {
    padding: 0.65rem 0.75rem;
}

body.pwa-standalone #vehicles-list .card.pwa-compact-card .card-title {
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.pwa-standalone #vehicles-list .card.pwa-compact-card .pwa-compact-status {
    margin-top: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.vehicle-detail-modal {
    position: relative;
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

body.pwa-standalone .vehicle-detail-modal {
    max-height: none;
    overflow: visible;
}

.vehicle-detail-nav-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 2.25rem;
    height: 3.5rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--text-secondary);
    font-size: 2rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.vehicle-detail-nav-arrow:disabled {
    opacity: 0.22;
}

.vehicle-detail-nav-prev {
    left: 0.55rem;
}

.vehicle-detail-nav-next {
    right: 0.55rem;
}

.vehicle-select-toggle {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: var(--shadow);
}

.vehicle-select-input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.multi-send-vehicles {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.multi-send-item {
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--background);
}

.multi-send-item[open] {
    background: var(--surface);
}

.multi-send-item summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.multi-send-item summary::-webkit-details-marker {
    display: none;
}

.multi-send-list {
    margin: 0.25rem 0 0;
    padding-left: 1.25rem;
    color: var(--text-secondary);
}

.multi-send-status {
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: var(--background);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    white-space: pre-line;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: #dcfce7;
    color: #15803d;
}

.badge-warning {
    background: #fef3c7;
    color: #b45309;
}

.badge-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-info {
    background: #dbeafe;
    color: #1d4ed8;
}

.vehicle-prospects-dropdown {
    margin-top: 0.75rem;
}

.vehicle-prospects-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: var(--background);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 700;
    list-style: none;
}

.vehicle-prospects-summary::-webkit-details-marker {
    display: none;
}

.vehicle-prospects-summary::after {
    content: "▾";
    color: var(--text-secondary);
    font-size: 0.8rem;
    transition: transform 0.18s ease;
}

.vehicle-prospects-dropdown details[open] .vehicle-prospects-summary::after {
    transform: rotate(180deg);
}

.vehicle-prospects-summary-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-left: auto;
}

.vehicle-prospects-count {
    min-width: 1.55rem;
    padding: 0.1rem 0.45rem;
    border-radius: 9999px;
    background: #0ea5e9;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    text-align: center;
}

.vehicle-prospects-alert-dot {
    display: inline-block;
    width: 0.68rem;
    height: 0.68rem;
    border-radius: 9999px;
    vertical-align: middle;
    box-shadow: 0 0 0 2px #fff;
}

.vehicle-prospects-alert-dot.is-orange {
    background: #f59e0b;
}

.vehicle-prospects-alert-dot.is-red {
    background: #ef4444;
}

.vehicle-prospects-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.65rem;
}

.vehicle-prospects-empty {
    margin-top: 0.55rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.status-inline-select {
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.1;
    text-transform: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 0.3rem 1.5rem 0.3rem 0.75rem;
    border-radius: 9999px;
    background-repeat: no-repeat;
    background-position: right 0.55rem center;
    background-size: 0.6rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='%23334155' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
}

.status-inline-select:focus {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 1px;
}

.status-inline-select:disabled {
    cursor: default;
    padding-right: 0.75rem;
    background-image: none;
}

.vehicle-action-select {
    min-height: 34px;
    padding: 6px 28px 6px 10px;
    border: none;
    border-radius: 0.5rem;
    background-color: #0ea5e9;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    transition: all 0.2s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='white' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
}

.vehicle-action-select:hover {
    background-color: #0284c7;
}

.btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-icon {
    width: 1.125rem;
    height: 1.125rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

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

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-info {
    background: #0ea5e9;
    color: white;
}

.btn-info:hover {
    background: #0284c7;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

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

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background: var(--background);
}
