:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg: #ffffff;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --input-bg: #f8fafc;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

.logo h1 span {
    color: var(--primary);
}

.logo p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.stats-cards {
    display: flex;
    gap: 1rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    min-width: 140px;
    text-align: center;
    border: 1px solid var(--border);
}

.stat-card .label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.stat-card .value {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-card.booked .value {
    color: var(--success);
}

.stat-card.remaining .value {
    color: var(--warning);
}

/* Control Panel */
.control-panel {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.search-box {
    flex: 1;
}

.search-box input {
    width: 100%;
    padding: 0.6rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    outline: none;
}

.search-box input:focus {
    border-color: var(--primary);
    background: white;
}

.filters {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: white;
    border: none;
    border-right: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.filter-btn:last-child {
    border-right: none;
}

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

.refresh-btn {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    font-size: 0.85rem;
}

/* Bulk Actions */
.bulk-actions {
    background: #eff6ff;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 1px solid #bfdbfe;
    font-size: 0.85rem;
}

.bulk-btn {
    padding: 0.4rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

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

/* Table */
.table-container {
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border);
}

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

th,
td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: #f1f5f9;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

/* Custom Checkboxes */
input[type="checkbox"] {
    cursor: pointer;
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--primary);
    border-radius: 4px;
    vertical-align: middle;
}

.lead-cb,
#select-all {
    transition: transform 0.1s ease;
}

.lead-cb:active,
#select-all:active {
    transform: scale(0.9);
}

/* Inline Inputs */
.inline-input {
    width: 100%;
    padding: 0.4rem;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--text);
    transition: all 0.2s;
}

.inline-input:hover {
    border-color: var(--border);
    background: var(--input-bg);
}

.inline-input:focus {
    border-color: var(--primary);
    background: white;
    outline: none;
}

.status-select {
    padding: 0.3rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
}

.status-booked {
    color: var(--success);
    font-weight: 600;
    border-color: var(--success);
}

.status-pending {
    color: var(--warning);
    font-weight: 600;
    border-color: var(--warning);
}

/* Pagination */
.pagination {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 0.4rem;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 22px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #10b981;
}

input:checked+.slider:before {
    transform: translateX(22px);
}

.status-label {
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}

.label-booked {
    color: #10b981;
}

.label-pending {
    color: #64748b;
}

.page-btn {
    padding: 0.4rem 0.8rem;
    background: white;
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.85rem;
}

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

.wa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.8rem;
    background: #25d366;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
}

.wa-btn:hover {
    background: #1eb954;
}

.wa-icon {
    margin-right: 4px;
    font-size: 1rem;
}

.saving-indicator {
    font-size: 0.7rem;
    color: var(--success);
    margin-left: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.saving {
    opacity: 1;
}