/* =========================================================
   WIFI HOTEL
   Global Design System
   UI-01
   ========================================================= */


/* =========================================================
   1. ROOT / DESIGN TOKENS
   ========================================================= */

:root {

    /* Brand */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;

    /* Semantic */
    --success: #16a34a;
    --success-light: #f0fdf4;

    --warning: #d97706;
    --warning-light: #fffbeb;

    --danger: #dc2626;
    --danger-light: #fef2f2;

    --info: #0284c7;
    --info-light: #f0f9ff;

    /* Neutral */
    --white: #ffffff;

    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Background */
    --body-bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;

    /* Text */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    /* Border */
    --border: #e2e8f0;
    --border-dark: #cbd5e1;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Shadow */
    --shadow-sm:
        0 1px 2px rgba(15, 23, 42, 0.05);

    --shadow-md:
        0 4px 12px rgba(15, 23, 42, 0.08);

    --shadow-lg:
        0 10px 30px rgba(15, 23, 42, 0.10);

    /* Layout */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1200px;
    --container-2xl: 1400px;

    /* Transition */
    --transition:
        0.2s ease;

    /* Font */
    --font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

}


/* =========================================================
   2. RESET
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;

    font-family: var(--font-family);

    font-size: 15px;
    line-height: 1.6;

    color: var(--text-primary);

    background:
        var(--body-bg);

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    margin: 0;
    padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    line-height: 1.25;
}

p {
    margin-top: 0;
}


/* =========================================================
   3. TYPOGRAPHY
   ========================================================= */

.text-xs {
    font-size: 12px;
}

.text-sm {
    font-size: 13px;
}

.text-base {
    font-size: 15px;
}

.text-lg {
    font-size: 17px;
}

.text-xl {
    font-size: 20px;
}

.text-2xl {
    font-size: 24px;
}

.text-3xl {
    font-size: 30px;
}

.text-4xl {
    font-size: 36px;
}

.font-normal {
    font-weight: 400;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.text-muted {
    color: var(--text-muted);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-primary {
    color: var(--primary);
}

.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.text-danger {
    color: var(--danger);
}


/* =========================================================
   4. LAYOUT
   ========================================================= */

.container {
    width: min(
        100% - 32px,
        var(--container-xl)
    );

    margin-left: auto;
    margin-right: auto;
}

.container-sm {
    width: min(
        100% - 32px,
        var(--container-sm)
    );

    margin-left: auto;
    margin-right: auto;
}

.container-md {
    width: min(
        100% - 32px,
        var(--container-md)
    );

    margin-left: auto;
    margin-right: auto;
}

.container-lg {
    width: min(
        100% - 32px,
        var(--container-lg)
    );

    margin-left: auto;
    margin-right: auto;
}

.container-2xl {
    width: min(
        100% - 32px,
        var(--container-2xl)
    );

    margin-left: auto;
    margin-right: auto;
}


/* =========================================================
   5. FLEX
   ========================================================= */

.flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.items-end {
    align-items: flex-end;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: flex-end;
}

.gap-1 {
    gap: 4px;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.gap-4 {
    gap: 16px;
}

.gap-5 {
    gap: 20px;
}

.gap-6 {
    gap: 24px;
}

.gap-8 {
    gap: 32px;
}


/* =========================================================
   6. GRID
   ========================================================= */

.grid {
    display: grid;
}

.grid-2 {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
}


/* =========================================================
   7. CARD
   ========================================================= */

.card {
    background: var(--surface);

    border:
        1px solid var(--border);

    border-radius:
        var(--radius-lg);

    box-shadow:
        var(--shadow-sm);
}

.card-body {
    padding: 24px;
}

.card-header {
    padding: 20px 24px;

    border-bottom:
        1px solid var(--border);
}

.card-footer {
    padding: 16px 24px;

    border-top:
        1px solid var(--border);
}


/* =========================================================
   8. BUTTONS
   ========================================================= */

.btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    min-height: 42px;

    padding:
        0 18px;

    border:
        1px solid transparent;

    border-radius:
        var(--radius-md);

    font-size: 14px;
    font-weight: 600;

    transition:
        var(--transition);

    white-space: nowrap;
}

.btn:hover {
    transform:
        translateY(-1px);
}

.btn:active {
    transform:
        translateY(0);
}


/* Primary */

.btn-primary {
    color: var(--white);

    background:
        var(--primary);

    border-color:
        var(--primary);
}

.btn-primary:hover {
    background:
        var(--primary-dark);

    border-color:
        var(--primary-dark);
}


/* Secondary */

.btn-secondary {
    color:
        var(--gray-700);

    background:
        var(--white);

    border-color:
        var(--border-dark);
}

.btn-secondary:hover {
    background:
        var(--gray-50);
}


/* Success */

.btn-success {
    color: var(--white);

    background:
        var(--success);

    border-color:
        var(--success);
}


/* Danger */

.btn-danger {
    color: var(--white);

    background:
        var(--danger);

    border-color:
        var(--danger);
}


/* Ghost */

.btn-ghost {
    color:
        var(--text-secondary);

    background:
        transparent;
}

.btn-ghost:hover {
    background:
        var(--gray-100);
}


/* Sizes */

.btn-sm {
    min-height: 34px;

    padding:
        0 12px;

    font-size: 13px;
}

.btn-lg {
    min-height: 48px;

    padding:
        0 24px;

    font-size: 16px;
}


/* =========================================================
   9. FORM
   ========================================================= */

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;

    margin-bottom: 7px;

    color:
        var(--gray-700);

    font-size: 14px;
    font-weight: 600;
}

.form-control {
    width: 100%;

    min-height: 44px;

    padding:
        10px 13px;

    color:
        var(--text-primary);

    background:
        var(--white);

    border:
        1px solid var(--border-dark);

    border-radius:
        var(--radius-md);

    outline: none;

    transition:
        var(--transition);
}

.form-control:hover {
    border-color:
        var(--gray-400);
}

.form-control:focus {
    border-color:
        var(--primary);

    box-shadow:
        0 0 0 3px
        rgba(37, 99, 235, 0.12);
}

.form-control::placeholder {
    color:
        var(--gray-400);
}

textarea.form-control {
    min-height: 110px;

    resize: vertical;
}

.form-help {
    margin-top: 5px;

    color:
        var(--text-muted);

    font-size: 12px;
}


/* =========================================================
   10. ALERT
   ========================================================= */

.alert {
    padding:
        13px 16px;

    border:
        1px solid transparent;

    border-radius:
        var(--radius-md);

    font-size: 14px;
}

.alert-success {
    color: #166534;

    background:
        var(--success-light);

    border-color:
        #bbf7d0;
}

.alert-warning {
    color: #92400e;

    background:
        var(--warning-light);

    border-color:
        #fde68a;
}

.alert-danger {
    color: #991b1b;

    background:
        var(--danger-light);

    border-color:
        #fecaca;
}

.alert-info {
    color: #075985;

    background:
        var(--info-light);

    border-color:
        #bae6fd;
}


/* =========================================================
   11. BADGES / STATUS
   ========================================================= */

.badge {
    display: inline-flex;

    align-items: center;

    min-height: 26px;

    padding:
        0 10px;

    border-radius:
        var(--radius-full);

    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    color: #166534;
    background: #dcfce7;
}

.badge-warning {
    color: #92400e;
    background: #fef3c7;
}

.badge-danger {
    color: #991b1b;
    background: #fee2e2;
}

.badge-info {
    color: #075985;
    background: #e0f2fe;
}

.badge-neutral {
    color: var(--gray-700);
    background: var(--gray-100);
}


/* =========================================================
   12. TABLE
   ========================================================= */

.table-wrapper {
    width: 100%;

    overflow-x: auto;
}

.table {
    width: 100%;

    border-collapse:
        collapse;
}

.table th {
    padding:
        12px 16px;

    color:
        var(--gray-600);

    background:
        var(--gray-50);

    border-bottom:
        1px solid var(--border);

    text-align: left;

    font-size: 12px;
    font-weight: 700;

    text-transform:
        uppercase;
}

.table td {
    padding:
        14px 16px;

    border-bottom:
        1px solid var(--border);

    color:
        var(--text-secondary);

    vertical-align:
        middle;
}

.table tbody tr:hover {
    background:
        var(--gray-50);
}


/* =========================================================
   13. DIVIDER
   ========================================================= */

.divider {
    height: 1px;

    margin:
        20px 0;

    background:
        var(--border);
}


/* =========================================================
   14. AVATAR
   ========================================================= */

.avatar {
    width: 40px;
    height: 40px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius:
        var(--radius-full);

    background:
        var(--primary-light);

    color:
        var(--primary);

    font-weight: 700;
}

.avatar-sm {
    width: 32px;
    height: 32px;

    font-size: 12px;
}

.avatar-lg {
    width: 52px;
    height: 52px;

    font-size: 18px;
}


/* =========================================================
   15. EMPTY STATE
   ========================================================= */

.empty-state {
    padding:
        50px 20px;

    text-align:
        center;

    color:
        var(--text-muted);
}

.empty-state-icon {
    width: 56px;
    height: 56px;

    margin:
        0 auto 16px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius:
        var(--radius-full);

    background:
        var(--gray-100);

    color:
        var(--gray-500);

    font-size: 24px;
}

.empty-state-title {
    margin-bottom: 6px;

    color:
        var(--text-primary);

    font-size: 18px;
    font-weight: 700;
}


/* =========================================================
   16. LOADING
   ========================================================= */

.loading {
    display: inline-flex;

    align-items: center;
    gap: 8px;
}

.spinner {
    width: 18px;
    height: 18px;

    border:
        2px solid var(--gray-200);

    border-top-color:
        var(--primary);

    border-radius:
        50%;

    animation:
        spin 0.7s linear infinite;
}

@keyframes spin {

    to {
        transform:
            rotate(360deg);
    }

}


/* =========================================================
   17. UTILITY
   ========================================================= */

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.hidden {
    display: none !important;
}

.block {
    display: block;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.rounded {
    border-radius:
        var(--radius-md);
}

.rounded-lg {
    border-radius:
        var(--radius-lg);
}

.rounded-xl {
    border-radius:
        var(--radius-xl);
}


/* =========================================================
   18. SPACING
   ========================================================= */

.mt-1 {
    margin-top: 4px;
}

.mt-2 {
    margin-top: 8px;
}

.mt-3 {
    margin-top: 12px;
}

.mt-4 {
    margin-top: 16px;
}

.mt-5 {
    margin-top: 20px;
}

.mt-6 {
    margin-top: 24px;
}

.mt-8 {
    margin-top: 32px;
}

.mb-1 {
    margin-bottom: 4px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-3 {
    margin-bottom: 12px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-5 {
    margin-bottom: 20px;
}

.mb-6 {
    margin-bottom: 24px;
}

.mb-8 {
    margin-bottom: 32px;
}

.p-4 {
    padding: 16px;
}

.p-5 {
    padding: 20px;
}

.p-6 {
    padding: 24px;
}


/* =========================================================
   19. RESPONSIVE
   ========================================================= */

@media (max-width: 1024px) {

    .grid-4 {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .grid-3 {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 700px) {

    body {
        font-size: 14px;
    }

    .container,
    .container-sm,
    .container-md,
    .container-lg,
    .container-2xl {
        width:
            min(
                100% - 24px,
                100%
            );
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns:
            1fr;
    }

    .card-body {
        padding: 18px;
    }

    .card-header {
        padding: 16px 18px;
    }

    .card-footer {
        padding: 14px 18px;
    }

    .btn-lg {
        width: 100%;
    }

}