/* ============================================================
   Hotel Aristos – HACCP Sustav | style.css
   Premium Mobile-First Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  --navy-dark: #0A1628;
  --navy: #1E3A5F;
  --blue: #2D5A9B;
  --gold: #C9A84C;
  --gold-light: #E8C96A;
  --white: #FFFFFF;
  --bg: #F4F6F9;
  --border: #E8ECF0;
  --text: #1A2332;
  --text-muted: #6B7A8D;
  --text-light: #9AAAB8;
  --success: #28A745;
  --success-bg: #D4EDDA;
  --danger: #DC3545;
  --danger-bg: #F8D7DA;
  --warning: #FD7E14;
  --warning-bg: #FFF3CD;
  --info: #17A2B8;
  --info-bg: #D1ECF1;
  --shadow: 0 4px 20px rgba(10, 22, 40, 0.08);
  --shadow-md: 0 6px 30px rgba(10, 22, 40, 0.11);
  --shadow-lg: 0 8px 40px rgba(10, 22, 40, 0.14);
  --shadow-xl: 0 16px 60px rgba(10, 22, 40, 0.20);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --transition: 0.2s ease;
  --sidebar-width: 260px;
  --mobile-header-height: 60px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover { color: var(--navy); }

ul { list-style: none; }

img { max-width: 100%; height: auto; display: block; }

button { cursor: pointer; font-family: inherit; border: none; outline: none; }

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ============================================================
   SCROLLBAR STYLING
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ============================================================
   LOGIN SCREEN
   ============================================================ */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--blue) 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.login-screen::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(201, 168, 76, 0.08) 0%, transparent 60%),
              radial-gradient(circle at 70% 70%, rgba(45, 90, 155, 0.15) 0%, transparent 60%);
  animation: bgPulse 8s ease-in-out infinite alternate;
}

@keyframes bgPulse {
  0% { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1.05) rotate(2deg); }
}

.login-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 1;
  animation: slideUpFade 0.5s ease;
}

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

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin: 0 auto 16px;
  border-radius: 16px;
}

.login-logo h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.login-logo p {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.login-divider {
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
  margin: 12px auto 0;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(45, 90, 155, 0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-light);
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7A8D' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* File input */
.file-input-wrapper {
  position: relative;
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  top: 0;
  left: 0;
  z-index: 2;
}

.file-input-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg);
}

.file-input-label:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: rgba(45, 90, 155, 0.04);
}

.file-input-label .file-icon {
  font-size: 1.4rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.2px;
  font-family: 'Inter', sans-serif;
  line-height: 1;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--navy));
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(45, 90, 155, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--navy), var(--navy-dark));
  box-shadow: 0 6px 20px rgba(45, 90, 155, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border-color: var(--border);
  box-shadow: var(--shadow);
}

.btn-secondary:hover {
  background: var(--bg);
  border-color: var(--navy);
  transform: translateY(-1px);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy-dark);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(201, 168, 76, 0.3);
}

.btn-gold:hover {
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.4);
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #20923b);
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #c12131);
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
  transform: translateY(-1px);
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning), #e06c00);
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(253, 126, 20, 0.3);
}

.btn-warning:hover {
  box-shadow: 0 6px 20px rgba(253, 126, 20, 0.4);
  transform: translateY(-1px);
}

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

.btn-outline:hover {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-1px);
}

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

.btn-outline-danger:hover {
  background: var(--danger);
  color: var(--white);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.8rem;
  border-radius: var(--radius-xs);
}

.btn-lg {
  padding: 15px 28px;
  font-size: 1rem;
  border-radius: var(--radius-sm);
}

.btn-full { width: 100%; }

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-xs);
  font-size: 1rem;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

/* ============================================================
   APP SHELL
   ============================================================ */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--navy-dark) 0%, var(--navy) 100%);
  min-height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--transition);
  box-shadow: 4px 0 20px rgba(10, 22, 40, 0.15);
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
  flex-shrink: 0;
}

.sidebar-title { display: flex; flex-direction: column; }

.sidebar-hotel {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}

.sidebar-subtitle {
  font-size: 0.7rem;
  color: var(--gold);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 2px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 8px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-info span:first-child {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  margin-top: 1px;
}

/* Navigation list */
.nav-list {
  flex: 1;
  padding: 4px 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.65);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
}

.nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: var(--white);
}

.nav-item.active {
  background: rgba(201, 168, 76, 0.15);
  color: var(--gold);
  font-weight: 600;
}

.nav-item.active .nav-icon {
  color: var(--gold);
}

.nav-icon {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.btn-logout {
  margin: 12px 10px 24px;
  padding: 11px 16px;
  background: rgba(220, 53, 69, 0.15);
  color: #ff8090;
  border: 1px solid rgba(220, 53, 69, 0.25);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.btn-logout:hover {
  background: rgba(220, 53, 69, 0.28);
  color: var(--white);
}

/* ============================================================
   MOBILE HEADER
   ============================================================ */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--mobile-header-height);
  background: linear-gradient(90deg, var(--navy-dark), var(--navy));
  z-index: 90;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 2px 12px rgba(10, 22, 40, 0.2);
}

.hamburger {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: background var(--transition);
}

.hamburger:hover { background: rgba(255,255,255,0.1); }

.mobile-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  flex: 1;
  text-align: center;
}

.mobile-user {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.5);
  z-index: 95;
  backdrop-filter: blur(2px);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  padding: 32px;
  max-width: calc(100vw - var(--sidebar-width));
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy-dark);
  letter-spacing: -0.5px;
}

.page-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.page-header-left { display: flex; flex-direction: column; }
.page-header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition);
}

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

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title .card-icon {
  font-size: 1.2rem;
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================================
   STATS CARDS (DASHBOARD)
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition);
  cursor: pointer;
}

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

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-icon.navy { background: rgba(30, 58, 95, 0.1); }
.stat-icon.blue { background: rgba(45, 90, 155, 0.1); }
.stat-icon.gold { background: rgba(201, 168, 76, 0.12); }
.stat-icon.success { background: rgba(40, 167, 69, 0.1); }
.stat-icon.danger { background: rgba(220, 53, 69, 0.1); }
.stat-icon.warning { background: rgba(253, 126, 20, 0.1); }

.stat-info { flex: 1; min-width: 0; }

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--navy-dark);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.stat-trend {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 4px;
}

.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* ============================================================
   BADGES / STATUS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.badge-success {
  background: var(--success-bg);
  color: #1a7a30;
}

.badge-danger {
  background: var(--danger-bg);
  color: #a01524;
}

.badge-warning {
  background: var(--warning-bg);
  color: #8a4100;
}

.badge-info {
  background: var(--info-bg);
  color: #0a6878;
}

.badge-navy {
  background: rgba(30, 58, 95, 0.1);
  color: var(--navy);
}

.badge-gold {
  background: rgba(201, 168, 76, 0.15);
  color: #7a5a10;
}

/* Room status badges */
.badge-clean { background: var(--success-bg); color: #1a7a30; }
.badge-dirty { background: var(--danger-bg); color: #a01524; }
.badge-process { background: var(--warning-bg); color: #8a4100; }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table thead th {
  background: var(--bg);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

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

.table tbody tr:hover { background: rgba(45, 90, 155, 0.03); }

.table tbody td {
  padding: 13px 16px;
  color: var(--text);
  vertical-align: middle;
}

.table .temp-valid { color: var(--success); font-weight: 700; }
.table .temp-invalid { color: var(--danger); font-weight: 700; }

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-wrapper {
  margin: 8px 0;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 0.8rem;
}

.progress-label span:first-child { color: var(--text-muted); font-weight: 500; }
.progress-label span:last-child { color: var(--navy-dark); font-weight: 700; }

.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
  background: linear-gradient(90deg, var(--blue), var(--navy));
}

.progress-fill.success { background: linear-gradient(90deg, var(--success), #20923b); }
.progress-fill.warning { background: linear-gradient(90deg, var(--warning), #e06c00); }
.progress-fill.danger { background: linear-gradient(90deg, var(--danger), #c12131); }

/* ============================================================
   CHECKLIST CARDS
   ============================================================ */
.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.checklist-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}

.checklist-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.checklist-card.completed {
  border-color: var(--success);
  background: rgba(40, 167, 69, 0.04);
}

.checklist-toggle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  font-size: 0.9rem;
  color: transparent;
}

.checklist-card.completed .checklist-toggle {
  background: var(--success);
  border-color: var(--success);
  color: var(--white);
}

.checklist-content { flex: 1; }

.checklist-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.checklist-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.checklist-meta {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 4px;
}

/* ============================================================
   TEMPERATURE CARDS
   ============================================================ */
.temp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.temp-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 2px solid var(--border);
  transition: all var(--transition);
}

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

.temp-card.valid { border-color: var(--success); }
.temp-card.invalid { border-color: var(--danger); }
.temp-card.warning-temp { border-color: var(--warning); }

.temp-device {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.temp-value {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 6px;
}

.temp-card.valid .temp-value { color: var(--success); }
.temp-card.invalid .temp-value { color: var(--danger); }
.temp-card.warning-temp .temp-value { color: var(--warning); }

.temp-range {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.temp-time {
  font-size: 0.7rem;
  color: var(--text-light);
}

/* ============================================================
   ROOM STATUS GRID
   ============================================================ */
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.room-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 2px solid var(--border);
  transition: all var(--transition);
  cursor: pointer;
}

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

.room-card.clean { border-color: var(--success); background: rgba(40, 167, 69, 0.04); }
.room-card.dirty { border-color: var(--danger); background: rgba(220, 53, 69, 0.04); }
.room-card.in-process { border-color: var(--warning); background: rgba(253, 126, 20, 0.04); }

.room-number {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--navy-dark);
  margin-bottom: 6px;
}

.room-floor {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.room-status-btns {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 10px;
}

.room-status-btn {
  padding: 5px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.7rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.room-status-btn.clean { background: var(--success-bg); color: #1a7a30; }
.room-status-btn.dirty { background: var(--danger-bg); color: #a01524; }
.room-status-btn.process { background: var(--warning-bg); color: #8a4100; }
.room-status-btn.active,
.room-status-btn:hover { filter: brightness(0.88); }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  border-left: 4px solid;
  margin-top: 12px;
}

.alert-success {
  background: var(--success-bg);
  color: #1a7a30;
  border-left-color: var(--success);
}

.alert-danger {
  background: var(--danger-bg);
  color: #a01524;
  border-left-color: var(--danger);
}

.alert-warning {
  background: var(--warning-bg);
  color: #8a4100;
  border-left-color: var(--warning);
}

.alert-info {
  background: var(--info-bg);
  color: #0a6878;
  border-left-color: var(--info);
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 380px;
  pointer-events: all;
  animation: toastSlideIn 0.35s ease;
  border-left: 4px solid;
  font-size: 0.875rem;
  font-weight: 500;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

.toast.toast-out {
  animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}

.toast-success { border-left-color: var(--success); color: #1a7a30; }
.toast-danger { border-left-color: var(--danger); color: #a01524; }
.toast-warning { border-left-color: var(--warning); color: #8a4100; }
.toast-info { border-left-color: var(--info); color: #0a6878; }

.toast-icon { font-size: 1.2rem; flex-shrink: 0; }
.toast-msg { flex: 1; line-height: 1.4; }
.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 4px;
  flex-shrink: 0;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-container {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 40, 0.55);
  backdrop-filter: blur(4px);
}

.modal-box {
  background: var(--white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy-dark);
}

.modal-close {
  background: var(--bg);
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--border);
}

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.spinner-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.loading-state .spinner { margin: 0 auto 16px; }
.loading-state p { font-size: 0.875rem; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-state p { font-size: 0.85rem; }

/* ============================================================
   QUICK ACTION GRID
   ============================================================ */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.quick-action-btn {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 14px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  box-shadow: var(--shadow);
}

.quick-action-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.quick-action-btn .qa-icon {
  font-size: 1.8rem;
}

/* ============================================================
   HACCP STATUS CARD
   ============================================================ */
.haccp-status-card {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  border-radius: var(--radius);
  padding: 28px;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.haccp-status-card::after {
  content: '';
  position: absolute;
  right: -20px;
  top: -20px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

.haccp-status-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.haccp-status-icon.ok { background: rgba(40, 167, 69, 0.2); }
.haccp-status-icon.warn { background: rgba(253, 126, 20, 0.2); }
.haccp-status-icon.err { background: rgba(220, 53, 69, 0.2); }

.haccp-status-content { flex: 1; }

.haccp-status-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.haccp-status-content p {
  font-size: 0.85rem;
  opacity: 0.75;
}

.haccp-status-badge {
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.haccp-status-badge.ok { background: rgba(40, 167, 69, 0.25); color: #7affaa; }
.haccp-status-badge.warn { background: rgba(253, 126, 20, 0.25); color: #ffbb77; }
.haccp-status-badge.err { background: rgba(220, 53, 69, 0.25); color: #ff8888; }

/* ============================================================
   SECTION DIVIDER
   ============================================================ */
.section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ============================================================
   CONTENT GRID
   ============================================================ */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.content-grid.thirds {
  grid-template-columns: 1fr 1fr 1fr;
}

.content-grid.sidebar-layout {
  grid-template-columns: 1fr 340px;
}

@media (max-width: 900px) {
  .content-grid,
  .content-grid.thirds,
  .content-grid.sidebar-layout {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   FLOOR GROUPS
   ============================================================ */
.floor-section {
  margin-bottom: 28px;
}

.floor-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   CORRECTIVE ACTIONS
   ============================================================ */
.corrective-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 20px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
  transition: all var(--transition);
  border-left: 4px solid var(--warning);
}

.corrective-item.resolved {
  border-left-color: var(--success);
  opacity: 0.7;
}

.corrective-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 12px;
}

.corrective-area {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--navy-dark);
}

.corrective-problem {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.corrective-meta {
  font-size: 0.72rem;
  color: var(--text-light);
}

/* ============================================================
   WORKTIME / SHIFT
   ============================================================ */
.shift-timer-card {
  background: linear-gradient(135deg, var(--navy-dark), var(--blue));
  color: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  margin-bottom: 22px;
}

.shift-timer-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.7;
  margin-bottom: 12px;
}

.shift-timer-value {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
  margin-bottom: 20px;
}

.shift-status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  animation: pulse 1.5s ease-in-out infinite;
}

.shift-status-dot.active { background: var(--success); }
.shift-status-dot.inactive { background: rgba(255,255,255,0.4); animation: none; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

/* ============================================================
   MENU / ALLERGENS TABLE
   ============================================================ */
.allergen-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  background: rgba(253, 126, 20, 0.12);
  color: #8a4100;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  margin: 2px;
}

.allergen-chip.none {
  background: var(--success-bg);
  color: #1a7a30;
}

/* ============================================================
   TRACEABILITY / EXPIRY
   ============================================================ */
.expiry-ok { color: var(--success); }
.expiry-warn { color: var(--warning); }
.expiry-expired { color: var(--danger); font-weight: 700; }

.product-image {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid var(--border);
}

/* ============================================================
   REPORTS / PRINT AREA
   ============================================================ */
.report-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
  border: 1px solid var(--border);
}

.report-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   BACKUP PAGE
   ============================================================ */
.backup-card {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  border-radius: var(--radius);
  padding: 32px;
  color: var(--white);
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.backup-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  opacity: 0.9;
}

.backup-card h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.backup-card p {
  font-size: 0.875rem;
  opacity: 0.7;
  margin-bottom: 24px;
}

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  align-items: center;
}

.filter-bar select,
.filter-bar input {
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  background: var(--white);
  color: var(--text);
  transition: border-color var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

.filter-bar select:focus,
.filter-bar input:focus {
  outline: none;
  border-color: var(--blue);
}

/* ============================================================
   TOGGLE SWITCH
   ============================================================ */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

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

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: var(--white);
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.toggle-switch input:checked + .toggle-slider { background: var(--success); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ============================================================
   INFO ROW
   ============================================================ */
.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.info-row:last-child { border-bottom: none; }

.info-row .info-label {
  color: var(--text-muted);
  font-weight: 500;
}

.info-row .info-value {
  font-weight: 600;
  color: var(--text);
}

/* ============================================================
   PEST CONTROL
   ============================================================ */
.pest-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 20px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: box-shadow var(--transition);
}

.pest-item:hover { box-shadow: var(--shadow); }

.pest-item.overdue { border-left: 4px solid var(--danger); }
.pest-item.soon { border-left: 4px solid var(--warning); }
.pest-item.ok-item { border-left: 4px solid var(--success); }

/* ============================================================
   PHOTO PREVIEW
   ============================================================ */
.photo-preview {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  display: none;
  margin-top: 10px;
}

.photo-preview.visible { display: block; }

/* ============================================================
   MONTH SELECTOR
   ============================================================ */
.month-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  width: fit-content;
}

.month-selector button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all var(--transition);
}

.month-selector button:hover {
  background: var(--bg);
  color: var(--navy);
}

.month-selector span {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy-dark);
  min-width: 130px;
  text-align: center;
}

/* ============================================================
   LIST ITEMS
   ============================================================ */
.list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.list-item:last-child { border-bottom: none; }

.list-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.list-item-content { flex: 1; min-width: 0; }

.list-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.list-item-actions { display: flex; gap: 6px; }

/* ============================================================
   FLOOR ROOM STATS
   ============================================================ */
.room-stats-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.room-stat-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.room-stat-chip.clean { background: var(--success-bg); color: #1a7a30; }
.room-stat-chip.dirty { background: var(--danger-bg); color: #a01524; }
.room-stat-chip.process { background: var(--warning-bg); color: #8a4100; }

/* ============================================================
   GOODS / RECEIPT
   ============================================================ */
.receipt-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow var(--transition);
}

.receipt-item:hover { box-shadow: var(--shadow); }

.receipt-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(45, 90, 155, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

/* ============================================================
   WORKTIME HISTORY
   ============================================================ */
.worktime-list .wt-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.worktime-list .wt-item:last-child { border-bottom: none; }

.wt-date { color: var(--text-muted); font-size: 0.78rem; }
.wt-hours { font-weight: 700; color: var(--navy-dark); }
.wt-time-range { color: var(--text-muted); font-size: 0.78rem; }

/* ============================================================
   MENU RESULTS TABLE
   ============================================================ */
.menu-results {
  margin-top: 24px;
}

.menu-results h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 14px;
}

/* ============================================================
   WATER / EQUIPMENT
   ============================================================ */
.water-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: box-shadow var(--transition);
}

.water-item:hover { box-shadow: var(--shadow); }

.water-type-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.water-type-badge.voda { background: var(--info-bg); color: #0a6878; }
.water-type-badge.oprema { background: rgba(45, 90, 155, 0.1); color: var(--blue); }

/* ============================================================
   ALLERGENS DISPLAY
   ============================================================ */
.allergen-table-wrapper {
  overflow-x: auto;
}

.allergen-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.allergen-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.allergen-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.allergen-present { background: var(--warning); }
.allergen-absent { background: var(--success); }
.allergen-maybe { background: var(--info); }

/* ============================================================
   HACCP SCORE
   ============================================================ */
.score-ring {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.score-ring svg {
  transform: rotate(-90deg);
}

.score-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
}

/* ============================================================
   DATE/TIME DISPLAY
   ============================================================ */
.datetime-display {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============================================================
   RESPONSIVE - MOBILE
   ============================================================ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 100;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }

  .sidebar-overlay.visible { display: block; }

  .mobile-header { display: flex; }

  .main-content {
    margin-left: 0;
    padding: 80px 16px 100px;
    max-width: 100vw;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .temp-grid {
    grid-template-columns: 1fr 1fr;
  }

  .quick-actions {
    grid-template-columns: repeat(3, 1fr);
  }

  .rooms-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-header h1 { font-size: 1.3rem; }

  .haccp-status-card {
    flex-direction: column;
    text-align: center;
  }

  .toast-container {
    top: 70px;
    right: 10px;
    left: 10px;
  }

  .toast { min-width: unset; }

  .modal-container { padding: 10px; }

  .month-selector { width: 100%; justify-content: center; }

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

  .checklist-grid { grid-template-columns: 1fr; }

  .filter-bar { flex-direction: column; }
  .filter-bar select,
  .filter-bar input { width: 100%; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .temp-grid { grid-template-columns: 1fr; }
  .rooms-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }

  .login-card { padding: 28px 22px; }

  .shift-timer-value { font-size: 2.6rem; }
}

/* ============================================================
   PRINT STYLES - A4 Landscape
   ============================================================ */
@media print {
  @page {
    size: A4 landscape;
    margin: 15mm 12mm;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body {
    background: white;
    font-size: 11px;
  }

  .sidebar,
  .mobile-header,
  .sidebar-overlay,
  .toast-container,
  .modal-container,
  .btn,
  .page-header-actions,
  .no-print {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .main-content {
    margin: 0;
    padding: 0;
    max-width: 100%;
  }

  .report-section {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
    margin-bottom: 16px;
  }

  .print-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 2px solid #0A1628;
    margin-bottom: 20px;
  }

  .print-header h1 {
    font-size: 16px;
    color: #0A1628;
    font-weight: 700;
  }

  .print-header .print-date {
    font-size: 10px;
    color: #6B7A8D;
  }

  .table { font-size: 10px; }
  .table thead th { background: #F4F6F9; }

  .badge { font-size: 9px; padding: 2px 7px; }

  .card, .report-section {
    break-inside: avoid;
  }

  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-gold { color: var(--gold); }
.text-navy { color: var(--navy-dark); }

.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

.fs-sm { font-size: 0.8rem; }
.fs-xs { font-size: 0.72rem; }

.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }

.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

.w-100 { width: 100%; }
.hidden { display: none !important; }
.visible { display: block !important; }

.print-only { display: none; }
@media print { .print-only { display: block !important; } }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bounceIn {
  0% { transform: scale(0.7); opacity: 0; }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.animate-fade { animation: fadeIn 0.3s ease; }
.animate-slide-down { animation: slideDown 0.3s ease; }

/* ============================================================
   SCROLLABLE LIST CONTAINER
   ============================================================ */
.scrollable-list {
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

/* ============================================================
   GRADIENT HEADER BAR (page top accent)
   ============================================================ */
.page-accent-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--blue), var(--navy));
  border-radius: 2px;
  margin-bottom: 28px;
}

/* ============================================================
   STEP INDICATORS
   ============================================================ */
.step-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step.active { background: var(--blue); color: var(--white); }
.step.done { background: var(--success); color: var(--white); }
.step.pending { background: var(--border); color: var(--text-muted); }

.step-line { flex: 1; height: 2px; background: var(--border); border-radius: 1px; }
.step-line.done { background: var(--success); }

/* ============================================================
   CONFIRM DIALOG (inside modal)
   ============================================================ */
.confirm-dialog {
  text-align: center;
  padding: 8px 0;
}

.confirm-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.confirm-dialog h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 8px;
}

.confirm-dialog p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.confirm-dialog .confirm-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
}
