* {
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

:root {
    --primary: #2563eb;
    --primary-soft: #e0edff;
    --primary-dark: #1d4ed8;
    --bg: #f3f6fb;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-subtle: #e5e7eb;
    --card-bg: #ffffff;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: inherit;
}

header {
    background: linear-gradient(90deg, #0f172a, #020617);
    color: #f9fafb;
    border-bottom: 1px solid rgba(148, 163, 184, 0.4);
    padding: 14px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
}

header .logo a {
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 0.04em;
    color: #e5e7eb;
}

header nav a {
    margin-left: 14px;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    color: #e5e7eb;
    opacity: 0.85;
}

header nav a:hover {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(148, 163, 184, 0.5);
    opacity: 1;
}

header nav a.primary {
    background: #f97316;
    color: #111827;
    font-weight: 600;
    border-color: transparent;
}

.container {
    max-width: 1200px;
    margin: 24px auto 32px auto;
    padding: 0 18px;
}

.hero {
    margin-top: 12px;
    margin-bottom: 26px;
    padding: 20px 22px;
    border-radius: 24px;
    background: radial-gradient(circle at top left, #2563eb 0, #0f172a 25%, #020617 100%);
    color: #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.5);
}

.hero h1 {
    font-size: 30px;
    margin: 0;
}

.hero p {
    color: #cbd5f5;
    font-size: 14px;
    max-width: 520px;
}

.hero .chips {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.7);
    color: #e5e7eb;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(15,23,42,0.10);
    display: flex;
    flex-direction: column;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 40px rgba(15,23,42,0.18);
    border-color: rgba(37,99,235,0.55);
}

.card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    background: #1f2937;
}

.card-body {
    padding: 12px 14px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card-title {
    font-weight: 600;
    font-size: 16px;
}

.card-sub {
    font-size: 13px;
    color: var(--text-muted);
}

.card-price {
    font-weight: 600;
    font-size: 15px;
    margin-top: 4px;
    color: #111827;
}

.badge {
    display: inline-block;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 500;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    align-items: center;
    background: #ffffff;
    padding: 10px 12px;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(15,23,42,0.08);
    border: 1px solid rgba(148,163,184,0.25);
}

.filter-bar input, .filter-bar select {
    padding: 8px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    font-size: 13px;
    background: #f9fafb;
}

.filter-bar button {
    padding: 8px 16px;
    border-radius: 999px;
    border: none;
    background: var(--primary);
    color: #ffffff;
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
}

.filter-bar button:hover {
    background: var(--primary-dark);
}

form.auth, form.standard {
    max-width: 460px;
    margin: 40px auto;
    background: var(--card-bg);
    padding: 26px 26px 24px 26px;
    border-radius: 22px;
    box-shadow: 0 16px 36px rgba(15,23,42,0.14);
    border: 1px solid rgba(148,163,184,0.35);
}

form.auth h2, form.standard h2 {
    margin-top: 0;
    margin-bottom: 10px;
}

form.auth p.sub {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 0;
    margin-bottom: 16px;
}

form.auth label, form.standard label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
    margin-top: 12px;
    font-weight: 500;
}

form.auth input[type="text"],
form.auth input[type="email"],
form.auth input[type="password"],
form.standard input[type="text"],
form.standard input[type="number"],
form.standard input[type="date"],
form.standard textarea,
form.standard select {
    width: 100%;
    padding: 9px 11px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    font-size: 14px;
    background: #f9fafb;
}

form.auth input:focus,
form.standard input:focus,
form.standard textarea:focus,
form.standard select:focus {
    outline: 2px solid rgba(37,99,235,0.35);
    border-color: var(--primary);
    background: #ffffff;
}

form.auth button,
form.standard button {
    margin-top: 18px;
    width: 100%;
    padding: 11px 14px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(37,99,235,0.35);
}

form.auth button:hover,
form.standard button:hover {
    filter: brightness(1.05);
}

.btn-secondary {
    width: auto;
    margin-top: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.8);
    background: #f9fafb;
    color: #111827;
    font-size: 12px;
    cursor: pointer;
}

.alert {
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 10px;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
}

.alert.success {
    background: #dcfce7;
    color: #166534;
}

.flex {
    display: flex;
}

.gap-16 {
    gap: 16px;
}

.device-main {
    display: grid;
    grid-template-columns: minmax(0,2fr) minmax(0,1.2fr);
    gap: 24px;
}

.device-main img {
    width: 100%;
    border-radius: 18px;
    max-height: 380px;
    object-fit: cover;
    box-shadow: 0 16px 32px rgba(15,23,42,0.25);
}

.device-info h1 {
    margin-top: 0;
    margin-bottom: 8px;
}

.device-info .meta {
    color: var(--text-muted);
    font-size: 14px;
}

.box {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 14px 30px rgba(15,23,42,0.12);
    border: 1px solid rgba(148,163,184,0.35);
}

.box h3 {
    margin-top: 0;
}

.calendar-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 22px rgba(15,23,42,0.10);
}

table th, table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 8px 8px;
    text-align: left;
}

table th {
    background: #f9fafb;
    font-weight: 600;
    font-size: 12px;
    color: #4b5563;
}

.tag {
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    background: #f3f4ff;
    color: #4338ca;
    font-weight: 500;
}

footer {
    margin-top: 20px;
    padding: 18px 16px 24px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

/* Map containers */
.map-container {
    margin-top: 12px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(148,163,184,0.5);
    box-shadow: 0 10px 24px rgba(15,23,42,0.18);
}

#mapCreate, #mapView {
    width: 100%;
    height: 260px;
}

/* Booking panel enhancements */
.booking-panel h3 {
    margin-top: 0;
}

.booking-panel label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    display: block;
    margin-bottom: 2px;
}

.booking-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    margin-bottom: 8px;
}

.booking-row input[type="date"] {
    flex: 1;
}

.booking-row button {
    width: auto;
    margin-top: 0;
}

.btn-primary-solid {
    padding: 9px 18px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #f9fafb;
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 12px 26px rgba(22,163,74,0.35);
}

.btn-primary-solid:hover {
    filter: brightness(1.03);
}
