/* ==========================================================================
   JEFFSY COFFEE SHOP - Modern Coffee Aesthetic Theme & Design System
   ========================================================================== */

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

:root {
  /* Coffee Roast Color Palette */
  --bg-primary: #120E0C;
  --bg-secondary: #1C1613;
  --bg-tertiary: #271E1A;
  --bg-card: rgba(35, 27, 23, 0.78);
  --bg-card-hover: rgba(48, 38, 32, 0.9);
  --bg-glass: rgba(28, 22, 19, 0.72);
  --border-glass: rgba(198, 144, 85, 0.18);
  --border-glass-bright: rgba(198, 144, 85, 0.4);

  /* Warm Caramel & Gold Accents */
  --caramel-light: #F5DEB3;
  --caramel-primary: #C69055;
  --caramel-dark: #8F5E24;
  --caramel-glow: rgba(198, 144, 85, 0.35);

  /* Cream & Foam Highlights */
  --text-main: #FDFBF7;
  --text-muted: #A89F91;
  --text-dim: #73695E;

  /* Functional Status Colors */
  --color-success: #2ECC71;
  --color-success-bg: rgba(46, 204, 113, 0.15);
  --color-warning: #F39C12;
  --color-warning-bg: rgba(243, 156, 18, 0.15);
  --color-danger: #E74C3C;
  --color-danger-bg: rgba(231, 76, 60, 0.15);
  --color-info: #3498DB;
  --color-info-bg: rgba(52, 152, 219, 0.15);

  /* Typography */
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', system-ui, sans-serif;
  --font-mono: 'Space Mono', monospace;

  /* Shadows & Glows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 4px 20px rgba(198, 144, 85, 0.25);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(198, 144, 85, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(143, 94, 36, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(20, 15, 12, 0.98) 0%, #0D0A08 100%);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Typography styles */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.01em;
}

a {
  color: var(--caramel-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--caramel-light);
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-glass-bright);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--caramel-primary);
}

/* Glass Panels */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.glass-panel-glow {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass-bright);
  border-radius: 16px;
  box-shadow: var(--shadow-gold);
}

/* Buttons */
.btn-coffee {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--caramel-primary) 0%, var(--caramel-dark) 100%);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(198, 144, 85, 0.35);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-coffee:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(198, 144, 85, 0.5);
  background: linear-gradient(135deg, #D4A373 0%, var(--caramel-primary) 100%);
  color: #FFFFFF;
}

.btn-coffee:active {
  transform: translateY(0);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-glass-bright);
  color: var(--caramel-light);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--color-danger-bg);
  color: #FF7675;
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-danger:hover {
  background: var(--color-danger);
  color: #FFFFFF;
}

.btn-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--color-success-bg);
  color: #2ECC71;
  border: 1px solid rgba(46, 204, 113, 0.3);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-success:hover {
  background: var(--color-success);
  color: #FFFFFF;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-coffee {
  background: rgba(198, 144, 85, 0.18);
  color: var(--caramel-light);
  border: 1px solid var(--caramel-primary);
}

.badge-success {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid rgba(46, 204, 113, 0.4);
}

.badge-warning {
  background: var(--color-warning-bg);
  color: var(--color-warning);
  border: 1px solid rgba(243, 156, 18, 0.4);
}

.badge-danger {
  background: var(--color-danger-bg);
  color: #FF7675;
  border: 1px solid rgba(231, 76, 60, 0.4);
}

.badge-info {
  background: var(--color-info-bg);
  color: var(--color-info);
  border: 1px solid rgba(52, 152, 219, 0.4);
}

/* Form Controls */
.form-group {
  margin-bottom: 16px;
}

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

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: rgba(18, 14, 12, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 14px;
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--caramel-primary);
  box-shadow: 0 0 0 3px rgba(198, 144, 85, 0.2);
  background: rgba(28, 22, 19, 0.9);
}

select.form-control {
  cursor: pointer;
}

/* ==========================================================================
   TOP-RIGHT MODERN TOAST ALERT SYSTEM (Auto-dismisses in 1.5 - 2s)
   ========================================================================== */
#toast-container {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-alert {
  pointer-events: auto;
  min-width: 320px;
  max-width: 420px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(28, 22, 19, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  overflow: hidden;
  animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-alert.hide {
  animation: toastSlideOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.toast-message {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
}

.toast-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.toast-close:hover {
  color: #FFFFFF;
}

/* Toast Progress Bar (Runs for 1.8s) */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: currentColor;
  opacity: 0.7;
  animation: toastProgress 1.8s linear forwards;
}

/* Variant Styles */
.toast-success {
  border-left: 4px solid var(--color-success);
}
.toast-success .toast-icon {
  background: var(--color-success-bg);
  color: var(--color-success);
}
.toast-success .toast-progress {
  background: var(--color-success);
}

.toast-error {
  border-left: 4px solid var(--color-danger);
}
.toast-error .toast-icon {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}
.toast-error .toast-progress {
  background: var(--color-danger);
}

.toast-warning {
  border-left: 4px solid var(--color-warning);
}
.toast-warning .toast-icon {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}
.toast-warning .toast-progress {
  background: var(--color-warning);
}

.toast-info {
  border-left: 4px solid var(--caramel-primary);
}
.toast-info .toast-icon {
  background: rgba(198, 144, 85, 0.2);
  color: var(--caramel-light);
}
.toast-info .toast-progress {
  background: var(--caramel-primary);
}

@keyframes toastSlideIn {
  0% {
    opacity: 0;
    transform: translateX(110%) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastSlideOut {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(110%) scale(0.92);
  }
}

@keyframes toastProgress {
  0% {
    width: 100%;
  }
  100% {
    width: 0%;
  }
}

/* ==========================================================================
   Modals (General Dialog System - Fully Scrollable & Responsive)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  overflow-y: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

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

.modal-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass-bright);
  border-radius: 18px;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(198, 144, 85, 0.2);
  max-width: 540px;
  width: 100%;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  margin: auto;
  position: relative;
}

.modal-container form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  margin: 0;
}

@keyframes modalPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-header {
  flex-shrink: 0;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(18, 14, 12, 0.85);
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-header h3 {
  margin: 0;
  font-size: 17px;
  color: var(--text-main);
  font-weight: 700;
}

.modal-body {
  padding: 22px 24px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--border-glass-bright);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--caramel-primary);
}

.modal-footer {
  flex-shrink: 0;
  padding: 16px 24px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: rgba(18, 14, 12, 0.85);
  position: sticky;
  bottom: 0;
  z-index: 10;
}

