/* ============================================
   SDBS Manager - Global Stylesheet
   Superior Draft Beer Service, LLC
   "Keeping it fresh from the keg to the tap"
   ============================================ */

/* === CSS CUSTOM PROPERTIES === */
:root {
  /* Brand Colors */
  --navy: #0D1B3E;
  --blue: #1565C0;
  --gold: #C8960A;
  --gold-light: #F5E6C0;
  --white: #ffffff;
  --surface: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  /* Status Colors */
  --success: #16a34a;
  --success-bg: #dcfce7;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --warning: #d97706;
  --warning-bg: #fef3c7;

  /* Layout */
  --sidebar-width: 240px;
  --topbar-height: 60px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --transition: 150ms ease;

  /* Safe Area Insets (for notched devices) */
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-left: env(safe-area-inset-left, 0px);
  --safe-area-right: env(safe-area-inset-right, 0px);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--surface);
  min-height: 100vh;
  padding-top: var(--safe-area-top);
  padding-bottom: var(--safe-area-bottom);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

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

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 600;
  line-height: 1.25;
}

p {
  margin: 0;
}

/* === LAYOUT === */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--navy);
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.main-content {
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  flex: 1;
  background: var(--surface);
}

.topbar {
  height: var(--topbar-height);
  border-bottom: 1px solid var(--border);
  background: var(--white);
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 50;
}

.page-content {
  padding: 24px;
  flex-grow: 1;
}

/* === SIDEBAR STYLES === */
.sidebar-logo {
  padding: 20px 16px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo-est {
  font-size: 9px;
  color: var(--gold);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.sidebar-logo-name {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1px;
}

.sidebar-logo-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}

.sidebar-nav {
  list-style: none;
  padding: 12px 0;
  flex: 1;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.5);
  padding: 16px 16px 8px 16px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

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

.sidebar-nav a.active {
  background: var(--blue);
  color: var(--white);
  border-left-color: var(--gold);
}

.nav-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  opacity: 0.85;
}

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

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.05);
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}

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

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  text-transform: capitalize;
}

/* === TOPBAR STYLES === */
.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.topbar-logout {
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius);
  transition: all var(--transition);
  background: none;
  border: none;
  font-size: 18px;
}

.topbar-logout:hover {
  color: var(--danger);
  background: var(--danger-bg);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-primary);
  cursor: pointer;
  padding: 4px;
}

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

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

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

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

/* === STATS ROW === */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}

.stat-card.centered {
  text-align: center;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 12px;
}

.stat-icon.blue {
  background: #dbeafe;
  color: var(--blue);
}

.stat-icon.green {
  background: var(--success-bg);
  color: var(--success);
}

.stat-icon.gold {
  background: var(--gold-light);
  color: var(--gold);
}

.stat-icon.red {
  background: var(--danger-bg);
  color: var(--danger);
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-change {
  font-size: 12px;
  margin-top: 8px;
}

.stat-change.positive {
  color: var(--success);
}

.stat-change.negative {
  color: var(--danger);
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--blue);
  color: var(--white);
}

.btn-primary:hover:not(:disabled) {
  background: #1252a3;
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--border);
}

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

.btn-danger:hover:not(:disabled) {
  background: #b91c1c;
}

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-success:hover:not(:disabled) {
  background: #15803d;
}

.btn-gold {
  background: var(--gold);
  color: var(--white);
}

.btn-gold:hover:not(:disabled) {
  background: #a67c08;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface);
  color: var(--text-primary);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  padding: 8px;
}

.btn-icon.btn-sm {
  padding: 5px;
}

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

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

th {
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  padding: 10px 16px;
  text-align: left;
  border-bottom: 2px solid var(--border);
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-primary);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: #f8fafc;
}

.table-link {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}

.table-link:hover {
  text-decoration: underline;
}

.table-actions {
  display: flex;
  gap: 8px;
}

.table-empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-muted);
}

/* === BADGES === */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-green {
  background: var(--success-bg);
  color: var(--success);
}

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

.badge-gold {
  background: var(--gold-light);
  color: #92400e;
}

.badge-gray {
  background: #f1f5f9;
  color: var(--text-secondary);
}

.badge-orange {
  background: #fed7aa;
  color: #c2410c;
}

/* Warning/Overdue badge emphasis */
.badge-red,
.badge-orange {
  font-size: 12px;
  padding: 4px 10px;
  font-weight: 700;
}

.badge-navy {
  background: var(--navy);
  color: var(--white);
}

/* === WEEK BADGE === */
.week-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.week-a {
  background: #dbeafe;
  color: #1d4ed8;
}

.week-b {
  background: var(--gold-light);
  color: #92400e;
}

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

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-label .required {
  color: var(--danger);
  margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.1);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input.error,
.form-select.error {
  border-color: var(--danger);
}

.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
}

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

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

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

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

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

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--blue);
}

.form-checkbox-label {
  font-size: 14px;
  color: var(--text-primary);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

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

.page-header-left {
  display: flex;
  flex-direction: column;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.page-header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* === ALERTS === */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.alert-content {
  flex: 1;
}

.alert-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border-left: 3px solid var(--warning);
}

.alert-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-left: 3px solid var(--danger);
}

.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border-left: 3px solid var(--success);
}

.alert-info {
  background: #dbeafe;
  color: #1d4ed8;
  border-left: 3px solid var(--blue);
}

/* === MODAL === */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.modal-lg {
  max-width: 720px;
}

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

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  cursor: pointer;
  font-size: 24px;
  color: var(--text-muted);
  background: none;
  border: none;
  padding: 4px;
  line-height: 1;
  transition: color var(--transition);
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  margin-bottom: 24px;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* === STATUS DOT === */
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot.green {
  background: #22c55e;
}

.status-dot.yellow {
  background: #f59e0b;
}

.status-dot.gray {
  background: var(--text-muted);
}

.status-dot.red {
  background: var(--danger);
}

.status-dot.blue {
  background: var(--blue);
}

.status-dot.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

/* === LOGIN PAGE === */
.login-page {
  min-height: 100vh;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  flex-direction: column;
}

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

.login-est {
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.login-company {
  font-size: 28px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 3px;
  font-family: Georgia, 'Times New Roman', serif;
  text-transform: uppercase;
}

.login-company-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin-top: 2px;
  font-family: Georgia, 'Times New Roman', serif;
}

.login-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.login-divider-line {
  width: 40px;
  height: 1px;
  background: var(--blue);
}

.login-divider-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.login-toggle {
  display: flex;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 24px;
}

.login-toggle-btn {
  flex: 1;
  padding: 9px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.login-toggle-btn.active {
  background: var(--blue);
  color: var(--white);
}

.login-toggle-btn:not(.active) {
  background: transparent;
  color: var(--text-secondary);
}

.login-toggle-btn:not(.active):hover {
  background: rgba(0,0,0,0.05);
}

.login-forgot {
  display: block;
  text-align: right;
  font-size: 13px;
  color: var(--blue);
  margin-bottom: 20px;
  transition: color var(--transition);
}

.login-forgot:hover {
  color: #1252a3;
  text-decoration: underline;
}

.login-error {
  color: var(--danger);
  font-size: 13px;
  text-align: center;
  margin-top: 12px;
  display: none;
}

.login-error.show {
  display: block;
}

.login-tagline {
  text-align: center;
  margin-top: 24px;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 1px;
  font-style: italic;
}

/* === PWA PAGE TAGLINE === */
.pwa-tagline {
  position: fixed;
  bottom: 16px;
  left: var(--sidebar-width);
  right: 0;
  text-align: center;
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 1px;
  font-style: italic;
  pointer-events: none;
}

@media (max-width: 768px) {
  .pwa-tagline {
    left: 0;
  }
}

/* === SET PASSWORD PAGE === */
.set-password-page {
  min-height: 100vh;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  flex-direction: column;
}

.set-password-logo {
  text-align: center;
  margin-bottom: 20px;
}

.set-password-logo .login-company {
  font-size: 20px;
  letter-spacing: 2px;
}

.set-password-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.set-password-header {
  text-align: center;
  margin-bottom: 24px;
}

.set-password-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.set-password-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.password-requirements {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-top: 16px;
}

.password-requirements-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.password-requirement {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.password-requirement.valid {
  color: var(--success);
}

.password-requirement-icon {
  font-size: 14px;
}

/* === TOAST NOTIFICATIONS === */
.toast-container {
  position: fixed;
  bottom: calc(24px + var(--safe-area-bottom));
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 400px;
  animation: slideIn 0.3s ease;
  border-left: 4px solid var(--text-muted);
  position: relative;
  z-index: 10001;
}

.toast.success {
  border-left-color: var(--success);
}

.toast.error {
  border-left-color: var(--danger);
}

.toast.warning {
  border-left-color: var(--warning);
}

.toast-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.toast.success .toast-icon {
  color: var(--success);
}

.toast.error .toast-icon {
  color: var(--danger);
}

.toast.warning .toast-icon {
  color: var(--warning);
}

.toast-message {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
}

.toast-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.toast-close:hover {
  color: var(--text-primary);
}

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

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

.toast.removing {
  animation: slideOut 0.3s ease forwards;
}

/* === UTILITY CLASSES === */
.hidden {
  display: none !important;
}

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

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

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

.text-secondary {
  color: var(--text-secondary);
}

.text-success {
  color: var(--success);
}

.text-danger {
  color: var(--danger);
}

.text-warning {
  color: var(--warning);
}

.text-blue {
  color: var(--blue);
}

.text-gold {
  color: var(--gold);
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 24px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 24px; }

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

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

.flex-1 {
  flex: 1;
}

.w-full {
  width: 100%;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    display: none;
  }

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

  .main-content {
    margin-left: 0;
  }

  .mobile-menu-btn {
    display: block;
  }

  .topbar {
    padding: 0 16px;
  }

  .topbar-user-name {
    display: none;
  }

  .page-content {
    padding: 16px;
  }

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

  .page-header-actions {
    width: 100%;
  }

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

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

  .modal {
    padding: 20px;
    margin: 16px;
  }

  .table-wrapper {
    margin: 0 -16px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .login-card,
  .set-password-card {
    padding: 28px 24px;
  }

  .login-company {
    font-size: 22px;
    letter-spacing: 2px;
  }

  .toast-container {
    left: 16px;
    right: 16px;
    bottom: calc(16px + var(--safe-area-bottom));
  }

  .toast {
    min-width: auto;
    max-width: none;
  }
}

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

  .btn-lg {
    padding: 10px 20px;
    font-size: 14px;
  }

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

/* === PRINT STYLES === */
@media print {
  .sidebar,
  .topbar,
  .toast-container,
  .modal-backdrop {
    display: none !important;
  }

  .main-content {
    margin-left: 0;
  }

  .page-content {
    padding: 0;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
