/* ===================================
   ADMIN PORTAL - PROFESSIONAL LAYOUT
   =================================== */

:root {
    --admin-bg: #f6f7fb;
    --admin-surface: rgba(255, 255, 255, 0.92);
    --admin-surface-solid: #ffffff;
    --admin-text: #0f172a;
    --admin-muted: #5b6476;
    --admin-border: rgba(15, 23, 42, 0.10);
    --admin-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 1px rgba(15, 23, 42, 0.04);
    --admin-shadow-md: 0 10px 30px rgba(15, 23, 42, 0.10);
    --admin-shadow-lg: 0 18px 60px rgba(15, 23, 42, 0.14);

    --admin-accent: #d4af37;
    --admin-accent-2: #f3d37c;
    --admin-accent-ink: #1a2332;

    --admin-nav: #0b1020;
    --admin-nav-2: #121a32;
    --admin-ring: rgba(212, 175, 55, 0.28);

    --admin-radius: 14px;

    --admin-page-pad: clamp(18px, 2.2vw, 28px);
    --admin-content-max: 1320px;
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--admin-bg);
    color: var(--admin-text);
    line-height: 1.6;
}

/*
   Admin pages also load the site-wide styles.css.
   Normalize key shared classes here so admin tabs/layouts align consistently.
*/
#adminPortal, #adminPortal * {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Defensive layout resets: ensure tables don't get right-shifted by any flex/centering rules */
#adminPortal .card,
#adminPortal .card-body,
#adminPortal .tab-pane,
#adminPortal .admin-main {
    min-width: 0;
}

#adminPortal .card-body {
    display: block;
}

#adminPortal .table-container {
    width: 100%;
    max-width: 100%;
    display: block;
    margin: 0;
    flex: 1 1 100%;
    align-self: stretch;
    min-width: 0;
}

#adminPortal .admin-table {
    width: 100%;
    margin: 0;
}

#adminPortal h1,
#adminPortal h2,
#adminPortal h3,
#adminPortal h4,
#adminPortal h5,
#adminPortal h6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Override marketing button typography (uppercase + big letter-spacing) */
#adminPortal .btn {
    text-transform: none;
    letter-spacing: normal;
}

/* Ensure admin section headers are not centered by site styles */
#adminPortal .section-header {
    text-align: left;
}

/* Hidden on desktop; shown/positioned by mobile CSS */
.mobile-menu-toggle {
    display: none;
}

/* Ensure admin portal is hidden by default */
#adminPortal {
    display: none !important;
}

#adminPortal.show {
    display: flex !important;
    min-height: 100vh;
}

/* This app also loads the marketing site styles.css which includes legacy admin styles
   (notably `.admin-main { margin-left: 260px; }` for a fixed sidebar).
   Our tenant admin portal uses a flex sidebar + content layout, so force-reset offsets. */
#adminPortal .admin-main {
    margin-left: 0 !important;
    display: block;
}

#adminPortal .admin-portal {
    gap: 0;
}

/* Soft background for the portal area (keeps login screen unchanged) */
#adminPortal.show {
    background:
        radial-gradient(1200px 700px at 15% 5%, rgba(212, 175, 55, 0.10), transparent 55%),
        radial-gradient(900px 540px at 95% 0%, rgba(102, 126, 234, 0.10), transparent 55%),
        var(--admin-bg);
}

/* Modern Sidebar Design */
.admin-sidebar {
    width: 280px;
    background:
        radial-gradient(800px 500px at 10% 0%, rgba(212, 175, 55, 0.10), transparent 60%),
        linear-gradient(180deg, var(--admin-nav) 0%, var(--admin-nav-2) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    position: relative;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-header {
    padding: 1.75rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.sidebar-header .logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
    transition: opacity 0.2s;
}

.sidebar-header .logo a:hover {
    opacity: 0.9;
}

.sidebar-header .logo span {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.sidebar-toggle {
    display: none;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: background 0.2s;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    margin: 5px 0;
    border-radius: 2px;
    transition: all 0.3s;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 0;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 1.5rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin: 0 0.75rem;
    border-radius: 10px;
}

.sidebar-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.22);
}

.sidebar-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #667eea;
    border-radius: 0 2px 2px 0;
    opacity: 0;
    transition: opacity 0.2s;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateX(2px);
}

.sidebar-link.active {
    background: rgba(102, 126, 234, 0.15);
    color: #fff;
    font-weight: 600;
}

.sidebar-link.active {
    background: rgba(212, 175, 55, 0.14);
}

.sidebar-link.active::before {
    opacity: 1;
}

.sidebar-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

/* Icon styles with emojis */
.sidebar-link[data-tab="fnb"] .sidebar-icon::before {
    content: '🍽️';
}

.sidebar-link[data-tab="staff-management"] .sidebar-icon::before {
    content: '👥';
}

.sidebar-link[data-tab="settings"] .sidebar-icon::before {
    content: '⚙️';
}

.sidebar-text {
    flex: 1;
}

/* Main Content Area */
.admin-content-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.admin-header {
    padding: 1.1rem var(--admin-page-pad);
    background: rgba(255, 255, 255, 0.80);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: var(--admin-shadow-sm);
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: var(--admin-text);
    letter-spacing: -0.02em;
}

.admin-main {
    padding: var(--admin-page-pad);
    flex: 1;
    overflow: auto;
    overflow-x: hidden;
    min-width: 0;
}

/* Keep content comfortably readable on wide screens */
#adminPortal .tab-pane {
    max-width: var(--admin-content-max);
    margin: 0 auto;
}

#adminPortal .tab-pane.active {
    width: 100%;
}

/* Better scrollbars (WebKit) */
.admin-main::-webkit-scrollbar {
    height: 10px;
    width: 10px;
}
.admin-main::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.18);
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.8);
}
.admin-main::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.05);
}

/* Modern Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--admin-ring);
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--admin-accent) 0%, var(--admin-accent-2) 100%);
    color: var(--admin-accent-ink);
    box-shadow: 0 10px 22px rgba(212, 175, 55, 0.22);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(212, 175, 55, 0.26);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.86);
    color: #27324a;
    border: 1px solid var(--admin-border);
    box-shadow: var(--admin-shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(15, 23, 42, 0.18);
    transform: translateY(-1px);
    box-shadow: var(--admin-shadow-md);
}

/* Card Styles */
.card {
    background: var(--admin-surface);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow-sm);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--admin-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

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

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--admin-border);
    background: rgba(15, 23, 42, 0.02);
}

.card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--admin-text);
}

.card-body {
    padding: 1.5rem;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.section-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--admin-text);
    letter-spacing: -0.03em;
}

.section-header p {
    margin: 0.5rem 0 0;
    color: var(--admin-muted);
    font-size: 14px;
}

/* Make inline-styled form controls look consistent without breaking layout */
#adminPortal input,
#adminPortal select,
#adminPortal textarea {
    border-radius: 12px !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    background: rgba(255, 255, 255, 0.92) !important;
}

#adminPortal input:focus,
#adminPortal select:focus,
#adminPortal textarea:focus {
    border-color: rgba(212, 175, 55, 0.70) !important;
    box-shadow: 0 0 0 4px var(--admin-ring) !important;
}

/* Form Improvements */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 14px;
    font-family: inherit;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #1a202c;
    transition: all 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 14px;
    color: #2d3748;
}

/* Menu Grid Enhancement */
#menuItemsGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.menu-item-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
    cursor: pointer;
}

.menu-item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #cbd5e0;
}

.menu-item-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: linear-gradient(135deg, #f5f7fa 0%, #e2e8f0 100%);
}

.menu-item-content {
    padding: 1rem;
}

.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.menu-item-name {
    font-weight: 600;
    font-size: 15px;
    color: #1a202c;
    line-height: 1.3;
}

.menu-item-type {
    font-size: 16px;
    line-height: 1;
}

.menu-item-category {
    display: inline-block;
    padding: 4px 10px;
    background: #edf2f7;
    color: #4a5568;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
}

.menu-item-price {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
    margin: 0.5rem 0;
}

.menu-item-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.menu-item-actions button {
    flex: 1;
    padding: 8px;
    font-size: 13px;
    border-radius: 6px;
}

/* Table Improvements */
.table-container {
    background: var(--admin-surface-solid);
    border-radius: var(--admin-radius);
    overflow: hidden;
    box-shadow: var(--admin-shadow-sm);
    border: 1px solid var(--admin-border);
}

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

.admin-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.03), rgba(15, 23, 42, 0.02));
}

.admin-table tbody tr:nth-child(odd) {
    background: rgba(15, 23, 42, 0.01);
}

.admin-table tbody tr:hover {
    background: rgba(212, 175, 55, 0.07);
}

#adminPortal footer {
    background: rgba(255, 255, 255, 0.70);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--admin-border) !important;
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

.admin-table thead {
    background: #f7fafc;
}

.admin-table th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e2e8f0;
}

.admin-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #edf2f7;
    font-size: 14px;
    color: #2d3748;
}

.admin-table tbody tr {
    transition: background 0.2s;
}

.admin-table tbody tr:hover {
    background: #f7fafc;
}

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

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.status-available {
    background: #c6f6d5;
    color: #22543d;
}

.status-unavailable {
    background: #fed7d7;
    color: #742a2a;
}

.status-paid {
    background: #c6f6d5;
    color: #22543d;
}

.status-pending {
    background: #feebc8;
    color: #7c2d12;
}

/* Staff Login Page Styles */
.staff-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a0a08 0%, #5e0f23 50%, #8b1538 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Animated background elements */
.staff-login-container::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 215, 180, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -200px;
    right: -200px;
    animation: float 20s ease-in-out infinite;
}

.staff-login-container::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 215, 180, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -150px;
    left: -150px;
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.1); }
}

.staff-login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
    max-width: 480px;
    width: 100%;
    padding: 50px 45px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
}

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

.staff-login-header {
    text-align: center;
    margin-bottom: 40px;
}

.staff-logo {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 4px;
    background: linear-gradient(135deg, #5e0f23 0%, #8b1538 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 25px;
    font-family: 'Playfair Display', serif;
    position: relative;
    display: inline-block;
}

.staff-logo::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #5e0f23, transparent);
}

.staff-login-header h1 {
    font-size: 2.2rem;
    color: #2c1810;
    margin-bottom: 12px;
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

.staff-login-header p {
    color: #666;
    font-size: 0.98rem;
    line-height: 1.6;
}

.staff-auth-form {
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #2c1810;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 14px 18px 14px 45px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #fafafa;
}

.form-group input:focus {
    outline: none;
    border-color: #5e0f23;
    background: white;
    box-shadow: 0 4px 12px rgba(94, 15, 35, 0.15);
    transform: translateY(-1px);
}

/* Input icons for sign-in form */
#staffSignInForm .form-group:nth-of-type(1)::before {
    content: '📧';
    position: absolute;
    left: 16px;
    top: 43px;
    font-size: 1.2rem;
    pointer-events: none;
}

#staffSignInForm .form-group:nth-of-type(2)::before {
    content: '🔒';
    position: absolute;
    left: 16px;
    top: 43px;
    font-size: 1.2rem;
    pointer-events: none;
}

#staffSignInForm .form-group:nth-of-type(3)::before {
    content: '🔑';
    position: absolute;
    left: 16px;
    top: 43px;
    font-size: 1.2rem;
    pointer-events: none;
}

/* Input icons for sign-up form */
#staffSignUpForm .form-group:nth-of-type(1)::before {
    content: '👤';
    position: absolute;
    left: 16px;
    top: 43px;
    font-size: 1.2rem;
    pointer-events: none;
}

#staffSignUpForm .form-group:nth-of-type(2)::before {
    content: '👤';
    position: absolute;
    left: 16px;
    top: 43px;
    font-size: 1.2rem;
    pointer-events: none;
}

#staffSignUpForm .form-group:nth-of-type(3)::before {
    content: '📧';
    position: absolute;
    left: 16px;
    top: 43px;
    font-size: 1.2rem;
    pointer-events: none;
}

#staffSignUpForm .form-group:nth-of-type(4)::before {
    content: '🔒';
    position: absolute;
    left: 16px;
    top: 43px;
    font-size: 1.2rem;
    pointer-events: none;
}

#staffSignUpForm .form-group:nth-of-type(5)::before {
    content: '🔑';
    position: absolute;
    left: 16px;
    top: 43px;
    font-size: 1.2rem;
    pointer-events: none;
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #888;
    font-size: 0.85rem;
    font-style: italic;
}

.form-error {
    background: linear-gradient(135deg, #ffe5e5 0%, #ffcccb 100%);
    border: 2px solid #ff6b6b;
    border-left: 5px solid #dc3545;
    padding: 14px 18px;
    margin-bottom: 25px;
    border-radius: 10px;
    color: #c00;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: shake 0.4s ease-in-out;
}

.form-error::before {
    content: '⚠️';
    font-size: 1.2rem;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.btn-staff-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #5e0f23 0%, #8b1538 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn-staff-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-staff-primary:hover::before {
    left: 100%;
}

.btn-staff-primary:hover {
    background: linear-gradient(135deg, #4a0b1c 0%, #6e1229 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(94, 15, 35, 0.4);
}

.btn-staff-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(94, 15, 35, 0.3);
}

.staff-divider {
    text-align: center;
    margin: 35px 0;
    position: relative;
}

.staff-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #e0e0e0, transparent);
}

.staff-divider span {
    background: white;
    padding: 0 20px;
    color: #888;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
    font-weight: 500;
}

.btn-staff-secondary {
    width: 100%;
    padding: 16px;
    background: white;
    color: #5e0f23;
    border: 2px solid #5e0f23;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn-staff-secondary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: #5e0f23;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: -1;
}

.btn-staff-secondary:hover::before {
    width: 300%;
    height: 300%;
}

.btn-staff-secondary:hover {
    color: white;
    border-color: #5e0f23;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(94, 15, 35, 0.25);
}

.btn-back-to-signin {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: #5e0f23;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-back-to-signin:hover {
    background: #f9f9f9;
    border-color: #5e0f23;
    transform: translateX(-3px);
}

.staff-footer {
    margin-top: 35px;
    text-align: center;
    padding-top: 25px;
    border-top: 2px solid #f0f0f0;
}

.staff-footer a {
    color: #5e0f23;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.staff-footer a:hover {
    color: #8b1538;
    transform: translateX(-3px);
}

.help-text {
    margin-top: 12px;
    color: #999;
    font-size: 0.85rem;
    font-style: italic;
}

/* Dashboard Grid Layouts */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.dashboard-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dashboard-card h3 {
    color: #2c1810;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.dashboard-card p {
    color: #666;
    margin: 8px 0;
    font-size: 0.95rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-header h2 {
    color: #2c1810;
    font-size: 1.8rem;
}

.search-input {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    min-width: 250px;
}

.search-input:focus {
    outline: none;
    border-color: #5e0f23;
}

/* Room Inventory Cards */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.room-inventory-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.room-inventory-card:hover {
    border-color: #5e0f23;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.room-inventory-card h3 {
    color: #2c1810;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.room-details {
    margin: 15px 0;
}

.room-details p {
    margin: 8px 0;
    color: #666;
}

.status-available {
    background: #e8f5e9;
    color: #388e3c;
}

.status-limited {
    background: #fff3e0;
    color: #f57c00;
}

/* Reports and Marketing Grids */
.reports-grid,
.marketing-grid,
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.report-card,
.marketing-card,
.property-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s ease;
}

.report-card:hover,
.marketing-card:hover,
.property-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.report-card h3,
.marketing-card h3,
.property-card h3 {
    color: #2c1810;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.report-card p,
.marketing-card p,
.property-card p {
    color: #666;
    margin-bottom: 20px;
}

/* AI Assistant */
.ai-assistant-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
}

.ai-chat-box {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 600px;
}

.ai-messages {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
}

.ai-message {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.ai-message.user {
    flex-direction: row-reverse;
}

.ai-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    background: #f5f5f5;
    flex-shrink: 0;
}

.ai-content {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 12px;
    max-width: 80%;
}

.ai-message.user .ai-content {
    background: #5e0f23;
    color: white;
}

.ai-content p {
    margin: 8px 0;
}

.ai-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.ai-input-container {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

.ai-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
}

.ai-input:focus {
    outline: none;
    border-color: #5e0f23;
}

.ai-suggestions {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ai-suggestions h3 {
    color: #2c1810;
    margin-bottom: 20px;
}

.suggestion-btn {
    width: 100%;
    padding: 12px;
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
}

.suggestion-btn:hover {
    background: #5e0f23;
    color: white;
    border-color: #5e0f23;
}

.stat-change {
    display: block;
    font-size: 0.85rem;
    margin-top: 5px;
    color: #666;
}

.stat-change.positive {
    color: #388e3c;
}

.btn-action {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 5px 8px;
    margin: 0 2px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.btn-action:hover {
    background: #f5f5f5;
}

/* Staff role badges */
.status-badge.status-admin {
    background: linear-gradient(135deg, #8b1538 0%, #c41e3a 100%);
    color: white;
    font-weight: 600;
}

.status-badge.status-manager {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%);
    color: white;
    font-weight: 600;
}

.status-badge.status-staff {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.status-badge.status-unavailable {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    font-weight: 600;
}

/* Mobile menu overlay */
body.sidebar-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

@media (max-width: 768px) {
    body.sidebar-open::before {
        display: block;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .ai-assistant-container {
        grid-template-columns: 1fr;
    }
    
    .ai-suggestions {
        order: -1;
    }

    .admin-sidebar {
        width: 200px;
    }

    .admin-content {
        margin-left: 200px;
    }
}

@media (max-width: 768px) {
    .staff-login-card {
        padding: 30px 25px;
        margin: 20px;
    }
    
    .staff-login-header h1 {
        font-size: 24px;
    }

    .admin-sidebar {
        position: fixed;
        left: -260px;
        width: 260px;
        transition: left 0.28s ease;
        z-index: 1000;
    }

    .admin-sidebar.mobile-open {
        left: 0;
    }

    .admin-content {
        margin-left: 0;
        padding: 18px 14px;
    }

    .admin-header {
        padding: 15px;
    }

    .mobile-menu-toggle {
        display: block;
        position: fixed;
        top: 1rem;
        right: 1rem;
        left: auto;
        z-index: 10001;
        pointer-events: auto;
        background: var(--primary-color);
        color: white;
        border: none;
        padding: 10px 12px;
        border-radius: 6px;
        cursor: pointer;
        font-size: 17px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    }

    /* Improve sidebar link hit area and typography for mobile */
    .admin-sidebar .sidebar-nav .sidebar-link {
        padding: 14px 16px;
        font-size: 15px;
    }

    .admin-sidebar .sidebar-footer { padding: 12px 16px; }
    .sidebar-footer .user-info .user-name { font-size: 14px; }
    .sidebar-footer .user-info .user-role { font-size: 12px; color: #ddd; }

    .dashboard-grid,
    .rooms-grid,
    .reports-grid,
    .marketing-grid,
    .property-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .search-input {
        width: 100%;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-number {
        font-size: 24px;
    }

    .table-container {
        overflow-x: auto;
    }

    .data-table {
        min-width: 600px;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
        margin: 20px auto;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .btn-group {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .staff-login-card {
        padding: 20px 15px;
        margin: 10px;
    }

    .staff-logo {
        font-size: 18px;
    }

    .staff-login-header h1 {
        font-size: 20px;
    }

    .staff-login-header p {
        font-size: 13px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 14px;
        padding: 10px;
    }

    .btn-staff-primary,
    .btn-primary,
    .btn-secondary {
        padding: 12px 20px;
        font-size: 14px;
    }

    .admin-header h1 {
        font-size: 18px;
    }

    .tab-buttons {
        flex-wrap: wrap;
        gap: 8px;
    }

    .tab-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .stat-card {
        padding: 12px;
    }

    .stat-label {
        font-size: 11px;
    }

    .stat-number {
        font-size: 20px;
    }

    #otaPortalModal .modal-content {
        margin: 10px;
        padding: 20px 15px;
    }
}

/* ===================================
   Food & Beverage Management Styles
   =================================== */

.fnb-view-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.fnb-view-buttons .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.fnb-view-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 29, 50, 0.3);
}

.menu-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.status-badge {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.status-available {
    background: #d4edda;
    color: #155724;
}

.status-unavailable {
    background: #f8d7da;
    color: #721c24;
}

.status-limited {
    background: #fff3cd;
    color: #856404;
}

/* Invoice Status Badges */
.status-paid {
    background: #d4edda;
    color: #155724;
}

.status-unpaid {
    background: #f8d7da;
    color: #721c24;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-partial {
    background: #cce5ff;
    color: #004085;
}

#orderMenuGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    max-height: 70vh;
    overflow-y: auto;
    padding: 0.5rem;
}

.order-sidebar {
    position: sticky;
    top: 0;
    height: fit-content;
    max-height: 80vh;
    overflow-y: auto;
}

/* Category filter buttons */
.category-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.category-filters button {
    padding: 0.5rem 1rem;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.category-filters button:hover,
.category-filters button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Order cart items */
#orderItemsList > div {
    transition: background 0.2s ease;
}

#orderItemsList > div:hover {
    background: #f8f9fa;
}

/* Tax breakdown styling */
#orderTaxBreakdown {
    font-size: 13px;
    color: #666;
    padding: 0.5rem 0;
}

#orderTaxBreakdown > div {
    margin-bottom: 0.25rem;
}

/* Menu item hover effect */
.menu-item-card {
    transition: all 0.3s ease;
}

.menu-item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15) !important;
}

/* Order history table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: #f8f9fa;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.admin-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
}

.admin-table tbody tr:hover {
    background: #f8f9fa;
}

/* Marketing Studio Template Cards */
.template-card {
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.template-card:active {
    transform: translateY(-2px);
}

/* Marketing Studio Modal */
#marketingStudioModal .modal {
    backdrop-filter: blur(4px);
}

/* Smooth animations for visual preview */
#visualPreviewContent {
    transition: all 0.3s ease;
}

/* Responsive adjustments for F&B */
@media (max-width: 768px) {
    .menu-items-grid {
        grid-template-columns: 1fr;
    }
    
    #orderMenuGrid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .fnb-view-buttons {
        flex-direction: column;
    }
    
    .fnb-view-buttons .btn {
        width: 100%;
    }
    
    .order-sidebar {
        position: relative;
        max-height: none;
    }
    
    /* Marketing Studio responsive */
    #marketingStudioModal > div {
        width: 100% !important;
        margin: 10px;
    }
    
    #templateGallery {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ================================
   Classy theme final overrides
   (high-specificity so legacy rules
   at the bottom can't flatten styling)
   ================================ */

#adminPortal .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid rgba(15, 23, 42, 0.10);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

#adminPortal .status-available,
#adminPortal .status-paid {
    background: rgba(16, 185, 129, 0.12);
    color: #0f766e;
}

#adminPortal .status-unavailable,
#adminPortal .status-unpaid {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

#adminPortal .status-limited,
#adminPortal .status-pending {
    background: rgba(245, 158, 11, 0.14);
    color: #92400e;
}

#adminPortal .status-partial {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

#adminPortal .btn-action {
    border-radius: 10px;
    padding: 6px 10px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255, 255, 255, 0.75);
    box-shadow: var(--admin-shadow-sm);
}

#adminPortal .btn-action:hover {
    background: rgba(212, 175, 55, 0.10);
}

#adminPortal .table-container {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

#adminPortal .admin-table th,
#adminPortal .admin-table td {
    border-bottom-color: rgba(15, 23, 42, 0.08);
}
