/* Core Design System for COMEDOR GI LATAM */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #0f4c81;       /* GI LATAM Classic Navy Blue */
    --primary-light: #1b6ca8;      /* Hover Blue */
    --primary-bg-light: #e6f0fa;   /* Light Blue Accent Background */
    --text-dark: #2d3748;          /* Slate Dark Grey for Text */
    --text-muted: #718096;         /* Medium Grey for secondary text */
    --bg-main: #f7fafc;            /* Off-White Background */
    --bg-card: #ffffff;            /* White Card Background */
    --border-color: #e2e8f0;       /* Soft Light Grey for borders */
    --accent-success: #48bb78;     /* Green for Successful Alerts */
    --accent-danger: #e53e3e;      /* Red for Errors */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(15, 76, 129, 0.08), 0 4px 6px -2px rgba(15, 76, 129, 0.04);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Layout Utilities */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header & Public Dining View Style */
.dining-body {
    background: linear-gradient(135deg, #e9f2fa 0%, #ffffff 50%, #f0f4f8 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header.dining-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-badge {
    background-color: var(--primary-color);
    color: #ffffff;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.btn-admin-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--primary-color);
    background-color: transparent;
    transition: var(--transition-fast);
}

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

/* Dining Dashboard grid */
.dining-grid {
    display: grid;
    grid-template-columns: 1.2fr 1.8fr;
    gap: 2rem;
    padding: 2rem;
    flex: 1;
}

@media (max-width: 992px) {
    .dining-grid {
        grid-template-columns: 1fr;
    }
}

/* Cards & UI elements */
.premium-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(15, 76, 129, 0.05);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
}

/* Keypad & Input Form */
.numpad-input-group {
    margin-bottom: 1.25rem;
}

.numpad-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.numpad-display-wrapper {
    position: relative;
}

.numpad-display {
    width: 100%;
    background-color: var(--bg-main);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-dark);
    text-align: center;
    transition: var(--transition-fast);
}

.numpad-display:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(15, 76, 129, 0.1);
}

.pin-display {
    letter-spacing: 6px;
}

/* Grid Keyboard */
.keyboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.key-btn {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.85rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.1s ease;
    user-select: none;
}

.key-btn:hover {
    background-color: var(--primary-bg-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.key-btn:active {
    transform: scale(0.95);
    background-color: #d0e1f3;
}

.key-btn.action-key {
    background-color: #edf2f7;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
}

.key-btn.action-key:hover {
    background-color: var(--border-color);
    color: var(--text-dark);
}

.key-btn.submit-key {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.key-btn.submit-key:hover {
    background-color: var(--primary-light);
}

.key-btn.submit-key:active {
    background-color: #124069;
}

/* Check-in Alerts */
.status-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background-color: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 2.5rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    text-align: center;
    max-width: 420px;
    width: 90%;
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-normal);
}

.status-alert.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.overlay-blur {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(45, 55, 72, 0.4);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.overlay-blur.show {
    opacity: 1;
    pointer-events: auto;
}

/* Success Checkmark Circle */
.checkmark-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #e6fffa;
    border: 3px solid var(--accent-success);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    animation: pulseSuccess 2s infinite;
}

.checkmark-icon {
    font-size: 2.5rem;
    color: var(--accent-success);
    font-weight: bold;
}

.error-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #fff5f5;
    border: 3px solid var(--accent-danger);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.error-icon {
    font-size: 2.5rem;
    color: var(--accent-danger);
    font-weight: bold;
}

.alert-message-main {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.alert-message-sub {
    font-size: 1rem;
    color: var(--text-muted);
}

@keyframes pulseSuccess {
    0% {
        box-shadow: 0 0 0 0 rgba(72, 187, 120, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(72, 187, 120, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(72, 187, 120, 0);
    }
}

/* Premium Table styles */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.premium-table th {
    background-color: #f1f5f9;
    color: var(--primary-color);
    font-weight: 700;
    padding: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.premium-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
    font-size: 0.95rem;
}

.premium-table tbody tr {
    transition: background-color var(--transition-fast);
}

.premium-table tbody tr:hover {
    background-color: #f8fafc;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success {
    background-color: #def7ec;
    color: #03543f;
}

.badge-danger {
    background-color: #fde8e8;
    color: #9b1c1c;
}

/* Admin Dashboard CSS layout */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background-color: var(--primary-color);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    flex-shrink: 0;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.sidebar-subtitle {
    font-size: 0.75rem;
    color: #a0aec0;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

.sidebar-menu {
    list-style: none;
    padding: 1.5rem 0;
    flex: 1;
}

.sidebar-item {
    margin-bottom: 0.5rem;
    padding: 0 1rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #cbd5e0;
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.sidebar-link:hover, .sidebar-item.active .sidebar-link {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.sidebar-item.active .sidebar-link {
    background-color: rgba(255, 255, 255, 0.15);
    font-weight: 600;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background-color: var(--bg-main);
}

.admin-topbar {
    height: 70px;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    box-shadow: var(--shadow-sm);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-bg-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    border: 1px solid var(--border-color);
}

.admin-content {
    padding: 2rem;
    flex: 1;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: #ffffff;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

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

.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.stat-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background-color: var(--primary-bg-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

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

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: #ffffff;
    color: var(--text-dark);
    font-family: inherit;
    transition: border-color var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.1);
}

/* Button UI */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

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

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

.btn-secondary {
    background-color: #e2e8f0;
    color: var(--text-dark);
}

.btn-secondary:hover {
    background-color: #cbd5e0;
}

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

.btn-success:hover {
    background-color: #38a169;
}

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

.btn-danger:hover {
    background-color: #c53030;
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-dark);
}

.btn-outline:hover {
    background-color: #f7fafc;
    border-color: var(--text-muted);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Flex helper classes */
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gap-2 {
    gap: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

/* Login Card page */
.login-body {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a365d 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card {
    background-color: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    width: 100%;
    max-width: 440px;
    padding: 2.5rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    display: inline-flex;
    background-color: var(--primary-color);
    color: #ffffff;
    font-weight: 800;
    font-size: 1.5rem;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Custom error message */
.text-danger {
    color: var(--accent-danger);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.alert-error-container {
    background-color: #fff5f5;
    border: 1px solid #feb2b2;
    color: #c53030;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.alert-success-container {
    background-color: #f0fff4;
    border: 1px solid #9ae6b4;
    color: #276749;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

/* Pagination container spacing */
.pagination-container {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

/* Filter panel style */
.filter-panel {
    background-color: #ffffff;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: flex-end;
}

/* Toggle switch stylings */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .slider:before {
  -webkit-transform: translateX(24px);
  -ms-transform: translateX(24px);
  transform: translateX(24px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.switch-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Custom Pagination styling */
.custom-pagination .page-item .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    min-width: 36px;
    height: 36px;
}

.custom-pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    cursor: default;
}

.custom-pagination .page-item .page-link:hover:not(.disabled) {
    background-color: var(--primary-bg-light);
    border-color: var(--primary-color);
    color: var(--primary-light);
}

.custom-pagination .page-item.disabled .page-link {
    color: #a0aec0;
    background-color: #f7fafc;
    border-color: #e2e8f0;
    cursor: not-allowed;
    pointer-events: none;
}
