/* Base layout */
.wecl-rota-page {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 15px 40px;
    color: #333;
}

.wecl-rota-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.wecl-rota-title h1 {
    font-size: 24px;
    margin: 0;
}

.wecl-rota-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wecl-user-name {
    font-weight: 500;
}

/* Pills and buttons */
.wecl-role-pill,
.wecl-role-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.wecl-role-pill {
    background: #e2f2f2;
    color: #2b4b4b;
}

.wecl-btn-primary,
.wecl-btn-danger,
.wecl-btn-ghost {
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 7px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wecl-btn-primary {
    background: #006b6b;
    color: #fff;
}

.wecl-btn-primary:hover {
    background: #005050;
}

.wecl-btn-danger {
    background: #f5c6cb;
    color: #8a1c2b;
}

.wecl-btn-danger:hover {
    background: #f1a7b0;
}

.wecl-btn-ghost {
    background: transparent;
    border: 1px solid #c2e0e0;
    color: #2b4b4b;
}

.wecl-btn-ghost:hover {
    background: #e2f2f2;
}

/* Cards */
.wecl-rota-card,
.wecl-admin-card,
.wecl-rota-card-simple,
.wecl-rota-card-inline,
.wecl-login-card {
    background: #fbfaf8;
    border-radius: 12px;
    border: 1px solid #ece7de;
    padding: 18px 20px 22px;
    margin-bottom: 20px;
}

.wecl-login-card h2 {
    margin-top: 0;
}

.wecl-login-card form label {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
}

.wecl-login-card input[type="text"],
.wecl-login-card input[type="password"] {
    width: 100%;
    padding: 7px 9px;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin-top: 3px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.wecl-error {
    color: #b00020;
}

/* Admin panel */
.wecl-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid #eee2cf;
    padding-bottom: 8px;
}

.wecl-admin-title {
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #888;
}

.wecl-admin-tabs {
    display: flex;
    gap: 4px;
}

.wecl-admin-tab {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    text-decoration: none;
    color: #555;
    border: 1px solid transparent;
}

.wecl-admin-tab.is-active {
    border-color: #006b6b;
    color: #006b6b;
    background: #e2f2f2;
}

.wecl-admin-body {
    margin-top: 10px;
}

.wecl-admin-section h3 {
    margin-top: 0;
}

/* Tables */
.wecl-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    font-size: 14px;
}

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

.wecl-table th {
    font-weight: 600;
    font-size: 13px;
    color: #666;
}

/* Username pill */
.wecl-username-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f0f0f0;
    font-size: 12px;
}

/* Forms */
.wecl-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px 14px;
    margin-bottom: 16px;
}

.wecl-form-grid label {
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wecl-form-grid input,
.wecl-form-grid select {
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.wecl-form-actions {
    display: flex;
    align-items: flex-end;
}

.wecl-form-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
}

.wecl-form-inline label {
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wecl-form-inline input,
.wecl-form-inline select {
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}

/* Roles list */
.wecl-role-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.wecl-role-badge {
    font-size: 11px;
}

/* Inline forms */
.wecl-inline-form {
    display: inline;
}

/* Muted text */
.wecl-muted {
    font-size: 12px;
    color: #999;
}

/* Time slot chips */
.wecl-slot-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.wecl-slot-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    border: 1px solid #ddd0bc;
    background: #f8f4eb;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 13px;
    color: #444;
}

.wecl-slot-chip:hover {
    background: #f2e7d7;
}

.wecl-slot-main {
    font-weight: 500;
}

.wecl-slot-sub {
    font-size: 11px;
    color: #888;
}

.wecl-slot-remove {
    font-size: 14px;
    color: #b35b5b;
}

/* Add slot form */
.wecl-slot-add-form input[type="time"] {
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* Rota table */
.wecl-rota-header-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

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

.wecl-week-subtitle {
    font-size: 12px;
    color: #777;
}

.wecl-rota-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.wecl-rota-table th,
.wecl-rota-table td {
    border: 1px solid #eee2cf;
    min-width: 90px;
    height: 52px;
    text-align: center;
    vertical-align: middle;
}

.wecl-rota-table thead th {
    background: #f6f2ea;
    font-weight: 500;
}

.wecl-date-sub {
    font-size: 11px;
    color: #999;
}

.wecl-time-cell {
    background: #faf7f0;
    font-weight: 500;
}

/* Slots (empty for now; colours will be used when bookings are added) */
.wecl-slot {
    background: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .wecl-rota-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .wecl-rota-table table,
    .wecl-table {
        font-size: 12px;
    }
}