/* Wienerheim Brewery - Unified Theme
   Steampunk Gothic with Gold Accents
   Applied across all Command Center pages
*/

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

html {
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #1b2735 0%, #05060a 55%, #010206 100%);
  background-attachment: fixed;
  color: #f7f3e8;
  margin: 0;
  padding: 0;
}

/* ============================================
   TABBED NAVIGATION SYSTEM
   ============================================ */

.wienerheim-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Navigation Tabs */
.nav-tabs {
  background: linear-gradient(135deg, rgba(14, 17, 25, 0.98), rgba(7, 9, 14, 0.98));
  border-bottom: 2px solid rgba(245, 203, 120, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-tabs-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 8px;
}

.nav-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(243, 200, 108, 0.9);
  box-shadow: 0 0 12px rgba(243, 200, 108, 0.4);
  object-fit: cover;
  margin-right: 12px;
  background: radial-gradient(circle at 30% 30%, #3d2a1a, #050407 70%);
}

.nav-title {
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f3c86c;
  font-weight: 600;
  margin-right: auto;
  white-space: nowrap;
}

.nav-tabs-list {
  display: flex;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-tab {
  padding: 14px 20px;
  cursor: pointer;
  border: none;
  background: transparent;
  color: rgba(216, 203, 178, 0.7);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
  position: relative;
}

.nav-tab:hover {
  color: rgba(245, 203, 120, 0.95);
  background: rgba(245, 203, 120, 0.05);
}

.nav-tab.active {
  color: #f3c86c;
  border-bottom-color: #f3c86c;
  background: rgba(245, 203, 120, 0.08);
}

.nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #f3c86c, transparent);
  box-shadow: 0 0 8px rgba(243, 200, 108, 0.6);
}

/* Mobile responsive tabs */
@media (max-width: 900px) {
  .nav-tabs-container {
    flex-wrap: wrap;
    padding: 8px 12px;
  }
  
  .nav-title {
    font-size: 0.75rem;
  }
  
  .nav-tab {
    padding: 10px 14px;
    font-size: 0.75rem;
  }
  
  .nav-logo {
    width: 36px;
    height: 36px;
  }
}

/* Main Content Area */
.page-content {
  flex: 1;
  padding: 24px 32px 32px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 800px) {
  .page-content {
    padding: 16px;
  }
}

/* ============================================
   UNIFIED COMPONENT STYLES
   ============================================ */

/* Card/Section styling */
.card, .section {
  background: linear-gradient(135deg, rgba(14, 17, 25, 0.98), rgba(7, 9, 14, 0.98));
  border-radius: 14px;
  padding: 24px;
  box-shadow: 
    0 0 0 1px rgba(245, 203, 120, 0.08),
    0 18px 35px rgba(0, 0, 0, 0.7);
  margin-bottom: 24px;
}

.card h2, .section h2 {
  color: #f3c86c;
  font-size: 1.3rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(245, 203, 120, 0.3);
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid rgba(245, 203, 120, 0.75);
  background: radial-gradient(circle at 30% 0%, rgba(245, 203, 120, 0.35), rgba(8, 10, 14, 0.95));
  color: #f7e2b6;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.btn:hover {
  background: radial-gradient(circle at 30% 0%, rgba(245, 203, 120, 0.45), rgba(8, 10, 14, 0.95));
  box-shadow: 0 0 16px rgba(243, 200, 108, 0.4);
}

.btn-success {
  border-color: rgba(120, 180, 120, 0.8);
  background: radial-gradient(circle at 30% 0%, rgba(120, 180, 120, 0.35), rgba(10, 40, 20, 0.96));
  color: rgba(200, 255, 200, 0.94);
}

.btn-success:hover {
  background: radial-gradient(circle at 30% 0%, rgba(120, 180, 120, 0.45), rgba(10, 40, 20, 0.96));
}

.btn-danger {
  border-color: rgba(180, 80, 80, 0.8);
  background: radial-gradient(circle at 30% 0%, rgba(180, 80, 80, 0.35), rgba(40, 8, 8, 0.95));
  color: rgba(255, 220, 220, 0.94);
}

/* Inputs */
input, select, textarea {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(245, 203, 120, 0.6);
  background: rgba(10, 12, 16, 0.95);
  color: #f7f3e8;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: #f3c86c;
  box-shadow: 0 0 8px rgba(243, 200, 108, 0.3);
}

/* Stats/Metric boxes */
.stat-box {
  background: rgba(10, 12, 16, 0.6);
  border-left: 4px solid #f3c86c;
  padding: 16px;
  border-radius: 8px;
}

.stat-label {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 203, 120, 0.9);
  margin-bottom: 6px;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #f7e2b6;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 12px;
  background: rgba(245, 203, 120, 0.08);
  color: #f3c86c;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 2px solid rgba(245, 203, 120, 0.3);
}

td {
  padding: 12px;
  border-bottom: 1px solid rgba(245, 203, 120, 0.1);
  color: rgba(214, 203, 183, 0.95);
}

tr:hover {
  background: rgba(245, 203, 120, 0.03);
}

/* Alerts/Messages */
.alert {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 16px;
  border-left: 4px solid;
}

.alert-success {
  background: rgba(40, 180, 40, 0.15);
  border-left-color: #10b981;
  color: rgba(200, 255, 200, 0.94);
}

.alert-warning {
  background: rgba(245, 203, 120, 0.15);
  border-left-color: #f3c86c;
  color: rgba(245, 203, 120, 0.95);
}

.alert-error {
  background: rgba(180, 40, 40, 0.15);
  border-left-color: #ef4444;
  color: rgba(255, 220, 220, 0.94);
}

/* Grid layouts */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Loading states */
.loading {
  text-align: center;
  padding: 40px;
  color: rgba(245, 203, 120, 0.7);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ============================================
   UNIFIED STATUS/PHASE COLORS
   Used consistently across all pages
   ============================================ */

/* Status badges (small inline labels) */
.status-planning { background: rgba(100, 100, 100, 0.3); color: #aaa; }
.status-brewing { background: rgba(245, 158, 11, 0.3); color: #fbbf24; }
.status-fermenting { background: rgba(245, 203, 120, 0.25); color: #f3c86c; }
.status-conditioning { background: rgba(96, 165, 250, 0.3); color: #60a5fa; }
.status-completed { background: rgba(34, 197, 94, 0.3); color: #4ade80; }
.status-packaged { background: rgba(34, 197, 94, 0.3); color: #4ade80; }

/* Phase badges (larger status indicators) */
.phase-planning { background: rgba(100, 100, 100, 0.3); color: #aaa; }
.phase-brewing { background: rgba(245, 158, 11, 0.3); color: #fbbf24; }
.phase-fermenting { background: rgba(245, 203, 120, 0.25); color: #f3c86c; }
.phase-conditioning { background: rgba(96, 165, 250, 0.3); color: #60a5fa; }
.phase-completed { background: rgba(34, 197, 94, 0.3); color: #4ade80; }
.phase-packaged { background: rgba(34, 197, 94, 0.3); color: #4ade80; }

/* Footer */
.page-footer {
  margin-top: auto;
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(214, 197, 168, 0.7);
  border-top: 1px solid rgba(245, 203, 120, 0.1);
}

@media (max-width: 800px) {
  .page-footer {
    flex-direction: column;
    gap: 6px;
    padding: 16px;
  }
}

/* ============================================
   MODAL STYLES
   ============================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: linear-gradient(145deg, rgba(20, 22, 30, 0.98), rgba(10, 12, 18, 0.98));
  border: 1px solid rgba(245, 203, 120, 0.25);
  border-radius: 12px;
  padding: 25px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(245, 203, 120, 0.2);
}

.modal-header h2 {
  color: #f3c86c;
  margin: 0;
  font-size: 1.3rem;
}

.modal-close {
  background: none;
  border: none;
  color: rgba(214, 203, 183, 0.7);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px 10px;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #f3c86c;
}

.modal-body {
  color: #f7e2b6;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(245, 203, 120, 0.2);
}

/* ============================================
   NAV DROPDOWN STYLES
   ============================================ */

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: linear-gradient(145deg, rgba(20, 22, 30, 0.98), rgba(10, 12, 18, 0.98));
  border: 1px solid rgba(245, 203, 120, 0.25);
  border-radius: 8px;
  padding: 8px 0;
  min-width: 180px;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  list-style: none;
  margin: 0;
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu li {
  margin: 0;
}

.nav-dropdown-menu a {
  display: block;
  padding: 10px 18px;
  color: rgba(214, 203, 183, 0.85);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.nav-dropdown-menu a:hover {
  background: rgba(245, 203, 120, 0.15);
  color: #f3c86c;
}
