/* =========================================================
   HOTEL MANAGEMENT SYSTEM — DESIGN SYSTEM v1
   Step 1 visual foundation for Hotel Booking System v0.13.0
   Presentation-layer only: no booking/payment/database logic.
   ========================================================= */

:root {
    /* Brand */
    --hms-primary: #0B2D4F;
    --hms-primary-hover: #123F69;
    --hms-primary-soft: #EAF2F8;
    --hms-teal: #0EA5B8;
    --hms-teal-hover: #07879A;
    --hms-teal-soft: #E7F8FA;
    --hms-sky: #38BDF8;
    --hms-sky-soft: #E8F7FE;
    --hms-gold: #D9A441;
    --hms-gold-soft: #FFF8E8;

    /* Semantic */
    --hms-success: #22C55E;
    --hms-success-dark: #15803D;
    --hms-success-soft: #DCFCE7;
    --hms-warning: #F59E0B;
    --hms-warning-dark: #B45309;
    --hms-warning-soft: #FEF3C7;
    --hms-danger: #EF4444;
    --hms-danger-dark: #B91C1C;
    --hms-danger-soft: #FEE2E2;
    --hms-info: #3B82F6;
    --hms-info-dark: #1D4ED8;
    --hms-info-soft: #DBEAFE;
    --hms-purple: #8B5CF6;
    --hms-purple-soft: #EDE9FE;

    /* Surfaces */
    --hms-bg: #F8FAFC;
    --hms-bg-secondary: #F1F5F9;
    --hms-surface: #FFFFFF;
    --hms-surface-soft: #F8FAFC;
    --hms-border: #E2E8F0;
    --hms-border-strong: #CBD5E1;

    /* Text */
    --hms-text: #0F172A;
    --hms-text-secondary: #475569;
    --hms-text-muted: #64748B;
    --hms-text-light: #94A3B8;

    /* Spacing */
    --hms-space-1: 4px;
    --hms-space-2: 8px;
    --hms-space-3: 12px;
    --hms-space-4: 16px;
    --hms-space-5: 20px;
    --hms-space-6: 24px;
    --hms-space-8: 32px;
    --hms-space-10: 40px;
    --hms-space-12: 48px;

    /* Radius */
    --hms-radius-sm: 8px;
    --hms-radius-md: 12px;
    --hms-radius-lg: 16px;
    --hms-radius-xl: 20px;
    --hms-radius-2xl: 24px;
    --hms-radius-full: 999px;

    /* Shadows */
    --hms-shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
    --hms-shadow-md: 0 4px 18px rgba(15, 23, 42, .08);
    --hms-shadow-lg: 0 12px 32px rgba(15, 23, 42, .12);

    /* Layout */
    --hms-sidebar-width: 260px;
    --hms-topbar-height: 76px;

    /* Compatibility with the existing v0.13.0 UI */
    --bg: var(--hms-bg);
    --surface: var(--hms-surface);
    --surface2: var(--hms-bg-secondary);
    --ink: var(--hms-text);
    --muted: var(--hms-text-muted);
    --accent: var(--hms-teal);
    --accent2: var(--hms-teal-hover);
    --line: var(--hms-border);
    --success: var(--hms-success-dark);
    --danger: var(--hms-danger-dark);
    --shadow: var(--hms-shadow-lg);
}

/* Typography */
html {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    color: var(--hms-text);
    background: var(--hms-bg);
    font-size: 16px;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--hms-text);
    font-weight: 700;
    letter-spacing: -0.025em;
}

h1 { font-size: clamp(32px, 4vw, 44px); line-height: 1.1; }
h2 { font-size: 30px; line-height: 1.2; }
h3 { font-size: 22px; line-height: 1.3; }
small, .hms-muted { color: var(--hms-text-muted); }

/* Reusable cards */
.hms-card {
    background: var(--hms-surface);
    border: 1px solid var(--hms-border);
    border-radius: var(--hms-radius-lg);
    box-shadow: var(--hms-shadow-sm);
    padding: var(--hms-space-6);
}

.hms-card-hover {
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.hms-card-hover:hover {
    transform: translateY(-2px);
    border-color: var(--hms-border-strong);
    box-shadow: var(--hms-shadow-md);
}

/* Buttons */
.hms-btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: var(--hms-radius-md);
    padding: 10px 17px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.hms-btn:hover { text-decoration: none; }
.hms-btn-primary { color: #fff; background: var(--hms-primary); }
.hms-btn-primary:hover { background: var(--hms-primary-hover); }
.hms-btn-teal { color: #fff; background: var(--hms-teal); }
.hms-btn-teal:hover { background: var(--hms-teal-hover); }
.hms-btn-secondary { color: var(--hms-text); background: var(--hms-surface); border-color: var(--hms-border); }
.hms-btn-secondary:hover { border-color: var(--hms-border-strong); background: var(--hms-bg-secondary); }
.hms-btn-danger { color: #fff; background: var(--hms-danger); }
.hms-btn-danger:hover { background: var(--hms-danger-dark); }
.hms-btn:disabled, .hms-btn-disabled { opacity: .55; pointer-events: none; }

/* Forms */
.hms-input, .hms-select, .hms-textarea {
    width: 100%;
    border: 1px solid var(--hms-border);
    border-radius: var(--hms-radius-md);
    background: var(--hms-surface);
    color: var(--hms-text);
    font: inherit;
    padding: 11px 14px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.hms-input, .hms-select { min-height: 44px; }
.hms-textarea { min-height: 120px; resize: vertical; }
.hms-input:focus, .hms-select:focus, .hms-textarea:focus {
    border-color: var(--hms-teal);
    box-shadow: 0 0 0 3px rgba(14, 165, 184, .12);
}
.hms-field { display: grid; gap: 7px; }
.hms-field-label { font-size: 14px; font-weight: 700; color: var(--hms-text); }
.hms-field-help { font-size: 13px; color: var(--hms-text-muted); }

/* Status badges */
.hms-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    padding: 5px 10px;
    border-radius: var(--hms-radius-full);
    font-size: 12px;
    line-height: 1.2;
    font-weight: 800;
}
.hms-badge-success { color: var(--hms-success-dark); background: var(--hms-success-soft); }
.hms-badge-warning { color: var(--hms-warning-dark); background: var(--hms-warning-soft); }
.hms-badge-danger { color: var(--hms-danger-dark); background: var(--hms-danger-soft); }
.hms-badge-info { color: var(--hms-info-dark); background: var(--hms-info-soft); }
.hms-badge-purple { color: #6D28D9; background: var(--hms-purple-soft); }
.hms-badge-neutral { color: var(--hms-text-secondary); background: var(--hms-bg-secondary); }

/* Table foundation */
.hms-table-wrap {
    width: 100%;
    overflow-x: auto;
    background: var(--hms-surface);
    border: 1px solid var(--hms-border);
    border-radius: var(--hms-radius-lg);
}
.hms-table { width: 100%; border-collapse: collapse; }
.hms-table th {
    padding: 12px 16px;
    background: var(--hms-bg-secondary);
    color: var(--hms-text-muted);
    font-size: 12px;
    font-weight: 800;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 1px solid var(--hms-border);
}
.hms-table td {
    padding: 14px 16px;
    color: var(--hms-text-secondary);
    border-bottom: 1px solid var(--hms-border);
}
.hms-table tbody tr:last-child td { border-bottom: 0; }
.hms-table tbody tr:hover { background: #FBFDFF; }

/* Stat cards */
.hms-stat-card {
    display: grid;
    gap: 8px;
    padding: 20px;
    background: var(--hms-surface);
    border: 1px solid var(--hms-border);
    border-radius: var(--hms-radius-lg);
    box-shadow: var(--hms-shadow-sm);
}
.hms-stat-label { color: var(--hms-text-muted); font-size: 14px; }
.hms-stat-value { color: var(--hms-text); font-size: 28px; line-height: 1.1; font-weight: 800; }
.hms-stat-change { font-size: 13px; font-weight: 700; }
.hms-stat-change.up { color: var(--hms-success-dark); }
.hms-stat-change.down { color: var(--hms-danger-dark); }

/* Alerts */
.hms-alert { padding: 14px 16px; border: 1px solid; border-radius: var(--hms-radius-md); font-size: 14px; }
.hms-alert-success { color: #166534; background: #F0FDF4; border-color: #BBF7D0; }
.hms-alert-warning { color: #92400E; background: #FFFBEB; border-color: #FDE68A; }
.hms-alert-danger { color: #991B1B; background: #FEF2F2; border-color: #FECACA; }

/* Utilities */
.hms-flex { display: flex; }
.hms-flex-center { display: flex; align-items: center; }
.hms-flex-between { display: flex; align-items: center; justify-content: space-between; }
.hms-grid { display: grid; }
.hms-gap-2 { gap: 8px; }
.hms-gap-3 { gap: 12px; }
.hms-gap-4 { gap: 16px; }
.hms-gap-6 { gap: 24px; }
.hms-text-muted { color: var(--hms-text-muted); }

/* Responsive foundation */
@media (max-width: 768px) {
    :root {
        --hms-space-6: 20px;
        --hms-space-8: 24px;
    }
    .hms-card { padding: 18px; }
    h1 { font-size: 32px; }
    h2 { font-size: 26px; }
}
