/* 
 * Dunamis Growth - Main CSS
 * Production version - 2025-10-10
 */

/* Base Styles */
:root {
  --primary: #673AB7;
  --primary-dark: #5E35B1;
  --primary-light: #D1C4E9;
  --accent: #FF4081;
  --text-primary: #212121;
  --text-secondary: #757575;
  --divider: #BDBDBD;
  --background: #F5F5F5;
  --white: #FFFFFF;
  --error: #F44336;
  --success: #4CAF50;
  --warning: #FF9800;
  --info: #2196F3;
  
  /* Role-based Theme Colors */
  --admin-primary: #37474F;
  --admin-secondary: #607D8B;
  --admin-light: #ECEFF1;
  
  --owner-primary: #FF6F00;
  --owner-secondary: #FF8F00;
  --owner-light: #FFF3E0;
  
  --manager-primary: #388E3C;
  --manager-secondary: #4CAF50;
  --manager-light: #E8F5E8;
  
  --waiter-primary: #1976D2;
  --waiter-secondary: #2196F3;
  --waiter-light: #E3F2FD;
  
  --customer-primary: #7B1FA2;
  --customer-secondary: #9C27B0;
  --customer-light: #F3E5F5;
}

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

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

body {
  font-family: 'Roboto', sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Improved text sizing for desktop */
@media (min-width: 1024px) {
  html {
    font-size: 17px;
  }
  
  body {
    font-size: 1rem;
  }
  
  .modal-body {
    font-size: 1.05rem;
  }
  
  .card {
    font-size: 1rem;
  }
  
  p, label, input, button, select, textarea {
    font-size: 1rem;
  }
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  text-align: center;
}

.hero-background {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.logo-container {
  margin-bottom: 3rem;
}

.hero-logo {
  width: 120px;
  height: 120px;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 2px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
  font-size: 2rem;
  font-weight: 300;
  margin: 0 0 1rem 0;
  letter-spacing: 1px;
  opacity: 0.9;
}

.hero-tagline {
  font-size: 1.2rem;
  font-weight: 400;
  opacity: 0.8;
  margin-bottom: 2rem;
}

.hero-description {
  margin-bottom: 3rem;
}

.hero-description h2 {
  font-size: 2.5rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: white;
}

.hero-description p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  margin-bottom: 0.5em;
  color: var(--text-primary);
}

.section-title {
  font-size: 2.5rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 1.2rem;
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.container-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: var(--primary-dark);
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.col {
  flex: 1;
  padding: 0 15px;
}

/* Dashboard Layout */
.dashboard-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background-color: var(--primary);
  color: var(--white);
  padding: 20px 0;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.main-content {
  flex-grow: 1;
  padding: 30px;
  overflow-x: hidden;
}

/* Navigation */
.nav-menu {
  list-style: none;
  flex-grow: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: var(--white);
  text-decoration: none;
  transition: background-color 0.3s;
}

.nav-link:hover, .nav-link.active {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-link .material-icons {
  margin-right: 10px;
}

/* Cards */
.card {
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 20px;
  margin-bottom: 20px;
}

.card-title {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Forms */
.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--divider);
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.form-control:focus {
  border-color: var(--primary);
  outline: none;
}

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 16px;
  background-color: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
  text-align: center;
}

.btn:hover {
  background-color: var(--primary-dark);
}

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

.btn.btn-secondary:hover {
  background-color: #616161;
}

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

.btn.btn-danger:hover {
  background-color: #D32F2F;
}

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

.btn.btn-success:hover {
  background-color: #388E3C;
}

.btn.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

.btn.btn-large {
  padding: 12px 20px;
  font-size: 16px;
}

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

.table th {
  background-color: #f5f5f5;
  padding: 12px 8px;
  text-align: left;
  font-weight: 500;
  color: var(--text-primary);
  border-bottom: 2px solid var(--divider);
}

.table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--divider);
}

.table tr:hover {
  background-color: #f9f9f9;
}

/* Tabs */
.tab-container {
  margin-bottom: 20px;
}

.tabs {
  display: flex;
  border-bottom: 1px solid var(--divider);
}

.tab {
  padding: 10px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
}

.tab.active {
  border-bottom-color: var(--primary);
  color: var(--primary);
}

.tab-content {
  display: none;
  padding: 20px 0;
}

.tab-content.active {
  display: block;
}

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
}

.alert .material-icons {
  margin-right: 10px;
}

.alert.alert-success {
  background-color: #E8F5E9;
  color: #2E7D32;
}

.alert.alert-error {
  background-color: #FFEBEE;
  color: #C62828;
}

.alert.alert-warning {
  background-color: #FFF8E1;
  color: #F57F17;
}

.alert.alert-info {
  background-color: #E3F2FD;
  color: #1565C0;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.badge.badge-primary {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

.badge.badge-success {
  background-color: #E8F5E9;
  color: #2E7D32;
}

.badge.badge-error {
  background-color: #FFEBEE;
  color: #C62828;
}

.badge.badge-warning {
  background-color: #FFF8E1;
  color: #F57F17;
}

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(103, 58, 183, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

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

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background-color: var(--white);
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transform: translateY(20px);
  transition: transform 0.3s;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background-color: var(--primary);
  color: var(--white);
}

.modal-header h3 {
  margin: 0;
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 500;
}

.modal-close {
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex-grow: 1;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.modal-body input[type="text"],
.modal-body input[type="email"],
.modal-body input[type="password"],
.modal-body input[type="number"],
.modal-body textarea,
.modal-body select {
  font-size: 1rem;
  padding: 12px;
  min-height: 44px;
  width: 100%;
  box-sizing: border-box;
}

.modal-body label {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
  color: var(--text-primary);
}

.modal-body p {
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.modal-body button {
  font-size: 1rem;
  padding: 12px 24px;
  min-height: 44px;
}

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

/* Review System */
.star-rating {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.star {
  color: #FFD700;
  font-size: 24px;
  cursor: pointer;
}

.star:hover ~ .star {
  color: #E0E0E0;
}

.rating-label {
  margin-left: 10px;
  font-weight: 500;
}

/* Notifications */
.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 350px;
}

.notification {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  background-color: var(--white);
  margin-bottom: 10px;
  transform: translateX(120%);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.notification-show {
  transform: translateX(0);
}

.notification.success {
  border-left: 4px solid var(--success);
}

.notification.error {
  border-left: 4px solid var(--error);
}

.notification.warning {
  border-left: 4px solid var(--warning);
}

.notification.info {
  border-left: 4px solid var(--info);
}

/* Responsive Design */
@media (max-width: 992px) {
  .sidebar {
    width: 200px;
  }
}

@media (max-width: 768px) {
  .dashboard-container {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 100;
    height: auto;
    padding: 10px 0;
    transform: translateY(100%);
  }
  
  .sidebar.active {
    transform: translateY(0);
  }
  
  .main-content {
    padding: 20px 15px 80px;
  }
  
  .nav-menu {
    display: flex;
    justify-content: space-around;
  }
  
  .nav-link {
    flex-direction: column;
    padding: 8px;
    font-size: 12px;
  }
  
  .nav-link .material-icons {
    margin-right: 0;
    margin-bottom: 5px;
  }
  
  .mobile-menu-toggle {
    display: block;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 101;
  }
}

@media (max-width: 576px) {
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  .card {
    padding: 15px;
  }
  
  .table {
    font-size: 14px;
  }
  
  .table th, .table td {
    padding: 8px 5px;
  }
  
  .modal {
    width: 95%;
    max-width: 95%;
  }
  
  .modal-body {
    padding: 16px;
    font-size: 0.95rem;
  }
  
  .modal-header h3 {
    font-size: 1.1rem;
  }
  
  /* Prevent text overlapping on mobile */
  .modal-body p,
  .modal-body label,
  .modal-body input,
  .modal-body button {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

/* Print Styles */
@media print {
  .sidebar, .mobile-menu-toggle, .btn, .notification-container {
    display: none !important;
  }
  
  .dashboard-container {
    display: block;
  }
  
  .main-content {
    padding: 0;
    width: 100%;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  body {
    background: white;
    font-size: 12pt;
  }
  
  a {
    text-decoration: underline;
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 1rem; }
.ml-4 { margin-left: 1.5rem; }
.ml-5 { margin-left: 3rem; }

.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 1rem; }
.mr-4 { margin-right: 1.5rem; }
.mr-5 { margin-right: 3rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.text-primary { color: var(--primary); }
.text-error { color: var(--error); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }

.bg-primary { background-color: var(--primary); }
.bg-light { background-color: var(--background); }
.bg-white { background-color: var(--white); }

.hidden { display: none !important; }
.invisible { visibility: hidden; }

.rounded { border-radius: 4px; }
.rounded-circle { border-radius: 50%; }

.shadow-sm { box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.shadow { box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.shadow-lg { box-shadow: 0 10px 30px rgba(0,0,0,0.15); }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }

/* Mobile-specific styles */
.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .mobile-only {
    display: block;
  }
  
  .desktop-only {
    display: none;
  }
}
