/* =============================================================================
   Tennis Court Reservation Platform - BEM Styles
   Based on Shopify Polaris Design System
   https://polaris-react.shopify.com/design
   ============================================================================= */

@import 'polaris.css';

/* ==========================================================================
   BASE / RESET
   ========================================================================== */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--p-font-family);
    font-size: var(--p-text-size-100);
    font-weight: var(--p-font-weight-regular);
    line-height: var(--p-line-height-500);
    color: var(--p-color-text);
    background-color: var(--p-color-bg);
    min-height: 100vh;
}

a {
    color: var(--p-color-text-link);
    text-decoration: none;
}

a:hover {
    color: var(--p-color-text-link-hover);
}

img {
    max-width: 100%;
    display: block;
}

ul,
ol {
    list-style: none;
}

::selection {
    background-color: var(--p-color-border-focus);
    color: var(--p-color-text);
}

/* ==========================================================================
   PAGE LAYOUT
   https://polaris-react.shopify.com/components/layout-and-structure/layout
   ========================================================================== */

.page {
    max-width: var(--p-page-max-width);
    margin: 0 auto;
    padding: var(--p-space-6) var(--p-page-padding);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page__header {
    margin-bottom: var(--p-space-6);
}

.page__content {
    flex: 1;
}

.page__content--centered {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* ==========================================================================
   TOPBAR / NAVBAR
   ========================================================================== */

.topbar {
    background-color: var(--p-color-bg-fill-brand);
    padding: 0 var(--p-page-padding);
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: var(--p-z-index-10);
}

.topbar__left {
    display: flex;
    align-items: center;
    gap: var(--p-space-4);
}

.topbar__logo {
    display: flex;
    align-items: center;
    gap: var(--p-space-2);
    text-decoration: none;
}

.topbar__logo-img {
    height: 32px;
    width: auto;
}

.topbar__logo-text {
    color: #ffffff;
    font-size: var(--p-text-size-175);
    font-weight: var(--p-font-weight-bold);
}

.topbar__nav {
    display: flex;
    align-items: center;
    gap: var(--p-space-1);
}

.topbar__nav-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--p-text-size-100);
    font-weight: var(--p-font-weight-medium);
    padding: var(--p-space-1) var(--p-space-3);
    border-radius: var(--p-border-radius-1);
    transition: color var(--p-motion-duration-100) var(--p-motion-ease);
}

.topbar__nav-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

.topbar__nav-link--active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.15);
}

.topbar__right {
    display: flex;
    align-items: center;
    gap: var(--p-space-3);
}

.topbar__user {
    display: flex;
    align-items: center;
    gap: var(--p-space-2);
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--p-text-size-100);
}

.topbar__user-name {
    color: #ffffff;
    font-weight: var(--p-font-weight-medium);
}

/* ==========================================================================
   LAYOUT COMPONENTS
   https://polaris-react.shopify.com/components/layout-and-structure
   ========================================================================== */

.layout {
    display: grid;
    gap: var(--p-space-5);
}

.layout--1-col {
    grid-template-columns: 1fr;
}

.layout--2-col {
    grid-template-columns: 1fr 1fr;
}

.layout--sidebar {
    grid-template-columns: 240px 1fr;
    gap: var(--p-space-6);
}

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

.layout--cards {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--p-space-5);
}

.layout--3-col {
    grid-template-columns: repeat(3, 1fr);
}

.layout--4-col {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .layout--3-col,
    .layout--4-col {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .layout--2-col,
    .layout--3-col,
    .layout--4-col {
        grid-template-columns: 1fr;
    }
}

.layout__section {
    display: flex;
    flex-direction: column;
    gap: var(--p-space-3);
}

.layout__section-title {
    font-size: var(--p-text-size-100);
    font-weight: var(--p-font-weight-semibold);
    color: var(--p-color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--p-space-2) 0;
    border-bottom: 1px solid var(--p-color-border);
}

/* ==========================================================================
   CARD
   https://polaris-react.shopify.com/components/layout-and-structure/card
   ========================================================================== */

.card {
    background-color: var(--p-color-bg-surface);
    border-radius: var(--p-border-radius-2);
    box-shadow: var(--p-shadow-sm);
    overflow: hidden;
}

.card--outlined {
    box-shadow: none;
    border: 1px solid var(--p-color-border);
}

.card--subtle {
    background-color: var(--p-color-bg-surface-secondary);
}

.card__header {
    padding: var(--p-space-4) var(--p-space-4) 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--p-space-3);
}

.card__title {
    font-size: var(--p-text-size-100);
    font-weight: var(--p-font-weight-semibold);
    color: var(--p-color-text);
}

.card__subtitle {
    font-size: var(--p-text-size-075);
    color: var(--p-color-text-secondary);
    margin-top: var(--p-space-05);
}

.card__body {
    padding: var(--p-space-4);
}

.card__body--flush {
    padding: 0;
}

.card__body--tight {
    padding: var(--p-space-3);
}

.card__footer {
    padding: 0 var(--p-space-4) var(--p-space-4);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--p-space-2);
}

.card__section {
    padding: var(--p-space-3) var(--p-space-4);
    border-top: 1px solid var(--p-color-border);
}

.card__section--first {
    border-top: none;
    padding-top: 0;
}

/* ==========================================================================
   BUTTONS
   https://polaris-react.shopify.com/components/actions/button
   ========================================================================== */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--p-space-1);
    height: var(--p-height);
    padding: 0 var(--p-space-3);
    border: none;
    border-radius: var(--p-border-radius-1);
    font-family: var(--p-font-family);
    font-size: var(--p-text-size-100);
    font-weight: var(--p-font-weight-medium);
    line-height: 1;
    cursor: pointer;
    transition: background-color var(--p-motion-duration-100) var(--p-motion-ease),
        color var(--p-motion-duration-100) var(--p-motion-ease),
        box-shadow var(--p-motion-duration-100) var(--p-motion-ease),
        border-color var(--p-motion-duration-100) var(--p-motion-ease);
    text-decoration: none;
    white-space: nowrap;
    -webkit-appearance: none;
}

.button:focus-visible {
    outline: 2px solid var(--p-color-border-focus);
    outline-offset: 2px;
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.button__icon {
    width: var(--p-icon-size-sm);
    height: var(--p-icon-size-sm);
    flex-shrink: 0;
}

/* Primary */
.button--primary {
    background-color: var(--p-color-bg-fill-brand);
    color: var(--p-color-text-brand-on-bg-fill);
}

.button--primary:hover:not(:disabled) {
    background-color: var(--p-color-bg-fill-brand-hover);
}

.button--primary:active:not(:disabled) {
    background-color: var(--p-color-bg-fill-brand-active);
}

/* Secondary */
.button--secondary {
    background-color: var(--p-color-bg-fill);
    color: var(--p-color-text);
    box-shadow: var(--p-shadow-sm);
}

.button--secondary:hover:not(:disabled) {
    background-color: var(--p-color-bg-fill-hover);
}

.button--secondary:active:not(:disabled) {
    background-color: var(--p-color-bg-fill-active);
}

/* Tertiary / Plain */
.button--tertiary {
    background-color: transparent;
    color: var(--p-color-text);
    box-shadow: none;
}

.button--tertiary:hover:not(:disabled) {
    background-color: var(--p-color-bg-fill-transparent-hover);
}

.button--tertiary:active:not(:disabled) {
    background-color: var(--p-color-bg-fill-transparent-active);
}

/* Destructive */
.button--destructive {
    background-color: var(--p-color-bg-fill-critical);
    color: var(--p-color-text-critical-on-bg-fill);
}

.button--destructive:hover:not(:disabled) {
    background-color: var(--p-color-bg-fill-critical-hover);
}

/* Success */
.button--success {
    background-color: var(--p-color-bg-fill-success);
    color: var(--p-color-text-success-on-bg-fill);
}

/* Outline (brand border) */
.button--outline {
    background-color: transparent;
    color: var(--p-color-text);
    box-shadow: var(--p-shadow-sm);
    border: 1px solid var(--p-color-border);
}

.button--outline:hover:not(:disabled) {
    background-color: var(--p-color-bg-fill-hover);
}

/* Sizes */
.button--size-slim {
    height: 28px;
    padding: 0 var(--p-space-2);
    font-size: var(--p-text-size-075);
}

.button--size-large {
    height: 44px;
    padding: 0 var(--p-space-4);
    font-size: var(--p-text-size-100);
}

/* Full width */
.button--full {
    width: 100%;
}

/* ==========================================================================
   FORM FIELDS
   https://polaris-react.shopify.com/components/selection-and-input/text-field
   ========================================================================== */

.field {
    display: flex;
    flex-direction: column;
    gap: var(--p-space-1);
}

.field__label {
    font-size: var(--p-text-size-100);
    font-weight: var(--p-font-weight-medium);
    color: var(--p-color-text);
}

.field__label--disabled {
    color: var(--p-color-text-disabled);
}

.field__label--required::after {
    content: ' *';
    color: var(--p-color-text-critical);
}

.field__input {
    width: 100%;
    height: var(--p-height-field);
    padding: 0 var(--p-space-3);
    background-color: var(--p-color-bg-fill);
    border: 1px solid var(--p-color-border);
    border-radius: var(--p-border-radius-1);
    font-family: var(--p-font-family);
    font-size: var(--p-text-size-100);
    color: var(--p-color-text);
    transition: border-color var(--p-motion-duration-100) var(--p-motion-ease),
        box-shadow var(--p-motion-duration-100) var(--p-motion-ease);
    -webkit-appearance: none;
}

.field__input:hover {
    border-color: var(--p-color-border-hover);
}

.field__input:focus {
    outline: none;
    border-color: var(--p-color-bg-fill-brand);
    box-shadow: 0 0 0 1px var(--p-color-bg-fill-brand);
}

.field__input:disabled {
    background-color: var(--p-color-bg-fill-disabled);
    color: var(--p-color-text-disabled);
    cursor: not-allowed;
}

.field__input--error {
    border-color: var(--p-color-bg-fill-critical);
}

.field__input--error:focus {
    box-shadow: 0 0 0 1px var(--p-color-bg-fill-critical);
}

.field__help {
    font-size: var(--p-text-size-075);
    color: var(--p-color-text-secondary);
}

.field__error {
    font-size: var(--p-text-size-075);
    color: var(--p-color-text-critical);
    display: flex;
    align-items: center;
    gap: var(--p-space-1);
}

.field__error-icon {
    width: var(--p-icon-size-sm);
    height: var(--p-icon-size-sm);
    flex-shrink: 0;
}

/* Textarea */
.field__textarea {
    min-height: 100px;
    padding: var(--p-space-2) var(--p-space-3);
    resize: vertical;
}

/* Select */
.field__select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23303030'%3E%3Cpath d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--p-space-2) center;
    background-size: var(--p-icon-size-sm);
    padding-right: var(--p-space-8);
    cursor: pointer;
}

/* ==========================================================================
   RADIO BUTTONS & CHECKBOXES
   https://polaris-react.shopify.com/components/selection-and-input/checkbox
   ========================================================================== */

.choice {
    display: flex;
    align-items: center;
    gap: var(--p-space-2);
    cursor: pointer;
}

.choice__input {
    appearance: none;
    width: var(--p-choice-size);
    height: var(--p-choice-size);
    background-color: var(--p-color-bg-fill);
    border: 1px solid var(--p-color-border);
    border-radius: var(--p-border-radius-1);
    cursor: pointer;
    transition: background-color var(--p-motion-duration-100) var(--p-motion-ease),
        border-color var(--p-motion-duration-100) var(--p-motion-ease);
    flex-shrink: 0;
    position: relative;
}

.choice__input:hover {
    border-color: var(--p-color-border-hover);
}

.choice__input:checked {
    background-color: var(--p-color-bg-fill-brand);
    border-color: var(--p-color-bg-fill-brand);
}

.choice__input:focus-visible {
    outline: 2px solid var(--p-color-border-focus);
    outline-offset: 2px;
}

.choice__input--error {
    border-color: var(--p-color-bg-fill-critical);
}

.choice__control {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.choice__control-icon {
    display: none;
    width: 14px;
    height: 14px;
    color: var(--p-color-text-brand-on-bg-fill);
}

.choice__input:checked .choice__control-icon {
    display: block;
}

.choice__label {
    font-size: var(--p-text-size-100);
    color: var(--p-color-text);
    user-select: none;
}

.choice__input:checked + .choice__label {
    font-weight: var(--p-font-weight-medium);
}

/* ==========================================================================
   BADGES / TAGS
   https://polaris-react.shopify.com/components/feedback-indicators/badge
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--p-space-05);
    padding: 2px var(--p-space-2);
    border-radius: 20px;
    font-size: var(--p-text-size-075);
    font-weight: var(--p-font-weight-medium);
    line-height: 1;
    white-space: nowrap;
}

.badge--tennis {
    background-color: var(--p-color-court-tennis-bg);
    color: var(--p-color-court-tennis);
}

.badge--paddle {
    background-color: var(--p-color-court-paddle-bg);
    color: var(--p-color-court-paddle);
}

.badge--pickleball {
    background-color: var(--p-color-court-pickleball-bg);
    color: var(--p-color-court-pickleball);
}

.badge--success {
    background-color: var(--p-color-bg-surface-success);
    color: var(--p-color-text-success);
}

.badge--warning {
    background-color: var(--p-color-bg-surface-warning);
    color: var(--p-color-text-warning);
}

.badge--critical {
    background-color: var(--p-color-bg-surface-critical);
    color: var(--p-color-text-critical);
}

.badge--info {
    background-color: var(--p-color-bg-surface-info);
    color: var(--p-color-text-info);
}

.badge--neutral {
    background-color: var(--p-color-bg-surface-secondary);
    color: var(--p-color-text-secondary);
}

.badge--subtle {
    background-color: var(--p-color-bg-fill-transparent);
    color: var(--p-color-text-secondary);
}

.badge--large {
    padding: var(--p-space-1) var(--p-space-3);
    font-size: var(--p-text-size-100);
}

/* ==========================================================================
   TABLES
   https://polaris-react.shopify.com/components/tables/data-table
   ========================================================================== */

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

.table__header-cell {
    padding: var(--p-table-cell-padding);
    background-color: var(--p-color-bg-surface-secondary);
    text-align: left;
    font-size: var(--p-text-size-100);
    font-weight: var(--p-font-weight-semibold);
    color: var(--p-color-text-secondary);
    border-bottom: 1px solid var(--p-color-border);
    white-space: nowrap;
}

.table__cell {
    padding: var(--p-table-cell-padding);
    border-bottom: 1px solid var(--p-color-border);
    font-size: var(--p-text-size-100);
    color: var(--p-color-text);
    vertical-align: middle;
}

.table__cell--numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.table__row {
    transition: background-color var(--p-motion-duration-50) var(--p-motion-ease);
}

.table__row:hover {
    background-color: var(--p-color-bg-surface-hover);
}

.table__row--clickable {
    cursor: pointer;
}

.table__row--last .table__cell {
    border-bottom: none;
}

.table__empty-state {
    padding: var(--p-space-10) var(--p-space-4);
    text-align: center;
    color: var(--p-color-text-secondary);
}

.table__actions {
    display: flex;
    align-items: center;
    gap: var(--p-space-1);
    justify-content: flex-end;
}

/* ==========================================================================
   EMPTY STATE
   https://polaris-react.shopify.com/components/layout-and-structure/empty-state
   ========================================================================== */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--p-space-12) var(--p-space-4);
    text-align: center;
}

.empty-state__image {
    margin-bottom: var(--p-space-4);
    color: var(--p-color-text-secondary);
}

.empty-state__heading {
    font-size: var(--p-text-size-175);
    font-weight: var(--p-font-weight-semibold);
    color: var(--p-color-text);
    margin-bottom: var(--p-space-1);
}

.empty-state__description {
    font-size: var(--p-text-size-100);
    color: var(--p-color-text-secondary);
    max-width: 400px;
    margin-bottom: var(--p-space-4);
}

.empty-state__actions {
    display: flex;
    flex-direction: column;
    gap: var(--p-space-2);
    align-items: center;
}

/* ==========================================================================
   BANNER
   https://polaris-react.shopify.com/components/feedback-indicators/banner
   ========================================================================== */

.banner {
    display: flex;
    gap: var(--p-space-3);
    padding: var(--p-space-3) var(--p-space-4);
    border-radius: var(--p-border-radius-2);
    border: 1px solid;
}

.banner__icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.banner__content {
    flex: 1;
}

.banner__title {
    font-size: var(--p-text-size-100);
    font-weight: var(--p-font-weight-semibold);
    margin-bottom: var(--p-space-05);
}

.banner__content--text {
    font-size: var(--p-text-size-100);
}

.banner__actions {
    display: flex;
    gap: var(--p-space-3);
    margin-top: var(--p-space-2);
}

.banner--success {
    background-color: var(--p-color-bg-surface-success);
    border-color: var(--p-color-border-success);
}

.banner--success .banner__icon {
    color: var(--p-color-bg-fill-success);
}

.banner--warning {
    background-color: var(--p-color-bg-surface-warning);
    border-color: var(--p-color-bg-fill-warning);
}

.banner--warning .banner__icon {
    color: var(--p-color-bg-fill-warning);
}

.banner--critical {
    background-color: var(--p-color-bg-surface-critical);
    border-color: var(--p-color-border-critical);
}

.banner--critical .banner__icon {
    color: var(--p-color-bg-fill-critical);
}

.banner--info {
    background-color: var(--p-color-bg-surface-info);
    border-color: var(--p-color-border-info);
}

.banner--info .banner__icon {
    color: var(--p-color-bg-fill-info);
}

/* ==========================================================================
   CALLOUT CARD
   https://polaris-react.shopify.com/components/layout-and-structure/callout-card
   ========================================================================== */

.callout {
    display: flex;
    gap: var(--p-space-4);
    padding: var(--p-space-4);
    background-color: var(--p-color-bg-surface-secondary);
    border-radius: var(--p-border-radius-2);
    border: 1px solid var(--p-color-border);
}

.callout__image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: var(--p-border-radius-1);
    object-fit: cover;
}

.callout__content {
    flex: 1;
}

.callout__title {
    font-size: var(--p-text-size-100);
    font-weight: var(--p-font-weight-semibold);
    color: var(--p-color-text);
    margin-bottom: var(--p-space-1);
}

.callout__description {
    font-size: var(--p-text-size-100);
    color: var(--p-color-text-secondary);
}

/* ==========================================================================
   BOX
   ========================================================================== */

.box {
    padding: var(--p-space-4);
    background-color: var(--p-color-bg-surface);
    border-radius: var(--p-border-radius-2);
    border: 1px solid var(--p-color-border);
}

.box--flush {
    padding: 0;
}

.box--subtle {
    background-color: var(--p-color-bg-surface-secondary);
}

/* ==========================================================================
   DIVIDER
   ========================================================================== */

.divider {
    border: none;
    border-top: 1px solid var(--p-color-border);
    margin: var(--p-space-4) 0;
}

.divider--subtle {
    border-top-color: var(--p-color-border-secondary);
}

/* ==========================================================================
   INLINE STACK
   ========================================================================== */

.inline-stack {
    display: flex;
    align-items: center;
    gap: var(--p-space-2);
}

.inline-stack--tight {
    gap: var(--p-space-1);
}

.inline-stack--loose {
    gap: var(--p-space-4);
}

.inline-stack--wrap {
    flex-wrap: wrap;
}

.inline-stack--start {
    justify-content: flex-start;
}

.inline-stack--end {
    justify-content: flex-end;
}

.inline-stack--center {
    justify-content: center;
}

.inline-stack--between {
    justify-content: space-between;
}

/* ==========================================================================
   BLOCK STACK
   ========================================================================== */

.block-stack {
    display: flex;
    flex-direction: column;
    gap: var(--p-space-2);
}

.block-stack--tight {
    gap: var(--p-space-1);
}

.block-stack--loose {
    gap: var(--p-space-4);
}

/* ==========================================================================
   TABS
   https://polaris-react.shopify.com/components/navigation/tabs
   ========================================================================== */

.tabs {
    display: flex;
    gap: var(--p-space-1);
    border-bottom: 1px solid var(--p-color-border);
}

.tab {
    padding: var(--p-space-2) var(--p-space-3);
    font-size: var(--p-text-size-100);
    font-weight: var(--p-font-weight-medium);
    color: var(--p-color-text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    transition: color var(--p-motion-duration-100) var(--p-motion-ease),
        border-color var(--p-motion-duration-100) var(--p-motion-ease);
    text-decoration: none;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.tab:hover {
    color: var(--p-color-text);
}

.tab--active {
    color: var(--p-color-text);
    border-bottom-color: var(--p-color-bg-fill-brand);
}

.tab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 var(--p-space-1);
    background-color: var(--p-color-bg-surface-secondary);
    border-radius: 10px;
    font-size: var(--p-text-size-075);
    font-weight: var(--p-font-weight-medium);
    margin-left: var(--p-space-1);
}

.tab--active .tab__count {
    background-color: var(--p-color-bg-fill-brand);
    color: var(--p-color-text-brand-on-bg-fill);
}

/* ==========================================================================
   PAGINATION
   https://polaris-react.shopify.com/components/navigation/pagination
   ========================================================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--p-space-1);
}

.pagination__info {
    font-size: var(--p-text-size-100);
    color: var(--p-color-text-secondary);
    margin: 0 var(--p-space-2);
}

/* ==========================================================================
   ICON (SVG wrapper)
   ========================================================================== */

.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--p-icon-size);
    height: var(--p-icon-size);
    color: var(--p-color-icon);
}

.icon--sm {
    width: var(--p-icon-size-sm);
    height: var(--p-icon-size-sm);
}

.icon--lg {
    width: var(--p-icon-size-lg);
    height: var(--p-icon-size-lg);
}

.icon--brand {
    color: var(--p-color-bg-fill-brand);
}

.icon--success {
    color: var(--p-color-bg-fill-success);
}

.icon--critical {
    color: var(--p-color-bg-fill-critical);
}

/* ==========================================================================
   AVATAR
   https://polaris-react.shopify.com/components/images-and-icons/avatar
   ========================================================================== */

.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--p-color-bg-fill-brand);
    color: var(--p-color-text-brand-on-bg-fill);
    font-size: var(--p-text-size-100);
    font-weight: var(--p-font-weight-semibold);
    overflow: hidden;
    text-transform: uppercase;
}

.avatar--sm {
    width: 24px;
    height: 24px;
    font-size: var(--p-text-size-075);
}

.avatar--lg {
    width: 48px;
    height: 48px;
    font-size: var(--p-text-size-175);
}

.avatar__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   STAT CARD
   ========================================================================== */

.stat-card {
    padding: var(--p-space-4);
    background-color: var(--p-color-bg-surface);
    border-radius: var(--p-border-radius-2);
    border: 1px solid var(--p-color-border);
}

.stat-card__label {
    font-size: var(--p-text-size-100);
    color: var(--p-color-text-secondary);
    margin-bottom: var(--p-space-1);
}

.stat-card__value {
    font-size: var(--p-text-size-200);
    font-weight: var(--p-font-weight-bold);
    color: var(--p-color-text);
    font-variant-numeric: tabular-nums;
}

.stat-card__trend {
    display: flex;
    align-items: center;
    gap: var(--p-space-05);
    font-size: var(--p-text-size-075);
    margin-top: var(--p-space-1);
}

.stat-card__trend--up {
    color: var(--p-color-bg-fill-success);
}

.stat-card__trend--down {
    color: var(--p-color-bg-fill-critical);
}

/* ==========================================================================
   AVAILABILITY GRID (Time slot picker)
   ========================================================================== */

.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--p-space-2);
}

.slot {
    padding: var(--p-space-2) var(--p-space-3);
    background-color: var(--p-color-bg-fill);
    border: 1px solid var(--p-color-border);
    border-radius: var(--p-border-radius-1);
    text-align: center;
    font-size: var(--p-text-size-100);
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: all var(--p-motion-duration-100) var(--p-motion-ease);
}

.slot:hover {
    background-color: var(--p-color-bg-surface-secondary);
    border-color: var(--p-color-border-hover);
}

.slot--available {
    background-color: var(--p-color-bg-surface-success);
    border-color: var(--p-color-border-success);
    color: var(--p-color-text-success);
    font-weight: var(--p-font-weight-medium);
}

.slot--available:hover {
    background-color: var(--p-color-border-success);
}

.slot--selected {
    background-color: var(--p-color-bg-fill-brand);
    border-color: var(--p-color-bg-fill-brand);
    color: var(--p-color-text-brand-on-bg-fill);
    font-weight: var(--p-font-weight-medium);
}

.slot--booked {
    background-color: var(--p-color-bg-fill-disabled);
    color: var(--p-color-text-disabled);
    cursor: not-allowed;
}

.slot--disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ==========================================================================
   COURT CARD
   ========================================================================== */

.court-card {
    background-color: var(--p-color-bg-surface);
    border-radius: var(--p-border-radius-2);
    box-shadow: var(--p-shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--p-motion-duration-200) var(--p-motion-ease);
}

.court-card:hover {
    box-shadow: var(--p-shadow-md);
}

.court-card__image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background-color: var(--p-color-bg-surface-secondary);
}

.court-card__image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--p-color-text-secondary);
}

.court-card__body {
    padding: var(--p-space-4);
}

.court-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--p-space-2);
    margin-bottom: var(--p-space-2);
}

.court-card__name {
    font-size: var(--p-text-size-100);
    font-weight: var(--p-font-weight-semibold);
    color: var(--p-color-text);
}

.court-card__type {
    font-size: var(--p-text-size-075);
    color: var(--p-color-text-secondary);
    margin-top: var(--p-space-05);
}

.court-card__description {
    font-size: var(--p-text-size-100);
    color: var(--p-color-text-secondary);
    margin-bottom: var(--p-space-3);
}

.court-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--p-space-2);
}

.court-card__info {
    font-size: var(--p-text-size-075);
    color: var(--p-color-text-secondary);
}

/* ==========================================================================
   BOOKING SUMMARY CARD
   ========================================================================== */

.booking-summary {
    background-color: var(--p-color-bg-surface);
    border-radius: var(--p-border-radius-2);
    border: 1px solid var(--p-color-border);
    overflow: hidden;
}

.booking-summary__header {
    padding: var(--p-space-3) var(--p-space-4);
    background-color: var(--p-color-bg-surface-secondary);
    border-bottom: 1px solid var(--p-color-border);
}

.booking-summary__title {
    font-size: var(--p-text-size-100);
    font-weight: var(--p-font-weight-semibold);
}

.booking-summary__body {
    padding: var(--p-space-4);
}

.booking-summary__row {
    display: flex;
    justify-content: space-between;
    gap: var(--p-space-4);
    padding: var(--p-space-2) 0;
}

.booking-summary__row + .booking-summary__row {
    border-top: 1px solid var(--p-color-border-secondary);
}

.booking-summary__label {
    font-size: var(--p-text-size-100);
    color: var(--p-color-text-secondary);
}

.booking-summary__value {
    font-size: var(--p-text-size-100);
    font-weight: var(--p-font-weight-medium);
    text-align: right;
}

.booking-summary__total {
    padding-top: var(--p-space-3);
    margin-top: var(--p-space-2);
    border-top: 1px solid var(--p-color-border) !important;
}

.booking-summary__total .booking-summary__label {
    font-weight: var(--p-font-weight-semibold);
    color: var(--p-color-text);
}

.booking-summary__total .booking-summary__value {
    font-size: var(--p-text-size-175);
    font-weight: var(--p-font-weight-bold);
}

/* ==========================================================================
   FILTER BAR
   ========================================================================== */

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--p-space-3);
    padding: var(--p-space-4);
    background-color: var(--p-color-bg-surface);
    border-radius: var(--p-border-radius-2);
    border: 1px solid var(--p-color-border);
    margin-bottom: var(--p-space-4);
}

.filters__section {
    display: flex;
    align-items: center;
    gap: var(--p-space-2);
}

.filters__label {
    font-size: var(--p-text-size-100);
    font-weight: var(--p-font-weight-medium);
    color: var(--p-color-text-secondary);
    white-space: nowrap;
}

/* ==========================================================================
   AUTH PAGES (Login / Register)
   ========================================================================== */

.auth-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--p-space-4);
    background-color: var(--p-color-bg);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background-color: var(--p-color-bg-surface);
    border-radius: var(--p-border-radius-2);
    box-shadow: var(--p-shadow-lg);
    padding: var(--p-space-6);
}

.auth-card__logo {
    display: flex;
    justify-content: center;
    margin-bottom: var(--p-space-6);
}

.auth-card__logo-img {
    height: 40px;
    width: auto;
}

.auth-card__title {
    font-size: var(--p-text-size-200);
    font-weight: var(--p-font-weight-bold);
    text-align: center;
    margin-bottom: var(--p-space-1);
}

.auth-card__subtitle {
    font-size: var(--p-text-size-100);
    color: var(--p-color-text-secondary);
    text-align: center;
    margin-bottom: var(--p-space-6);
}

.auth-card__form {
    display: flex;
    flex-direction: column;
    gap: var(--p-space-4);
}

.auth-card__footer {
    margin-top: var(--p-space-6);
    text-align: center;
    font-size: var(--p-text-size-100);
    color: var(--p-color-text-secondary);
}

.auth-card__footer-link {
    color: var(--p-color-text-link);
    font-weight: var(--p-font-weight-medium);
}

/* ==========================================================================
   ADMIN SIDEBAR
   ========================================================================== */

.admin-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background-color: var(--p-color-bg-surface);
    border-right: 1px solid var(--p-color-border);
    padding: var(--p-space-4);
    display: flex;
    flex-direction: column;
    gap: var(--p-space-1);
}

.admin-sidebar__section {
    padding: var(--p-space-3) 0;
}

.admin-sidebar__section-title {
    font-size: var(--p-text-size-075);
    font-weight: var(--p-font-weight-semibold);
    color: var(--p-color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 var(--p-space-2);
    margin-bottom: var(--p-space-1);
}

.admin-sidebar__link {
    display: flex;
    align-items: center;
    gap: var(--p-space-2);
    padding: var(--p-space-2);
    border-radius: var(--p-border-radius-1);
    font-size: var(--p-text-size-100);
    color: var(--p-color-text-secondary);
    text-decoration: none;
    transition: all var(--p-motion-duration-100) var(--p-motion-ease);
}

.admin-sidebar__link:hover {
    background-color: var(--p-color-bg-fill-transparent);
    color: var(--p-color-text);
}

.admin-sidebar__link--active {
    background-color: var(--p-color-bg-fill-brand);
    color: var(--p-color-text-brand-on-bg-fill);
}

.admin-sidebar__icon {
    width: var(--p-icon-size-sm);
    height: var(--p-icon-size-sm);
    flex-shrink: 0;
}

.admin-main {
    padding: var(--p-space-6);
    background-color: var(--p-color-bg);
    overflow-y: auto;
}

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

    .admin-sidebar {
        display: none;
    }
}

/* ==========================================================================
   MODAL
   ========================================================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: var(--p-z-index-modal-backdrop);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--p-space-4);
    animation: fadeIn var(--p-motion-duration-150) var(--p-motion-ease);
}

.modal {
    background-color: var(--p-color-bg-surface);
    border-radius: var(--p-border-radius-2);
    box-shadow: var(--p-shadow-xl);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp var(--p-motion-duration-250) var(--p-motion-ease);
    z-index: var(--p-z-index-modal);
}

.modal__header {
    padding: var(--p-space-4);
    border-bottom: 1px solid var(--p-color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal__title {
    font-size: var(--p-text-size-100);
    font-weight: var(--p-font-weight-semibold);
}

.modal__body {
    padding: var(--p-space-4);
    overflow-y: auto;
}

.modal__footer {
    padding: var(--p-space-4);
    border-top: 1px solid var(--p-color-border);
    display: flex;
    justify-content: flex-end;
    gap: var(--p-space-2);
}

.modal__close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--p-color-text-secondary);
    padding: var(--p-space-1);
    border-radius: var(--p-border-radius-1);
}

.modal__close:hover {
    background-color: var(--p-color-bg-fill-transparent-hover);
    color: var(--p-color-text);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.font-medium { font-weight: var(--p-font-weight-medium); }
.font-semibold { font-weight: var(--p-font-weight-semibold); }
.font-bold { font-weight: var(--p-font-weight-bold); }

.text-sm { font-size: var(--p-text-size-075); }
.text-lg { font-size: var(--p-text-size-175); }

.text-secondary { color: var(--p-color-text-secondary); }
.text-success { color: var(--p-color-text-success); }
.text-critical { color: var(--p-color-text-critical); }

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--p-space-2); }
.mt-4 { margin-top: var(--p-space-4); }
.mt-6 { margin-top: var(--p-space-6); }
.mb-2 { margin-bottom: var(--p-space-2); }
.mb-4 { margin-bottom: var(--p-space-4); }
.mb-6 { margin-bottom: var(--p-space-6); }

.py-4 { padding-top: var(--p-space-4); padding-bottom: var(--p-space-4); }
.px-4 { padding-left: var(--p-space-4); padding-right: var(--p-space-4); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: var(--p-space-2); }
.gap-4 { gap: var(--p-space-4); }

.w-full { width: 100%; }
.max-w-md { max-width: 720px; }
.max-w-lg { max-width: 960px; }

.rounded { border-radius: var(--p-border-radius-2); }
.shadow { box-shadow: var(--p-shadow-md); }

.hidden { display: none; }

@media (max-width: 640px) {
    .hide-mobile { display: none; }
}

@media (min-width: 641px) {
    .show-mobile { display: none; }
}