/* === Manager Command Center — Base Styles === */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --danger: #dc2626;
  --warning: #d97706;
  --success: #16a34a;
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --nav-bg: #0f172a;
  --nav-text: #e2e8f0;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }

/* === NAV === */
.navbar {
  background: var(--nav-bg);
  color: var(--nav-text);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  height: 56px;
  gap: 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1rem; white-space: nowrap; }
.nav-logo { font-size: 1.3rem; }
.nav-links { display: flex; gap: 0.25rem; flex: 1; }
.nav-link { color: #94a3b8; text-decoration: none; padding: 0.4rem 0.75rem; border-radius: var(--radius); font-size: 0.875rem; transition: all 0.15s; }
.nav-link:hover { color: #fff; background: #1e293b; }
.nav-user { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; }
.nav-username { color: #cbd5e1; font-size: 0.875rem; }
.btn-logout { background: #1e293b; color: #94a3b8; border: 1px solid #334155; padding: 0.3rem 0.75rem; border-radius: var(--radius); cursor: pointer; font-size: 0.8rem; transition: all 0.15s; }
.btn-logout:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

/* === NAV DROPDOWN === */
.nav-dropdown { position: relative; }
.nav-dropdown-btn { background: none; border: none; cursor: pointer; font-family: inherit; }
.nav-dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: #1e293b; border: 1px solid #334155; border-radius: var(--radius); min-width: 180px; z-index: 200; box-shadow: 0 8px 24px rgba(0,0,0,0.3); padding: 0.375rem 0; }
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-item { display: block; padding: 0.5rem 1rem; color: #cbd5e1; text-decoration: none; font-size: 0.875rem; transition: all 0.1s; }
.nav-dropdown-item:hover { background: #334155; color: #fff; }

/* === ROLE BADGES === */
.role-badge { font-size: 0.7rem; padding: 0.2rem 0.5rem; border-radius: 999px; font-weight: 600; text-transform: uppercase; }
.role-admin { background: #7c3aed; color: #fff; }
.role-executive { background: #0284c7; color: #fff; }
.role-manager { background: #16a34a; color: #fff; }
.role-assistant_manager { background: #64748b; color: #fff; }

/* === MAIN CONTENT === */
.main-content { padding: 1.5rem; max-width: 1400px; margin: 0 auto; }

/* === DASHBOARD GRID === */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.widget-full { grid-column: 1 / -1; }
.widget-half { grid-column: span 1; }
.widget-header { display: flex; align-items: center; justify-content: space-between; padding: 0.875rem 1rem; border-bottom: 1px solid var(--border); cursor: pointer; user-select: none; }
.widget-header h2 { font-size: 0.9rem; font-weight: 600; display: flex; align-items: center; gap: 0.5rem; }
.collapse-icon { font-size: 0.75rem; color: var(--text-muted); transition: transform 0.2s; }
.widget-body { padding: 1rem; }
.widget.collapsed .widget-body { display: none; }
.widget.collapsed .collapse-icon { transform: rotate(-90deg); }

/* === ALERT BANNERS === */
.alert-area { border: none; background: transparent; box-shadow: none; }
.alert-banner { border-radius: var(--radius); padding: 1rem; margin-bottom: 0.75rem; border-left: 4px solid; }
.alert-emergency { background: #fef2f2; border-color: var(--danger); }
.alert-urgent { background: #fffbeb; border-color: var(--warning); }
.alert-info { background: #eff6ff; border-color: var(--primary); }
.alert-meta { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.alert-type-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; padding: 0.15rem 0.4rem; border-radius: 4px; }
.alert-emergency .alert-type-label { background: var(--danger); color: #fff; }
.alert-urgent .alert-type-label { background: var(--warning); color: #fff; }
.alert-info .alert-type-label { background: var(--primary); color: #fff; }
.alert-time { color: var(--text-muted); font-size: 0.8rem; margin-left: auto; }
.alert-body { color: var(--text); margin-bottom: 0.75rem; font-size: 0.875rem; }
.alert-ack-form { display: flex; gap: 0.5rem; align-items: flex-start; }
.ack-notes { flex: 1; padding: 0.5rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.8rem; resize: vertical; min-height: 60px; font-family: inherit; }
.btn-acknowledge { background: var(--success); color: #fff; border: none; padding: 0.5rem 1rem; border-radius: var(--radius); cursor: pointer; font-size: 0.8rem; font-weight: 600; white-space: nowrap; }

/* === TASKS === */
.task-list { display: flex; flex-direction: column; gap: 0.5rem; }
.task-item { display: flex; align-items: center; justify-content: space-between; padding: 0.625rem; border: 1px solid var(--border); border-radius: var(--radius); gap: 0.5rem; }
.task-info { flex: 1; min-width: 0; }
.task-title { font-weight: 500; font-size: 0.875rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-meta { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.2rem; }
.task-status-form { display: flex; gap: 0.375rem; align-items: center; }
.due-date { font-size: 0.75rem; color: var(--text-muted); }

/* === PRIORITY BADGES === */
.priority-badge { font-size: 0.7rem; padding: 0.15rem 0.4rem; border-radius: 4px; font-weight: 600; text-transform: uppercase; }
.priority-low { background: #dcfce7; color: #15803d; }
.priority-medium { background: #fef9c3; color: #a16207; }
.priority-high { background: #fee2e2; color: #b91c1c; }
.priority-critical { background: var(--danger); color: #fff; }

/* === STATUS BADGES === */
.status-badge { font-size: 0.75rem; padding: 0.2rem 0.5rem; border-radius: 4px; font-weight: 500; }
.status-assigned { background: #e0f2fe; color: #0369a1; }
.status-in_progress { background: #fef3c7; color: #92400e; }
.status-completed { background: #dcfce7; color: #15803d; }
.status-verified { background: #e9d5ff; color: #7c3aed; }

/* === MESSAGES === */
.message-list { list-style: none; display: flex; flex-direction: column; gap: 0.375rem; }
.message-item { display: flex; gap: 0.5rem; padding: 0.5rem; border-radius: var(--radius); font-size: 0.85rem; }
.message-item.unread { background: #eff6ff; font-weight: 500; }
.msg-from { font-weight: 600; }
.msg-subject { flex: 1; color: var(--text-muted); }
.msg-time { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }

/* === REVIEWS === */
.review-list { display: flex; flex-direction: column; gap: 0.75rem; }
.review-item { padding: 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); }
.review-meta { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.4rem; }
.review-store { font-weight: 600; }
.platform-badge { font-size: 0.7rem; padding: 0.15rem 0.4rem; border-radius: 4px; font-weight: 600; text-transform: uppercase; }
.platform-yelp { background: #fce7f3; color: #be185d; }
.platform-google { background: #dbeafe; color: #1e40af; }
.review-stars { color: #f59e0b; letter-spacing: -1px; }
.review-body { font-size: 0.85rem; color: var(--text-muted); }

/* === QUICK LINKS === */
.quick-links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; }
.quick-link-card { display: flex; align-items: center; justify-content: center; padding: 1rem 0.5rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); font-size: 0.85rem; font-weight: 500; text-align: center; gap: 0.4rem; flex-direction: column; transition: all 0.15s; }
.quick-link-card:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-2px); }

/* === BUTTONS === */
.btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 1rem; border-radius: var(--radius); border: none; cursor: pointer; font-size: 0.875rem; font-weight: 500; text-decoration: none; transition: all 0.15s; font-family: inherit; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
.btn-full { width: 100%; justify-content: center; }

/* === FORMS === */
.form-control { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.875rem; font-family: inherit; color: var(--text); background: var(--surface); transition: border-color 0.15s; }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.75rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.status-select, .status-select-sm { padding: 0.3rem 0.5rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.8rem; font-family: inherit; }
.inline-form { display: flex; gap: 0.3rem; align-items: center; }

/* === AUTH === */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%); }
.auth-card { background: var(--surface); border-radius: 16px; padding: 2.5rem; width: 100%; max-width: 400px; box-shadow: var(--shadow-md); text-align: center; }
.auth-card-wide { max-width: 480px; }
.auth-logo { font-size: 3rem; margin-bottom: 0.5rem; }
.auth-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.4rem; }
.auth-subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.auth-notice { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.875rem; }
.notice-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.notice-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 0.75rem; width: 100%; padding: 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.9rem; transition: all 0.15s; }
.btn-google:hover { background: var(--bg); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.otp-input { text-align: center; font-size: 1.5rem; letter-spacing: 0.5rem; margin-bottom: 1rem; }
.qr-container { display: flex; justify-content: center; margin: 1rem 0; }
.qr-code { border: 4px solid var(--border); border-radius: var(--radius); }
.totp-secret { font-size: 0.75rem; background: var(--bg); padding: 0.2rem 0.4rem; border-radius: 4px; word-break: break-all; }

/* === TABLE === */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: var(--bg); padding: 0.625rem 0.875rem; text-align: left; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); border-bottom: 2px solid var(--border); }
.data-table td { padding: 0.625rem 0.875rem; border-bottom: 1px solid var(--border); font-size: 0.875rem; vertical-align: middle; }
.data-table tr:hover td { background: var(--bg); }
.task-table-wrapper { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: auto; }
.text-muted { color: var(--text-muted); }

/* === MISC === */
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; background: var(--primary); color: #fff; border-radius: 999px; font-size: 0.7rem; font-weight: 700; }
.badge-red { background: var(--danger); }
.badge-orange { background: var(--warning); }
.empty-state { color: var(--text-muted); text-align: center; padding: 2rem; font-size: 0.875rem; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.page-header h1 { font-size: 1.3rem; font-weight: 700; }
.form-card { background: var(--surface); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); max-width: 700px; }

/* === MODAL === */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 200; }
.modal { background: var(--surface); border-radius: var(--radius); padding: 1.5rem; width: 100%; max-width: 480px; box-shadow: var(--shadow-md); }
.modal h3 { margin-bottom: 1rem; font-size: 1.1rem; }
.modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1rem; }

/* === FAB === */
.floating-action { position: fixed; bottom: 2rem; right: 2rem; }
.fab { width: 56px; height: 56px; border-radius: 50%; background: var(--danger); color: #fff; border: none; font-size: 1.3rem; cursor: pointer; box-shadow: 0 4px 16px rgba(220,38,38,0.4); transition: all 0.15s; }
.fab:hover { transform: scale(1.1); }

/* === FLASH MESSAGES === */
.flash { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.875rem; font-weight: 500; }
.flash-success { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.flash-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.flash-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* === FILTER BAR === */
.filter-bar { margin-bottom: 1rem; }
.filter-form { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.filter-form .form-control { width: auto; flex: 1; min-width: 140px; }

/* === PAGINATION === */
.pagination { display: flex; gap: 0.375rem; margin-top: 1rem; flex-wrap: wrap; }
.page-btn { padding: 0.375rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); font-size: 0.85rem; }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:hover:not(.active) { background: var(--bg); }

/* === AUDIT LOG === */
.action-code { background: var(--bg); padding: 0.15rem 0.4rem; border-radius: 4px; font-size: 0.75rem; font-family: monospace; }
.detail-pre { background: var(--bg); padding: 0.5rem; border-radius: var(--radius); font-size: 0.75rem; max-width: 400px; overflow: auto; margin-top: 0.25rem; }

/* === PROFILE PAGE === */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.profile-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.profile-card h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.875rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
.info-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.info-table td { padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--border); }
.info-table td:first-child { color: var(--text-muted); font-weight: 500; width: 40%; }
.activity-list { list-style: none; display: flex; flex-direction: column; gap: 0.375rem; }
.activity-item { display: flex; gap: 0.5rem; align-items: center; font-size: 0.8rem; padding: 0.375rem; border-radius: 4px; background: var(--bg); }
.activity-action { font-family: monospace; font-weight: 600; color: var(--primary); }
.activity-entity { color: var(--text-muted); }
.activity-time { margin-left: auto; color: var(--text-muted); white-space: nowrap; }

/* === MESSAGES === */
.messages-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.message-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.panel-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.875rem; display: flex; align-items: center; gap: 0.5rem; }
.message-full-list { list-style: none; display: flex; flex-direction: column; gap: 0; }
.message-full-item { border-bottom: 1px solid var(--border); }
.message-full-item:last-child { border-bottom: none; }
.message-full-item.unread { background: #f0f7ff; }
.message-link { display: block; padding: 0.75rem 0.5rem; text-decoration: none; color: var(--text); transition: background 0.15s; }
.message-link:hover { background: var(--bg); }
.msg-header-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.2rem; }
.msg-from-name { font-weight: 600; font-size: 0.875rem; }
.msg-timestamp { margin-left: auto; font-size: 0.75rem; color: var(--text-muted); }
.msg-subject-line { font-size: 0.85rem; font-weight: 500; color: var(--text); margin-bottom: 0.15rem; }
.msg-preview { font-size: 0.8rem; color: var(--text-muted); }
.group-tag { font-size: 0.7rem; background: #e9d5ff; color: #7c3aed; padding: 0.1rem 0.4rem; border-radius: 4px; font-weight: 600; }
.message-view-meta { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.875rem; }
.message-body-text { font-size: 0.9rem; line-height: 1.7; white-space: pre-wrap; }
.checkbox-label { flex-direction: row !important; align-items: center; gap: 0.5rem; cursor: pointer; }

/* === CALENDAR === */
.calendar-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.cal-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.cal-panel-full { grid-column: 1 / -1; }
.event-list { list-style: none; display: flex; flex-direction: column; gap: 0; }
.event-item { display: flex; gap: 0.875rem; align-items: flex-start; padding: 0.625rem 0.25rem; border-bottom: 1px solid var(--border); }
.event-item:last-child { border-bottom: none; }
.event-date-block { display: flex; flex-direction: column; align-items: center; min-width: 40px; background: #eff6ff; border-radius: var(--radius); padding: 0.3rem 0.5rem; }
.event-date-shared { background: #f0fdf4; }
.event-day { font-size: 0.65rem; font-weight: 700; color: var(--primary); text-transform: uppercase; }
.event-num { font-size: 1.1rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.event-time-block { display: flex; flex-direction: column; align-items: flex-end; min-width: 70px; }
.event-start-time { font-size: 0.8rem; font-weight: 600; color: var(--text); }
.event-end-time { font-size: 0.72rem; color: var(--text-muted); }
.event-allday { font-size: 0.72rem; font-weight: 600; color: var(--primary); background: #eff6ff; padding: 0.15rem 0.4rem; border-radius: 4px; }
.event-details { display: flex; flex-direction: column; gap: 0.15rem; flex: 1; }
.event-title { font-weight: 600; font-size: 0.875rem; }
.event-time { font-size: 0.78rem; color: var(--text-muted); }
.event-location { font-size: 0.75rem; color: var(--text-muted); }
.event-desc { font-size: 0.75rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; max-width: 500px; }
.event-attendees { font-size: 0.72rem; color: var(--text-muted); }
.cal-day-groups { display: flex; flex-direction: column; gap: 0; }
.cal-day-group { border-bottom: 2px solid var(--border); padding-bottom: 0.5rem; margin-bottom: 0.5rem; }
.cal-day-group:last-child { border-bottom: none; }
.cal-today .cal-day-header { background: #eff6ff; border-radius: var(--radius); padding: 0.4rem 0.75rem; margin-bottom: 0.25rem; }
.cal-day-header { display: flex; align-items: center; gap: 0.75rem; padding: 0.4rem 0.25rem; margin-bottom: 0.25rem; }
.cal-day-name { font-weight: 700; font-size: 0.9rem; }
.cal-day-date { font-size: 0.82rem; color: var(--text-muted); }
.today-badge { background: var(--primary); color: #fff; font-size: 0.68rem; padding: 0.15rem 0.5rem; border-radius: 999px; font-weight: 700; margin-left: auto; }

/* === REVIEW TRACKER === */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.stat-card-alert { border-color: var(--warning); background: #fffbeb; }
.stat-store-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
.stat-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; padding: 0.2rem 0; }
.stat-label { color: var(--text-muted); }
.stat-value { font-weight: 600; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.review-tracker-list { display: flex; flex-direction: column; gap: 0.875rem; }
.review-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.review-pending { border-left: 4px solid var(--warning); }
.review-responded { border-left: 4px solid var(--success); opacity: 0.85; }
.review-card-header { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; background: var(--bg); border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 0.5rem; }
.review-card-meta { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.review-store-tag { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.review-stars-lg { font-size: 1rem; letter-spacing: -1px; }
.star-filled { color: #f59e0b; }
.star-empty { color: #d1d5db; }
.review-rating-num { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.responded-badge { font-size: 0.75rem; background: #dcfce7; color: #15803d; padding: 0.2rem 0.6rem; border-radius: 999px; font-weight: 600; }
.pending-badge { font-size: 0.75rem; background: #fef3c7; color: #92400e; padding: 0.2rem 0.6rem; border-radius: 999px; font-weight: 600; }
.review-card-body { padding: 0.875rem 1rem; }
.review-author-date { font-size: 0.85rem; margin-bottom: 0.4rem; }
.review-text { font-size: 0.875rem; line-height: 1.6; color: var(--text); margin: 0; }
.review-card-footer { padding: 0.75rem 1rem; border-top: 1px solid var(--border); background: var(--bg); }
.responded-footer { font-size: 0.82rem; color: var(--text-muted); display: flex; flex-direction: column; gap: 0.25rem; }
.response-notes { font-style: italic; }
.respond-form { display: flex; gap: 0.5rem; align-items: center; }

/* === CHECKLISTS === */
.checklist-section { margin-bottom: 2rem; }
.section-title { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 0.75rem; }
.checklist-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.checklist-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.checklist-done { border-left: 4px solid var(--success); }
.checklist-pending { border-left: 4px solid var(--warning); }
.checklist-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.5rem; gap: 0.5rem; }
.checklist-name { font-weight: 600; font-size: 0.9rem; }
.checklist-meta { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.checklist-actions { display: flex; gap: 0.375rem; flex-wrap: wrap; }
.checklist-form { max-width: 800px; }
.checklist-section-card { margin-bottom: 1rem; }
.checklist-section-title { font-size: 0.9rem; font-weight: 700; color: var(--primary); margin-bottom: 0.875rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--border); }
.checklist-items { display: flex; flex-direction: column; gap: 0.625rem; }
.checklist-item { padding: 0.375rem 0; }
.checkbox-row { display: flex; align-items: flex-start; gap: 0.625rem; cursor: pointer; font-size: 0.875rem; font-weight: normal; flex-direction: row; margin: 0; }
.checklist-check { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; cursor: pointer; accent-color: var(--primary); }
.select-row, .input-row, .textarea-row { display: flex; flex-direction: column; gap: 0.3rem; }
.field-label { font-size: 0.85rem; font-weight: 500; color: var(--text); }
.form-control-inline { width: auto; max-width: 200px; }
.checklist-submit-bar { position: sticky; bottom: 0; background: var(--surface); border-top: 2px solid var(--border); padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; box-shadow: 0 -4px 12px rgba(0,0,0,0.08); border-radius: var(--radius) var(--radius) 0 0; }
.progress-info { flex: 1; }
.progress-bar-outer { background: var(--bg); border-radius: 999px; height: 6px; margin-top: 0.375rem; overflow: hidden; }
.progress-bar-inner { height: 100%; border-radius: 999px; background: var(--primary); transition: width 0.3s, background 0.3s; width: 0%; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.submission-item { display: flex; justify-content: space-between; align-items: flex-start; padding: 0.4rem 0; border-bottom: 1px solid var(--border); font-size: 0.875rem; }
.submission-item:last-child { border-bottom: none; }
.check-yes { color: var(--success); font-weight: 600; }
.check-no { color: var(--text-muted); }
.field-value { color: var(--text); max-width: 60%; text-align: right; }
.overview-table-wrap { overflow-x: auto; }
.overview-table th { white-space: nowrap; font-size: 0.75rem; }
.overview-check { display: inline-flex; align-items: center; padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.78rem; font-weight: 600; text-decoration: none; }
.overview-check.submitted { background: #dcfce7; color: #15803d; }
.overview-check.missing { background: #fef2f2; color: #991b1b; }

/* === AUDITS === */
.audit-items-grid { display: flex; flex-direction: column; gap: 0; }
.audit-item-row { display: grid; grid-template-columns: 220px 1fr; gap: 1rem; align-items: start; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.audit-item-row:last-child { border-bottom: none; }
.audit-item-name { font-weight: 500; font-size: 0.875rem; padding-top: 0.3rem; }
.audit-item-controls { display: flex; flex-direction: column; gap: 0.5rem; }
.condition-radio-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.condition-radio { display: flex; align-items: center; gap: 0.3rem; cursor: pointer; font-size: 0.78rem; font-weight: 500; padding: 0.25rem 0.6rem; border: 1px solid var(--border); border-radius: var(--radius); flex-direction: row; margin: 0; transition: all 0.15s; }
.condition-radio input { display: none; }
.condition-radio.good:has(input:checked) { background: #dcfce7; border-color: var(--success); color: #15803d; }
.condition-radio.fair:has(input:checked) { background: #fef9c3; border-color: #a16207; color: #a16207; }
.condition-radio.needs_repair:has(input:checked) { background: #fef3c7; border-color: var(--warning); color: var(--warning); }
.condition-radio.out_of_service:has(input:checked) { background: #fef2f2; border-color: var(--danger); color: var(--danger); }
.audit-note { font-size: 0.8rem; padding: 0.3rem 0.5rem; }
.photo-upload-area { display: flex; flex-direction: column; gap: 0.75rem; }
.photo-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; margin-top: 0.5rem; }
.photo-thumb { position: relative; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg); }
.photo-thumb img { width: 100%; height: 120px; object-fit: cover; display: block; }
.photo-remove { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,0.6); color: #fff; border: none; border-radius: 50%; width: 22px; height: 22px; cursor: pointer; font-size: 0.7rem; display: flex; align-items: center; justify-content: center; }
.photo-name { display: block; font-size: 0.7rem; padding: 0.25rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drive-photo-link { display: block; padding: 1rem; text-align: center; font-size: 0.8rem; text-decoration: none; color: var(--primary); }
.audit-view-list { display: flex; flex-direction: column; gap: 0; }
.audit-view-item { display: flex; justify-content: space-between; align-items: flex-start; padding: 0.6rem 0.25rem; border-bottom: 1px solid var(--border); }
.audit-view-item:last-child { border-bottom: none; }
.audit-view-item.condition-needs_repair { background: #fffbeb; }
.audit-view-item.condition-out_of_service { background: #fef2f2; }
.audit-view-name { font-size: 0.875rem; font-weight: 500; }
.audit-view-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.2rem; }
.condition-badge { font-size: 0.75rem; font-weight: 600; padding: 0.2rem 0.5rem; border-radius: 4px; }
.condition-badge.condition-good { background: #dcfce7; color: #15803d; }
.condition-badge.condition-fair { background: #fef9c3; color: #a16207; }
.condition-badge.condition-needs_repair { background: #fef3c7; color: #92400e; }
.condition-badge.condition-out_of_service { background: #fef2f2; color: #991b1b; }
.audit-item-note { font-size: 0.75rem; color: var(--text-muted); font-style: italic; }
.audit-item-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.item-remove-btn { background: none; border: 1px solid var(--border); border-radius: 50%; width: 22px; height: 22px; cursor: pointer; font-size: 0.7rem; color: var(--text-muted); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.15s; }
.item-remove-btn:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.audit-item-custom { background: #f0f7ff; border-radius: var(--radius); padding: 0.5rem; }
.item-photo-section { display: flex; flex-direction: column; gap: 0.375rem; }
.btn-photo-add { background: none; border: 1px dashed var(--border); border-radius: var(--radius); padding: 0.3rem 0.75rem; font-size: 0.78rem; color: var(--text-muted); cursor: pointer; width: fit-content; transition: all 0.15s; }
.btn-photo-add:hover { border-color: var(--primary); color: var(--primary); background: #eff6ff; }
.audit-view-left { display: flex; flex-direction: column; gap: 0.2rem; flex: 1; }
.item-photo-links { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.25rem; }
.item-photo-link { font-size: 0.75rem; color: var(--primary); text-decoration: none; background: #eff6ff; padding: 0.15rem 0.4rem; border-radius: 4px; }
.item-photo-link:hover { text-decoration: underline; }

/* === INCIDENTS === */
.incident-layout { display: grid; grid-template-columns: 1fr 320px; gap: 1rem; align-items: start; }
.incident-main { display: flex; flex-direction: column; gap: 0; }
.incident-sidebar { position: sticky; top: 72px; }
.complaint-type-badge { display: inline-block; background: #eff6ff; color: #1e40af; font-size: 0.78rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 4px; }
.complaint-type-lg { font-size: 0.875rem; padding: 0.3rem 0.75rem; }
.incident-status-badge { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 999px; text-transform: capitalize; }
.status-incident-open { background: #fef2f2; color: #991b1b; }
.status-incident-in_progress { background: #fffbeb; color: #92400e; }
.status-incident-resolved { background: #dcfce7; color: #15803d; }
.status-incident-closed { background: #f1f5f9; color: #475569; }
.row-urgent td { background: #fef2f2; }
.row-warning td { background: #fffbeb; }
.incident-log { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.incident-log-item { padding: 0.75rem; background: var(--bg); border-radius: var(--radius); border-left: 3px solid var(--border); }
.incident-log-meta { display: flex; justify-content: space-between; font-size: 0.8rem; margin-bottom: 0.3rem; }
.incident-log-note { font-size: 0.875rem; white-space: pre-wrap; margin: 0; }

/* === HR REFERENCE === */
.hr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.75rem; }
.hr-card { display: flex; flex-direction: column; gap: 0.4rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; text-decoration: none; color: var(--text); transition: all 0.15s; box-shadow: var(--shadow); }
.hr-card:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(37,99,235,0.1); transform: translateY(-1px); }
.hr-card-title { font-weight: 600; font-size: 0.9rem; }
.hr-card-meta { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.hr-badge { font-size: 0.7rem; background: #eff6ff; color: var(--primary); padding: 0.15rem 0.4rem; border-radius: 4px; font-weight: 600; }
.chapter-nav { display: flex; flex-direction: column; gap: 0.375rem; }
.chapter-link { display: flex; align-items: center; gap: 0.625rem; padding: 0.5rem 0.75rem; border-radius: var(--radius); text-decoration: none; color: var(--text); font-size: 0.875rem; transition: background 0.15s; }
.chapter-link:hover { background: var(--bg); }
.chapter-num { width: 24px; height: 24px; background: var(--primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; flex-shrink: 0; }
.chapter-page { margin-left: auto; font-size: 0.75rem; color: var(--text-muted); }
.chapter-link.active { background: #eff6ff; color: var(--primary); font-weight: 600; }
.pdf-viewer { width: 100%; height: 75vh; border: 1px solid var(--border); border-radius: var(--radius); }
.chapter-jump-bar { display: flex; gap: 0.375rem; flex-wrap: wrap; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); align-items: center; }
.chapter-jump-btn { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.25rem 0.6rem; font-size: 0.75rem; cursor: pointer; transition: all 0.15s; font-family: inherit; }
.chapter-jump-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.hr-content { font-size: 0.9rem; line-height: 1.7; }
.hr-content-heading { font-size: 0.9rem; font-weight: 700; margin: 1.5rem 0 0.5rem; color: var(--primary); }
.hr-content-para { margin-bottom: 0.875rem; }
.hr-content-steps { background: var(--bg); border-radius: var(--radius); padding: 0.75rem 1rem; margin-bottom: 0.875rem; font-size: 0.875rem; line-height: 1.7; }

/* === VENDOR DIRECTORY === */
.vendor-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.875rem; }
.vendor-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 0.5rem; }
.vendor-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.vendor-name { font-weight: 700; font-size: 0.9rem; }
.vetted-badge { font-size: 0.68rem; background: #dcfce7; color: #15803d; padding: 0.15rem 0.4rem; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.vendor-details { display: flex; flex-direction: column; gap: 0.2rem; flex: 1; }
.vendor-detail { font-size: 0.82rem; }
.vendor-detail a { color: var(--primary); text-decoration: none; }
.vendor-detail a:hover { text-decoration: underline; }
.vendor-actions { display: flex; gap: 0.375rem; }
.vendor-section { }

/* === TRAINING === */
.training-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.875rem; }
.training-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 0.4rem; }
.training-card-top { display: flex; align-items: center; gap: 0.4rem; }
.training-type-badge { font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.4rem; border-radius: 4px; text-transform: uppercase; }
.type-video { background: #fef2f2; color: #991b1b; }
.type-youtube { background: #fef2f2; color: #991b1b; }
.type-link { background: #eff6ff; color: #1e40af; }
.type-doc { background: #f0fdf4; color: #15803d; }
.type-quiz { background: #fdf4ff; color: #7c3aed; }
.training-card-title { font-weight: 600; font-size: 0.9rem; }
.training-card-vendor { font-size: 0.78rem; color: var(--text-muted); }
.training-card-desc { font-size: 0.78rem; color: var(--text-muted); }
.training-card-actions { display: flex; gap: 0.375rem; margin-top: 0.25rem; }
.quiz-question { }
.quiz-q-num { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.quiz-q-text { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.75rem; }
.quiz-options { display: flex; flex-direction: column; gap: 0.5rem; }
.quiz-option { display: flex; align-items: center; gap: 0.625rem; padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; font-size: 0.875rem; font-weight: normal; flex-direction: row; margin: 0; transition: all 0.15s; }
.quiz-option:has(input:checked) { border-color: var(--primary); background: #eff6ff; }
.quiz-option input { flex-shrink: 0; accent-color: var(--primary); }
.quiz-result { display: flex; align-items: center; gap: 1rem; padding: 1.25rem; border-radius: var(--radius); margin-bottom: 1rem; }
.quiz-passed { background: #dcfce7; }
.quiz-failed { background: #fef2f2; }
.quiz-result-icon { font-size: 2rem; font-weight: 700; }
.quiz-result-text { font-size: 0.95rem; }
.quiz-builder-question { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }

/* === OPS UPDATES === */
.ops-feed { display: flex; flex-direction: column; gap: 1rem; }
.ops-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.ops-unread { border-left: 4px solid var(--primary); }
.ops-pinned { border-top: 3px solid #f59e0b; }
.priority-ops-urgent { border-left: 4px solid var(--danger) !important; }
.priority-ops-high { border-left: 4px solid var(--warning) !important; }
.ops-card-header { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; background: var(--bg); border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 0.5rem; }
.ops-priority-badge { font-size: 0.75rem; font-weight: 700; }
.priority-ops-badge-urgent { color: var(--danger); }
.priority-ops-badge-high { color: var(--warning); }
.priority-ops-badge-normal { color: var(--success); }
.ops-from { font-size: 0.82rem; color: var(--text-muted); }
.ops-card-title { padding: 0.875rem 1rem 0.25rem; font-weight: 700; font-size: 1rem; }
.ops-card-body { padding: 0.25rem 1rem 0.875rem; font-size: 0.875rem; line-height: 1.7; color: var(--text); }
.ops-read-receipt { padding: 0.375rem 1rem; font-size: 0.75rem; color: var(--success); font-weight: 600; border-top: 1px solid var(--border); background: #f0fdf4; }
.pin-badge { font-size: 0.72rem; background: #fef9c3; color: #a16207; padding: 0.15rem 0.4rem; border-radius: 4px; font-weight: 600; }

/* === SCHEDULES === */
.schedule-grid td { font-size: 0.78rem; vertical-align: top; padding: 0.4rem 0.5rem; }
.shift-time { font-size: 0.75rem; font-weight: 500; color: var(--text); }
.shift-end { color: var(--text-muted); }
.shift-hours { font-size: 0.7rem; color: var(--primary); font-weight: 600; }
.vacation-badge { font-size: 0.7rem; background: #fffbeb; color: #92400e; padding: 0.15rem 0.3rem; border-radius: 4px; font-weight: 600; }

/* === HOURS ASSESSMENT === */
.assessment-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.assessment-ok { border-left: 4px solid var(--success); }
.assessment-warning { border-left: 4px solid var(--warning); }
.assessment-danger { border-left: 4px solid var(--danger); }
.assessment-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.assessment-store { font-weight: 700; font-size: 1rem; }
.assessment-status-badge { font-size: 0.72rem; font-weight: 700; padding: 0.2rem 0.5rem; border-radius: 999px; }
.status-ok { background: #dcfce7; color: #15803d; }
.status-over { background: #fef3c7; color: #92400e; }
.status-trim { background: #fef2f2; color: #991b1b; }
.status-missing { background: #f1f5f9; color: #64748b; }
.assessment-budget-row { display: flex; gap: 1rem; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.5rem; flex-wrap: wrap; }
.assessment-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin: 0.5rem 0; }
.assessment-metric { background: var(--bg); border-radius: var(--radius); padding: 0.5rem 0.625rem; display: flex; flex-direction: column; gap: 0.1rem; }
.assessment-trim-alert { grid-column: 1 / -1; background: #fef2f2; }
.metric-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }
.metric-value { font-size: 1.1rem; font-weight: 700; }
.metric-sub { font-size: 0.72rem; color: var(--text-muted); }
.assessment-updated { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.assessment-banner { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-radius: var(--radius); margin-bottom: 1.5rem; }
.banner-ok { background: #dcfce7; border: 1px solid #86efac; }
.banner-warning { background: #fef3c7; border: 1px solid #fde68a; }
.banner-danger { background: #fef2f2; border: 1px solid #fecaca; }
.banner-icon { font-size: 2rem; }
.banner-title { font-weight: 700; font-size: 1rem; }
.banner-sub { font-size: 0.82rem; color: var(--text-muted); }
.assessment-budget-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.5rem; }
.budget-item { display: flex; flex-direction: column; gap: 0.1rem; font-size: 0.82rem; padding: 0.4rem 0.5rem; background: #fff; border-radius: 4px; }
.budget-item span { color: var(--text-muted); font-size: 0.75rem; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .widget-half { grid-column: 1; }
  .navbar { flex-wrap: wrap; height: auto; padding: 0.75rem 1rem; gap: 0.75rem; }
  .nav-links { flex-wrap: wrap; }
  .form-row { grid-template-columns: 1fr; }
}
