:root {
  --primary-bg: #1e2632;
  --secondary-bg: #2d3544;
  --input-bg: #374151;
  --text-primary: #ffffff;
  --text-secondary: #9ca3af;
  --accent: #aab325;
  --success: #10b981;
  --border-radius: 8px;
}

body {
  background-color: var(--primary-bg);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  margin: 0;
  min-height: 100vh;
}

/* Navigation Styling */
.sb-topnav {
  text-decoration: none;
}

.navbar-brand {
  font-size: 1.4rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  color: var(--accent);
}

.navbar-home {
  position: fixed;
  top: 2.5rem;
  left: 1rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--accent);  
  color: var(--text-primary);
  border-radius: 50%;
  padding: 0.2rem;
  font-size: 1.2rem;
  transition: background-color 0.2s;
}

.navbar-home:hover {
  background-color: #b5b89c;
}

/* Main Content Layout */
.container-fluid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem !important;
}

/* Form Elements */
form {
  background-color: var(--secondary-bg);
  padding: 0.5rem;
  margin: 0.5rem;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Table Number Input */
#table_number {
  background-color: var(--input-bg);
  border: 2px solid var(--input-bg);
  color: var(--text-primary);
  padding: 0.75rem;
  border-radius: var(--border-radius);
  font-size: 1.1rem;
  width: 120px;
  margin-bottom: 2rem;
  transition: border-color 0.2s;
}

#table_number:focus {
  outline: none;
  border-color: var(--accent);
}

/* Category Sections */
.category-section {
  background-color: var(--primary-bg);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
}

.category-section h3 {
  color: var(--accent);
  font-size: 1.3rem;
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Items List */
.items-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.item-entry {
  background-color: var(--secondary-bg);
  padding: 1rem;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.item-entry:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Quantity Inputs */
.quantity-input {
  background-color: var(--input-bg);
  border: 2px solid var(--input-bg);
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: var(--border-radius);
  width: 60px;
  font-size: 1rem;
  text-align: center;
  transition: border-color 0.2s;
}

.quantity-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Labels */
.item-entry label {
  color: var(--text-primary);
  font-size: 1rem;
  margin: 0;
  flex-grow: 1;
}

/* Submit Button */
input[type="submit"] {
  background-color: var(--accent);
  color: var(--text-primary);
  border: none;
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 2rem;
  transition: background-color 0.2s;
}

input[type="submit"]:hover {
  background-color: #e89200;
}

/* Headings */
h2 {
  color: var(--text-primary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--primary-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--secondary-bg);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Table Styling */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background-color: var(--secondary-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  margin: 1rem 0;
  border: none;
}

th {
  background-color: var(--primary-bg);
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1rem;
  text-align: left;
  border: none;
  font-size: 0.9rem;
}

td {
  padding: 1rem;
  border: none;
  border-top: 1px solid var(--primary-bg);
  color: var(--text-primary);
  vertical-align: top;
}

tr {
  transition: background-color 0.2s;
}

tr:hover {
  background-color: var(--input-bg);
}

/* Order Items List */
td ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

td li {
  background-color: var(--input-bg);
  margin-bottom: 0.5rem;
  padding: 0.75rem;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  font-size: 0.95rem;
}

td li::before {
  content: '•';
  color: var(--accent);
  font-weight: bold;
  margin-right: 0.5rem;
}

/* Category Labels */
td li strong {
  color: var(--accent);
  margin-right: 0.5rem;
}

/* Quantity Styling */
td li span.quantity {
  background-color: var(--accent);
  color: var(--text-primary);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-left: auto;
  font-weight: 600;
}

/* Button Styling */
button[type="submit"] {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: smaller;
  cursor: pointer;
  transition: all 0.2s;
}

.reset-btn {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 500;
  font-size: smaller;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

/* Complete Order Button */
form button {
  background-color: #0ea271;
  color: white;
}

form button:hover {
  background-color: #87c4af;
}

/* Delete Order Button */
.delete-btn {
  background-color: #ef4444;
  color: white;
}

.delete-btn:hover {
  background-color: #df7878;
}

/* Time and Table Number Styling */
td:nth-child(2), td:nth-child(3) {
  font-family: monospace;
  font-size: 1.1rem;
}

/* Order ID Styling */
td:first-child {
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--accent);
}

/* Responsive Design */
@media (max-width: 768px) {
  table {
      display: block;
      overflow-x: auto;
  }

  td, th {
      min-width: 120px;
  }

  td:last-child {
      min-width: 150px;
  }
}

/* Dashboard styles */
.dashboard-container {
  min-height: 100%;
  padding: 2rem;
  background-color: var(--primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-content {
  width: 100%;
  max-width: 1200px;
  text-align: center;
}

.dashboard-title {
  color: var(--text-primary);
  font-size: 2.5rem;
  margin-bottom: 3rem;
  font-weight: 600;
}

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  padding: 1rem;
}

.btn {
  position: relative;
  background-color: var(--secondary-bg);
  color: var(--text-primary);
  padding: 2rem 1.5rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
      45deg,
      transparent 0%,
      rgba(255, 255, 255, 0.05) 50%,
      transparent 100%
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.btn:hover::before {
  transform: translateX(100%);
}

.btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  border-color: var(--accent);
}

.btn-primary {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Button-specific styles */
.btn[href*="create_order"] {
  background-color: var(--accent);
}

.btn[href*="orders.active_orders"] {
  background-color: var(--success);
}

.btn[href*="orders.archived_orders"] {
  background-color: var(--secondary-bg);
}

/* Icons for buttons */
.btn::after {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.btn[href*="create_order"]::after {
  content: "\f058"; /* Plus circle icon */
}

.btn[href*="orders.active_orders"]::after {
  content: "\f0ae"; /* Tasks icon */
}

.btn[href*="orders.archived_orders"]::after {
  content: "\f187"; /* Archive icon */
}

/* Button descriptions */
.btn .description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  opacity: 0.8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .dashboard-title {
      font-size: 2rem;
      margin-bottom: 2rem;
  }

  .btn {
      min-height: 160px;
      padding: 1.5rem 1rem;
  }

  .btn-primary {
      font-size: 1.25rem;
  }
}


/* Alert Container Styles */
.container.mt-3 {
    max-width: 1200px;
    margin: 1rem auto;
}

/* Alert Styles */
.alert {
    position: relative;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* Close Button Styles */
.btn-close {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    transition: opacity 0.2s;
}

.btn-close:hover {
    opacity: 1;
}

/* Error List Styles */
.alert-danger ul {
    padding-left: 1.5rem;
    margin: 0;
}

.alert-danger li {
    margin-bottom: 0.25rem;
}

/* Animation Styles */
.fade {
    transition: opacity 0.15s linear;
}

.fade.show {
    opacity: 1;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .alert {
        padding: 0.75rem 1rem;
        margin-bottom: 0.75rem;
    }
    
    .btn-close {
        right: 0.75rem;
    }
}

/* Date Filter Styles */

.date-filter-form {
    display: flex;
    justify-content: center;
}

.filter-inputs {
    display: flex;
    gap: 15px;
    align-items: center;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-group label {
    font-weight: 500;
}

.input-group input {
    padding: 6px 10px;
    border-radius: 8px;
}

.reset-btn {
  background-color: #c95e93;
  color: white;
}

.reset-btn:hover {
  background-color: #cc88bd;
}

.filter-btn {
  background: #007bff;
  color: white;
}

.filter-btn:hover {
  background: #759bc4;
}

.filter-title-txt {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--accent);
}

.sb-topnav {
}

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