/* ==========================================
   🏨 CS-HOTEL SYSTEM - BASE STYLES & DESIGN SYSTEM
   ========================================== */

:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --primary-soft: rgba(59, 130, 246, 0.15);

    --success-color: #10b981;
    --success-hover: #059669;
    --success-soft: rgba(16, 185, 129, 0.15);

    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --danger-soft: rgba(239, 68, 68, 0.15);

    --warning-color: #f59e0b;
    --warning-hover: #d97706;
    --warning-soft: rgba(245, 158, 11, 0.15);

    --info-color: #38bdf8;
    --info-hover: #0284c7;
    --info-soft: rgba(56, 189, 248, 0.15);

    --bg-dark: #0b0f19;
    --bg-card: #141c2e;
    --bg-surface: #0f172a;
    --bg-input: #0b1120;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(148, 163, 184, 0.12);
    --border-light: rgba(148, 163, 184, 0.22);

    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
    font-weight: 700;
    letter-spacing: -0.3px;
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

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

.text-muted { color: var(--text-muted) !important; }
.text-success { color: #34d399 !important; }
.text-danger { color: #f87171 !important; }
.text-warning { color: #fbbf24 !important; }
.text-info { color: #38bdf8 !important; }
.text-white { color: #ffffff !important; }

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0.55rem 1.15rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.15s ease-in-out;
    user-select: none;
    line-height: 1.3;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.btn:active {
    transform: translateY(0);
}

.btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    border-radius: 5px;
}

.btn-primary { background: var(--primary-color); color: #ffffff; }
.btn-primary:hover { background: var(--primary-hover); }

.btn-success { background: var(--success-color); color: #ffffff; }
.btn-success:hover { background: var(--success-hover); }

.btn-danger { background: var(--danger-color); color: #ffffff; }
.btn-danger:hover { background: var(--danger-hover); }

.btn-warning { background: var(--warning-color); color: #1e293b; font-weight: 700; }
.btn-warning:hover { background: var(--warning-hover); }

.btn-info { background: var(--info-color); color: #0f172a; font-weight: 700; }
.btn-info:hover { background: var(--info-hover); color: #ffffff; }

.btn-secondary { background: #334155; color: #f8fafc; border-color: var(--border-color); }
.btn-secondary:hover { background: #475569; }

/* Outlined Buttons */
.btn-outline-primary { background: transparent; border-color: var(--primary-color); color: #60a5fa; }
.btn-outline-primary:hover { background: var(--primary-color); color: #ffffff; }

.btn-outline-success { background: transparent; border-color: var(--success-color); color: #34d399; }
.btn-outline-success:hover { background: var(--success-color); color: #ffffff; }

.btn-outline-danger { background: transparent; border-color: var(--danger-color); color: #f87171; }
.btn-outline-danger:hover { background: var(--danger-color); color: #ffffff; }

.btn-outline-warning { background: transparent; border-color: var(--warning-color); color: #fbbf24; }
.btn-outline-warning:hover { background: var(--warning-color); color: #1e293b; }

.btn-outline-info { background: transparent; border-color: var(--info-color); color: #38bdf8; }
.btn-outline-info:hover { background: var(--info-color); color: #0f172a; }

.btn-outline-secondary { background: transparent; border-color: #475569; color: #cbd5e1; }
.btn-outline-secondary:hover { background: #475569; color: #ffffff; }

.btn-block { display: flex; width: 100%; text-align: center; }

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #cbd5e1;
    letter-spacing: 0.2px;
}

.form-control {
    width: 100%;
    min-height: 42px;
    padding: 0.65rem 0.95rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-input);
    color: #f8fafc;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    font-family: inherit;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.25rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    background-color: rgba(15, 23, 42, 0.9);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.form-control::placeholder {
    color: #64748b;
}

.form-row {
    display: flex;
    gap: 14px;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: #4ade80; border: 1px solid rgba(16, 185, 129, 0.35); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.35); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.35); }
.badge-info { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.35); }
.badge-primary { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.35); }
.badge-secondary { background: rgba(148, 163, 184, 0.12); color: #cbd5e1; border: 1px solid var(--border-color); }

/* Cards */
.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    margin-bottom: 1.5rem;
}

/* Search Box Component */
.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    min-height: 42px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.search-icon {
    font-size: 1rem;
    margin-right: 10px;
    color: var(--text-muted);
}

.search-input {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    width: 100%;
    font-size: 0.92rem;
    font-family: inherit;
}

.search-input::placeholder {
    color: #64748b;
}

/* Tables & Responsive */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

.data-table,
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
    text-align: left;
}

.data-table th,
.table th {
    background-color: #0d1527;
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table td,
.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    color: #e2e8f0;
    font-size: 0.92rem;
}

.data-table tbody tr,
.table tbody tr {
    transition: background-color 0.15s ease;
}

.data-table tbody tr:hover,
.table tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.04);
}

.data-table tbody tr:last-child td,
.table tbody tr:last-child td {
    border-bottom: none;
}

/* Spacing & Flex Utilities */
.d-flex { display: flex; }
.d-grid { display: grid; }
.flex-column { flex-direction: column; }
.flex-1 { flex: 1; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.w-100 { width: 100%; }

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }

.p-0 { padding: 0 !important; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 1rem; padding-bottom: 1rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
