/* Hardware POS System Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #374151; /* Dark gray instead of bright blue */
  --primary-dark: #1f2937; /* Darker gray for hover states */
  --secondary-color: #6b7280; /* Medium gray for secondary elements */
  --success-color: #059669;
  --warning-color: #d97706;
  --danger-color: #dc2626;
  --light-bg: #f9fafb; /* Very light gray background */
  --white: #ffffff;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-50: #f9fafb;
  --gray-600: #4b5563;
  --gray-800: #1f2937;
  --gray-900: #111827; /* Deep charcoal for text */
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --glass-bg: rgba(
    255,
    255,
    255,
    0.95
  ); /* Semi-transparent white for glass effect */
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--gray-900); /* Darker text for better contrast */
  background-color: var(--light-bg);
}

/* Login Page Styles */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Professional dark gradient background instead of bright blue */
  background: linear-gradient(135deg, #1f2937 0%, #374151 50%, #4b5563 100%);
  /* Added subtle pattern overlay for texture */
  background-image: radial-gradient(
      circle at 25% 25%,
      rgba(255, 255, 255, 0.05) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 75% 75%,
      rgba(255, 255, 255, 0.03) 0%,
      transparent 50%
    );
}

.login-container {
  width: 100%;
  max-width: 420px; /* Slightly wider for better proportions */
  padding: 20px;
}

/* Enhanced login card with glassy effect and professional styling */
.login-card {
  background: var(--glass-bg); /* Semi-transparent white for glass effect */
  backdrop-filter: blur(20px); /* Added blur for glassy appearance */
  -webkit-backdrop-filter: blur(20px); /* Safari support */
  border: 1px solid rgba(255, 255, 255, 0.2); /* Subtle border for glass effect */
  border-radius: 16px; /* More rounded corners for modern look */
  box-shadow: var(--shadow-lg); /* Enhanced shadow for depth */
  padding: 45px 35px; /* Increased padding for spacious feel */
}

/* Updated header styling with professional typography */
.login-header {
  text-align: center;
  margin-bottom: 35px; /* More spacing for better visual hierarchy */
}

.login-header h1 {
  color: var(--gray-900); /* Dark charcoal instead of bright blue */
  font-size: 32px; /* Larger, more impactful heading */
  font-weight: 700;
  margin-bottom: 12px; /* More space between title and subtitle */
  letter-spacing: -0.5px; /* Tighter letter spacing for modern look */
}

.login-header p {
  color: var(--gray-600);
  font-size: 15px; /* Slightly larger subtitle text */
  font-weight: 400;
}

/* Form Styles */
.form-group {
  margin-bottom: 24px; /* Increased spacing between form elements */
}

.form-group label {
  display: block;
  margin-bottom: 8px; /* More space between label and input */
  font-weight: 600; /* Bolder labels for better hierarchy */
  color: var(--gray-800);
  font-size: 14px;
  text-transform: uppercase; /* Uppercase labels for professional look */
  letter-spacing: 0.5px; /* Spaced letters for readability */
}

/* Enhanced input styling with focus states and professional appearance */
.form-group input {
  width: 100%;
  padding: 16px 20px; /* More generous padding for better touch targets */
  border: 2px solid var(--gray-200);
  border-radius: 12px; /* More rounded inputs to match card */
  font-size: 16px;
  background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent background */
  transition: all 0.3s ease;
  color: var(--gray-900);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color); /* Dark gray focus instead of blue */
  background-color: var(--white); /* Solid white on focus */
  box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.1); /* Subtle focus ring */
}

/* Button Styles */
.btn {
  padding: 16px 24px; /* More generous button padding */
  border: none;
  border-radius: 12px; /* Rounded to match inputs */
  font-size: 16px;
  font-weight: 600; /* Bolder button text */
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  text-transform: uppercase; /* Uppercase button text */
  letter-spacing: 0.5px; /* Spaced letters */
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  ); /* Gradient button */
  color: var(--white);
  box-shadow: 0 4px 15px rgba(55, 65, 81, 0.2); /* Button shadow */
}

.btn-primary:hover {
  background: linear-gradient(
    135deg,
    var(--primary-dark),
    var(--gray-900)
  ); /* Darker hover state */
  transform: translateY(-2px); /* Subtle lift effect on hover */
  box-shadow: 0 6px 20px rgba(55, 65, 81, 0.3); /* Enhanced shadow on hover */
}

.btn-full {
  width: 100%;
}

/* Redesigned demo accounts section with professional styling */
.demo-accounts {
  margin-top: 25px;
  padding: 20px; /* More padding for better spacing */
  background: rgba(243, 244, 246, 0.6); /* Semi-transparent background */
  backdrop-filter: blur(10px); /* Subtle blur effect */
  border-radius: 12px; /* Rounded corners to match design */
  text-align: center;
  border: 1px solid rgba(209, 213, 219, 0.3); /* Subtle border */
}

.demo-accounts p {
  font-weight: 600; /* Bolder heading */
  margin-bottom: 8px;
  color: var(--gray-800);
  font-size: 13px;
  text-transform: uppercase; /* Uppercase for consistency */
  letter-spacing: 0.5px;
}

.demo-accounts small {
  color: var(--gray-600);
  display: block;
  margin: 4px 0; /* More spacing between demo accounts */
  font-size: 13px;
  font-family: "Courier New", monospace; /* Monospace font for credentials */
  background: rgba(255, 255, 255, 0.5); /* Subtle background for credentials */
  padding: 4px 8px;
  border-radius: 6px;
  margin: 6px auto;
  display: inline-block;
}

/* Message Styles */
.message {
  margin-top: 15px;
  padding: 12px;
  border-radius: 6px;
  text-align: center;
  display: none;
}

.message.success {
  background-color: #dcfce7;
  color: var(--success-color);
  border: 1px solid #bbf7d0;
}

.message.error {
  background-color: #fef2f2;
  color: var(--danger-color);
  border: 1px solid #fecaca;
}

/* Dashboard Layout */
.dashboard {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--gray-200);
}

.sidebar-header h2 {
  color: var(--primary-color);
  font-size: 20px;
  font-weight: 700;
}

.sidebar-nav {
  padding: 20px 0;
}

.nav-item {
  display: block;
  padding: 12px 20px;
  color: var(--gray-600);
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.nav-item:hover,
.nav-item.active {
  background-color: var(--gray-100);
  color: var(--primary-color);
  border-left-color: var(--primary-color);
}

.main-content {
  flex: 1;
  margin-left: 250px;
  padding: 20px;
}

.header {
  background-color: var(--white);
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header h1 {
  color: var(--gray-800);
  font-size: 24px;
  font-weight: 600;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logout-btn {
  background-color: var(--danger-color);
  color: var(--white);
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

/* Dashboard Stats */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--white);
  padding: 25px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  text-align: center;
}

.stat-card h3 {
  color: var(--gray-600);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-color);
}

/* Dashboard Content */
.dashboard-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.recent-transactions,
.low-stock-alerts {
  background: var(--white);
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.recent-transactions h3,
.low-stock-alerts h3 {
  margin-bottom: 20px;
  color: var(--gray-800);
  font-size: 18px;
  font-weight: 600;
}

/* Table Styles */
.table-container {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.data-table th,
.data-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}

.data-table th {
  background-color: var(--gray-100);
  font-weight: 600;
  color: var(--gray-800);
  font-size: 14px;
}

.data-table td {
  font-size: 14px;
  color: var(--gray-600);
}

.data-table tr:hover {
  background-color: var(--gray-50);
}

/* Status badges */
.status-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.status-completed {
  background-color: #dcfce7;
  color: var(--success-color);
}

.status-pending {
  background-color: #fef3c7;
  color: var(--warning-color);
}

.status-cancelled {
  background-color: #fef2f2;
  color: var(--danger-color);
}

/* Low stock alerts */
.stock-alert {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  margin: 8px 0;
  background-color: var(--gray-100);
  border-radius: 6px;
  border-left: 4px solid var(--warning-color);
}

.stock-alert-info h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 2px;
}

.stock-alert-info p {
  font-size: 12px;
  color: var(--gray-600);
}

.stock-count {
  font-weight: 700;
  color: var(--warning-color);
}

/* Analytics Specific Styles */
.analytics-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.metric-card {
  background: var(--white);
  padding: 25px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 20px;
}

.metric-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
}

.sales-icon {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
}

.transactions-icon {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.profit-icon {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.avg-icon {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
}

.metric-info h3 {
  color: var(--gray-600);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 4px;
}

.metric-change {
  font-size: 12px;
  font-weight: 600;
}

.metric-change.positive {
  color: var(--success-color);
}

.metric-change.negative {
  color: var(--danger-color);
}

.analytics-charts {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.chart-container {
  background: var(--white);
  padding: 20px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.chart-header h3 {
  color: var(--gray-800);
  font-size: 18px;
  font-weight: 600;
}

.chart-controls {
  display: flex;
  gap: 5px;
}

.chart-btn {
  padding: 6px 12px;
  border: 1px solid var(--gray-300);
  background: var(--white);
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.chart-btn:hover,
.chart-btn.active {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.analytics-card {
  background: var(--white);
  padding: 20px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.analytics-card h3 {
  color: var(--gray-800);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
}

.category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-200);
}

.category-item:last-child {
  border-bottom: none;
}

.category-name {
  font-weight: 500;
  color: var(--gray-800);
}

.category-sales {
  font-weight: 600;
  color: var(--primary-color);
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-200);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.activity-info {
  flex: 1;
}

.activity-info h4 {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-800);
  margin-bottom: 2px;
}

.activity-info p {
  font-size: 12px;
  color: var(--gray-600);
}

.date-filter select {
  padding: 8px 12px;
  border: 2px solid var(--gray-200);
  border-radius: 6px;
  font-size: 14px;
  background: var(--white);
}

/* POS Interface Styles */
.pos-container {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 20px;
  height: calc(100vh - 120px);
}

.products-section {
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
  overflow-y: auto;
}

.cart-section {
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.product-card {
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.product-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow);
}

.product-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--gray-800);
}

.product-card .price {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-color);
}

.product-card .stock {
  font-size: 12px;
  color: var(--gray-600);
  margin-top: 5px;
}

/* Cart Styles */
.cart-items {
  flex: 1;
  overflow-y: auto;
  margin: 20px 0;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-200);
}

.cart-total {
  border-top: 2px solid var(--gray-300);
  padding-top: 15px;
  margin-top: 15px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  margin: 8px 0;
}

.total-row.final {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-color);
  border-top: 1px solid var(--gray-300);
  padding-top: 8px;
}

/* Print Styles */
@media print {
  body * {
    visibility: hidden;
  }

  .receipt,
  .receipt * {
    visibility: visible;
  }

  .receipt {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.mb-10 {
  margin-bottom: 10px;
}
.mb-20 {
  margin-bottom: 20px;
}
.mt-20 {
  margin-top: 20px;
}
.hidden {
  display: none;
}
.peso::before {
  content: "₱";
}

/* Responsive Design */
@media (max-width: 1024px) {
  .analytics-charts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .login-container {
    padding: 15px;
  }

  .login-card {
    padding: 30px 20px;
  }

  .dashboard-content {
    grid-template-columns: 1fr;
  }

  .dashboard-stats {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .stat-value {
    font-size: 24px;
  }

  .analytics-metrics {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .metric-card {
    padding: 20px;
    gap: 15px;
  }

  .metric-icon {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .metric-value {
    font-size: 24px;
  }

  .chart-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
}
