/* RESORTHUB - SHARED GLOBAL STYLES File: css/style.css */

/* DESIGN VARIABLES */

:root {
    /* Primary */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;

    /* Backgrounds */
    --page-background: #f6f8fc;
    --surface: #ffffff;
    --surface-soft: #f8fafc;

    /* Text */
    --text-primary: #172033;
    --text-secondary: #536078;
    --text-muted: #8a96a8;

    /* Borders */
    --border: #e3e8f0;
    --border-light: #edf1f6;

    /* Status */
    --success: #16a34a;
    --success-background: #ecfdf3;

    --warning: #d97706;
    --warning-background: #fff7e8;

    --danger: #dc2626;
    --danger-background: #fef2f2;

    --info: #2563eb;
    --info-background: #eff6ff;

    --neutral-background: #f1f5f9;

    /* Layout */
    --topbar-height: 60px;
    --sidebar-width: 220px;
    --sidebar-collapsed-width: 68px;

    /* Radius */
    --radius-small: 5px;
    --radius-medium: 8px;
    --radius-large: 10px;

    /* Shadows */
    --shadow-small: 0 2px 6px rgba(30, 45, 70, 0.04);

    --shadow-medium: 0 5px 16px rgba(30, 45, 70, 0.06);

    /* Animation */
    --transition: 0.2s ease;
}

/* RESET */

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

html {
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;

    min-height: 100vh;

    background: var(--page-background);
    color: var(--text-primary);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    font-size: 14px;
    line-height: 1.5;
}

body,
button,
input,
select,
textarea {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
}

button,
input,
select,
textarea {
    font-size: inherit;
}

button {
    cursor: pointer;
}

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

img {
    display: block;

    max-width: 100%;
}

svg {
    display: block;
}

/* MAIN CLIENT LAYOUT */

.client-app {
    min-height: 100vh;

    background: var(--page-background);
}

.client-layout {
    min-height: 100vh;

    padding-top: var(--topbar-height);
}

.client-main {
    min-height: calc(100vh - var(--topbar-height));

    margin-left: var(--sidebar-width);

    padding: 28px;

    transition: margin-left var(--transition);
}

/* Sidebar collapsed */

.client-app.sidebar-collapsed .client-main {
    margin-left: var(--sidebar-collapsed-width);
}

/* PAGE CONTAINER */

.page-container {
    width: 100%;
    max-width: 1440px;

    margin: 0 auto;
}

/* PAGE HEADER */

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 22px;
}

.page-header-content {
    min-width: 0;
}

.page-header h1 {
    margin: 0 0 5px;

    color: var(--text-primary);

    font-size: 27px;
    font-weight: 700;
    line-height: 1.2;
}

.page-header p {
    margin: 0;

    color: var(--text-secondary);

    font-size: 13px;
    line-height: 1.5;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;

    flex-shrink: 0;
}

/* SECTION HEADING */

.section-heading {
    margin: 0;

    color: var(--text-primary);

    font-size: 16px;
    font-weight: 650;
}

/* CARD */

.card {
    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius-large);

    box-shadow: var(--shadow-small);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    padding: 16px 18px;

    border-bottom: 1px solid var(--border-light);
}

.card-body {
    padding: 18px;
}

/* CARD HEADING */

.card-heading {
    display: flex;
    align-items: center;
    gap: 11px;

    min-width: 0;
}

.card-heading-icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: var(--radius-medium);

    background: var(--primary-light);
    color: var(--primary);
}

.card-heading-icon svg {
    width: 19px;
    height: 19px;
}

.card-heading-text {
    min-width: 0;
}

.card-heading h2,
.card-heading h3 {
    margin: 0;

    color: var(--text-primary);

    font-size: 15px;
    font-weight: 650;
    line-height: 1.35;
}

.card-heading p {
    margin: 3px 0 0;

    color: var(--text-secondary);

    font-size: 12px;
    line-height: 1.4;
}

/* BUTTONS */

.primary-button,
.secondary-button {
    min-height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    padding: 8px 14px;

    border-radius: var(--radius-medium);

    font-size: 12px;
    font-weight: 600;
    line-height: 1;

    transition:
        background var(--transition),
        border-color var(--transition),
        color var(--transition),
        box-shadow var(--transition);
}

/* Primary */

.primary-button {
    border: 1px solid var(--primary);

    background: var(--primary);
    color: #ffffff;
}

.primary-button:hover {
    border-color: var(--primary-hover);

    background: var(--primary-hover);
}

/* Secondary */

.secondary-button {
    border: 1px solid var(--border);

    background: var(--surface);
    color: var(--text-primary);
}

.secondary-button:hover {
    border-color: #cfd7e4;

    background: var(--surface-soft);
}

/* Button icons */

.primary-button svg,
.secondary-button svg {
    width: 16px;
    height: 16px;
}

/* Disabled */

.primary-button:disabled,
.secondary-button:disabled {
    cursor: not-allowed;

    opacity: 0.6;
}

/* ICON BUTTON */

.icon-button {
    width: 36px;
    height: 36px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid var(--border);
    border-radius: var(--radius-medium);

    background: var(--surface);
    color: var(--text-secondary);

    transition:
        background var(--transition),
        border-color var(--transition),
        color var(--transition);
}

.icon-button:hover {
    border-color: #cfd7e4;

    background: var(--surface-soft);
    color: var(--primary);
}

.icon-button svg {
    width: 17px;
    height: 17px;
}

/* FORMS */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-label {
    color: var(--text-primary);

    font-size: 12px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    min-height: 40px;

    padding: 9px 11px;

    border: 1px solid var(--border);
    border-radius: var(--radius-medium);

    outline: none;

    background: var(--surface);
    color: var(--text-primary);

    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:focus {
    border-color: var(--primary);

    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

textarea.form-control {
    min-height: 100px;

    resize: vertical;
}

select.form-control {
    cursor: pointer;
}

/* STATUS BADGES */

.status-badge {
    min-height: 25px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    padding: 4px 9px;

    border-radius: 999px;

    background: var(--neutral-background);
    color: var(--text-secondary);

    font-size: 10px;
    font-weight: 650;

    white-space: nowrap;
}

.status-badge svg {
    width: 12px;
    height: 12px;
}

/* Success */

.status-success {
    background: var(--success-background);
    color: var(--success);
}

/* Warning */

.status-warning {
    background: var(--warning-background);
    color: var(--warning);
}

/* Danger */

.status-danger {
    background: var(--danger-background);
    color: var(--danger);
}

/* Information */

.status-info {
    background: var(--info-background);
    color: var(--info);
}

/* INFORMATION ROWS */

.info-list {
    display: flex;
    flex-direction: column;
}

.info-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;

    padding: 10px 0;

    border-bottom: 1px solid var(--border-light);
}

.info-row:first-child {
    padding-top: 0;
}

.info-row:last-child {
    padding-bottom: 0;

    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);

    font-size: 12px;
}

.info-value {
    color: var(--text-primary);

    font-size: 12px;
    font-weight: 600;

    text-align: right;
}

/* DIVIDER */

.divider {
    width: 100%;
    height: 1px;

    margin: 16px 0;

    background: var(--border-light);
}

/* EMPTY STATE */

.empty-state {
    min-height: 230px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 30px 20px;

    text-align: center;
}

.empty-state-icon {
    width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 12px;

    border-radius: 50%;

    background: var(--primary-light);
    color: var(--primary);
}

.empty-state-icon svg {
    width: 23px;
    height: 23px;
}

.empty-state h3 {
    margin: 0 0 6px;

    color: var(--text-primary);

    font-size: 15px;
    font-weight: 650;
}

.empty-state p {
    max-width: 420px;

    margin: 0 0 16px;

    color: var(--text-secondary);

    font-size: 12px;
    line-height: 1.5;
}

/* UTILITY CLASSES */

.text-primary {
    color: var(--text-primary);
}

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

.text-muted {
    color: var(--text-muted);
}

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

.text-warning {
    color: var(--warning);
}

.text-danger {
    color: var(--danger);
}

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

.full-width {
    width: 100%;
}

/* SCREEN READER ONLY */

.sr-only {
    position: absolute;

    width: 1px;
    height: 1px;

    padding: 0;
    margin: -1px;

    overflow: hidden;

    clip: rect(0, 0, 0, 0);

    white-space: nowrap;

    border: 0;
}

/* HIDDEN */

[hidden] {
    display: none !important;
}

/* FOCUS */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.reservation-pass-dialog {
    width: min(680px, calc(100% - 32px));
    max-height: calc(100dvh - 32px);
    border: 0;
    border-radius: 18px;
    padding: 0;
    box-shadow: 0 24px 70px rgba(12, 31, 64, 0.25);
}

.reservation-pass-dialog::backdrop {
    background: rgba(12, 25, 48, 0.58);
}

.reservation-pass-content {
    padding: 24px;
}

.reservation-pass-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.reservation-pass-header h2 {
    margin: 0 0 6px;
}

.reservation-pass-header p,
.reservation-pass-note {
    color: #526784;
    line-height: 1.5;
}

.reservation-pass-close {
    flex: none;
    width: 38px;
    height: 38px;
    border: 1px solid #d8e3f4;
    border-radius: 10px;
    background: #fff;
    font-size: 24px;
    cursor: pointer;
}

.reservation-pass-preview {
    display: block;
    width: 100%;
    margin-top: 20px;
    border: 1px solid #d8e3f4;
    border-radius: 10px;
}

.reservation-pass-download {
    width: 100%;
    padding: 13px 18px;
    border: 0;
    border-radius: 10px;
    background: #1859c9;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.reservation-pass-download:hover {
    background: #1248a5;
}

/* RESPONSIVE */

@media (max-width: 1000px) {
    .client-main {
        padding: 24px;
    }
}

@media (max-width: 760px) {
    .client-main,
    .client-app.sidebar-collapsed .client-main {
        margin-left: 0;

        padding: 20px 16px;
    }

    .page-header {
        flex-direction: column;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .page-header-actions {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .client-main {
        padding: 18px 12px;
    }

    .card-header,
    .card-body {
        padding: 15px;
    }

    .page-header h1 {
        font-size: 22px;
    }

    .info-row {
        flex-direction: column;
        gap: 4px;
    }

    .info-value {
        text-align: left;
    }
}

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

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

.client-main {
    animation: clientPageEnter 260ms ease-out both;
}

.client-app.is-page-leaving .client-main {
    animation: clientPageLeave 150ms ease-in both;
}

@media (prefers-reduced-motion: reduce) {
    .client-main,
    .client-app.is-page-leaving .client-main {
        animation: none;
    }
}