/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f0f0f0;
    color: #1a1a1a;
    line-height: 1.5;
    font-size: 15px;
}

a { color: #1a1a1a; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Layout ===== */
.site-header {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 64px;
    border-bottom: 3px solid #d4a843;
}

.site-header--admin {
    border-bottom-color: #1a1a1a;
}

.site-header__logo {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.site-header__logo small {
    display: block;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 2px;
    color: #888;
}

.site-header__nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-header__nav-link {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1a1a1a;
}

.site-header__nav-link:hover {
    text-decoration: none;
    color: #d4a843;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown__trigger {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
}

.dropdown__trigger:hover {
    background: #f5f5f5;
}

.dropdown__menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    min-width: 180px;
    padding: 8px 0;
    z-index: 100;
}

.dropdown__menu a,
.dropdown__menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 16px;
    font-size: 14px;
    color: #1a1a1a;
    background: none;
    border: none;
    cursor: pointer;
}

.dropdown__menu a:hover,
.dropdown__menu button:hover {
    background: #f5f5f5;
    text-decoration: none;
}

/* Main content */
.main-content {
    max-width: 1200px;
    margin: 32px auto;
    padding: 0 24px;
}

/* ===== Cards ===== */
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    padding: 32px;
}

.card--form {
    max-width: 900px;
    margin: 0 auto;
}

/* ===== Page header ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.back-link {
    display: inline-block;
    margin-bottom: 16px;
    font-size: 14px;
    color: #666;
}

.back-link:hover {
    color: #1a1a1a;
}

/* ===== Status badges ===== */
.badge {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.badge--pending {
    background: #fef3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.badge--quote_sent {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.badge--quote_accepted {
    background: #d4edda;
    color: #155724;
    border: 1px solid #28a745;
}

.badge--quote_declined {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #dc3545;
}

.badge--confirmed {
    background: #d4edda;
    color: #155724;
    border: 1px solid #28a745;
}

.badge--declined {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #dc3545;
}

/* ===== Tables ===== */
.table-wrapper {
    overflow-x: auto;
}

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

thead th {
    text-align: left;
    font-size: 12px;
    font-weight: 500;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}

tbody td {
    padding: 16px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
}

tbody tr:hover {
    background: #fafafa;
}

.clickable-row {
    cursor: pointer;
}

tbody td a {
    font-weight: 500;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s ease;
    text-decoration: none;
}

.btn:hover { text-decoration: none; }

.btn--primary {
    background: #2d6a4f;
    color: #fff;
    border-color: #2d6a4f;
}

.btn--primary:hover {
    background: #1b4332;
    border-color: #1b4332;
}

.btn--dark {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.btn--dark:hover {
    background: #333;
    border-color: #333;
}

.btn--outline {
    background: transparent;
    color: #1a1a1a;
    border-color: #ccc;
}

.btn--outline:hover {
    border-color: #1a1a1a;
}

.btn--danger {
    background: transparent;
    color: #dc3545;
    border-color: #dc3545;
}

.btn--danger:hover {
    background: #dc3545;
    color: #fff;
}

.btn--sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

/* ===== Forms ===== */
.form-section {
    margin-bottom: 32px;
}

.form-section__title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 8px;
    border-bottom: 2px solid #1a1a1a;
    margin-bottom: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

@media (max-width: 768px) {
    .form-grid { grid-template-columns: 1fr; }
}

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

.form-group label {
    display: block;
    font-size: 13px;
    color: #888;
    margin-bottom: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fafafa;
    transition: border-color 0.15s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #d4a843;
    background: #fff;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row > * {
    flex: 1;
}

.form-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid #eee;
    margin-top: 32px;
}

.errorlist {
    list-style: none;
    color: #dc3545;
    font-size: 13px;
    margin-top: 4px;
}

/* ===== Search / Filters ===== */
.filters {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filters .form-group {
    margin-bottom: 0;
    min-width: 180px;
}

.filters .btn {
    align-self: flex-end;
}

/* ===== Detail view ===== */
.detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
}

.detail-header h1 {
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
}

.detail-header .booking-number {
    font-size: 14px;
    color: #888;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

@media (max-width: 768px) {
    .detail-grid { grid-template-columns: 1fr; }
}

.detail-section {
    margin-bottom: 28px;
}

.detail-section__title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 8px;
    border-bottom: 2px solid #1a1a1a;
    margin-bottom: 16px;
}

.detail-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.detail-row__label {
    width: 160px;
    flex-shrink: 0;
    color: #888;
    font-size: 13px;
}

.detail-row__value {
    font-weight: 500;
}

/* ===== Timeline ===== */
.timeline {
    list-style: none;
}

.timeline__item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.timeline__event {
    font-weight: 600;
}

.timeline__date {
    color: #888;
    font-size: 13px;
}

.timeline__user {
    color: #888;
    font-size: 13px;
}

.timeline__note {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
}

/* ===== Trip card ===== */
.trip-card {
    background: #fafafa;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.trip-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* ===== Alerts ===== */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.alert--warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.alert--danger {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert--info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 14px;
    color: #1a1a1a;
}

.pagination a:hover {
    background: #f0f0f0;
    text-decoration: none;
}

.pagination .current {
    background: #1a1a1a;
    color: #fff;
    font-weight: 600;
}

/* ===== Partners list ===== */
.partner-status--active { color: #28a745; }
.partner-status--inactive { color: #dc3545; }

/* ===== Login ===== */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #f0f0f0;
}

.login-card {
    background: #fff;
    padding: 48px 40px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 400px;
}

.login-card h1 {
    text-align: center;
    margin-bottom: 32px;
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-card .logo {
    text-align: center;
    margin-bottom: 24px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* ===== Admin actions in booking detail ===== */
.admin-actions {
    border-top: 1px solid #eee;
    margin-top: 32px;
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
}

.admin-actions__left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.admin-actions__right {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 280px;
}

.admin-actions__right .form-group {
    margin-bottom: 0;
}

.admin-actions__right .form-group textarea {
    min-height: 60px;
}

.admin-actions__right .btn--danger {
    align-self: flex-start;
}

.admin-actions__row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    width: 100%;
}

@media (max-width: 768px) {
    .admin-actions {
        flex-direction: column;
        gap: 24px;
    }
}

/* ===== Utility ===== */
.text-muted { color: #888; }
.text-sm { font-size: 13px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }
