/* Admin & Manager Dashboard Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  background: #f5f7fa;
  color: #2c3e50;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
.admin-header {
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.logo a {
  font-size: 1.5rem;
  font-weight: bold;
  color: #2c3e50;
  text-decoration: none;
}

.main-nav {
  display: flex;
  gap: 20px;
}

.nav-link {
  color: #2c3e50;
  text-decoration: none;
  padding: 8px 15px;
  border-radius: 5px;
  transition: background 0.3s;
}

.nav-link:hover {
  background: #f0f0f0;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: #2c3e50;
  border-radius: 2px;
}

/* Page Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.page-header h1 {
  font-size: 2rem;
  color: #2c3e50;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s;
}

.btn-primary {
  background: #3498db;
  color: white;
}

.btn-primary:hover {
  background: #2980b9;
}

.btn-secondary {
  background: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background: #7f8c8d;
}

.btn-danger {
  background: #e74c3c;
  color: white;
}

.btn-danger:hover {
  background: #c0392b;
}

.btn-info {
  background: #1abc9c;
  color: white;
}

.btn-info:hover {
  background: #16a085;
}

.btn-warning {
  background: #f39c12;
  color: white;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

.btn-block {
  display: block;
  width: 100%;
}

.btn-group {
  display: flex;
  gap: 5px;
}

/* Cards */
.card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.card-header {
  padding: 20px;
  border-bottom: 1px solid #ecf0f1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h2 {
  font-size: 1.5rem;
  color: #2c3e50;
}

.card-body {
  padding: 20px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: bold;
  color: #3498db;
  margin-bottom: 10px;
}

.stat-label {
  color: #7f8c8d;
  font-size: 14px;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3498db;
}

.form-group small {
  display: block;
  margin-top: 5px;
  color: #7f8c8d;
  font-size: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead {
  background: #f8f9fa;
}

.table th,
.table td {
  padding: 12px;
  text-align: right;
  border-bottom: 1px solid #ecf0f1;
}

.table th {
  font-weight: 600;
  color: #2c3e50;
}

.table tr:hover {
  background: #f8f9fa;
}

.table-logo {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  margin-left: 10px;
  vertical-align: middle;
}

.table-image {
  width: 50px;
  height: 50px;
  border-radius: 5px;
  object-fit: cover;
  margin-left: 10px;
  vertical-align: middle;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 500;
}

.badge-success {
  background: #d4edda;
  color: #155724;
}

.badge-danger {
  background: #f8d7da;
  color: #721c24;
}

.badge-info {
  background: #d1ecf1;
  color: #0c5460;
}

.badge-warning {
  background: #fff3cd;
  color: #856404;
}

/* Alerts */
.alert {
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

/* Action Cards */
.action-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.action-card {
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: #2c3e50;
  transition: transform 0.3s, box-shadow 0.3s;
}

.action-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.action-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  text-align: center;
}

.action-card h3 {
  margin-bottom: 10px;
  color: #2c3e50;
}

.action-card p {
  color: #7f8c8d;
  font-size: 14px;
}

/* Items Grid */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.item-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.item-card:hover {
  transform: translateY(-3px);
}

.item-unavailable {
  opacity: 0.6;
}

.item-image {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: #ecf0f1;
}

.item-body {
  padding: 15px;
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 10px;
}

.item-header h3 {
  font-size: 1.1rem;
  margin: 0;
}

.item-badges {
  display: flex;
  gap: 5px;
}

.item-category {
  color: #7f8c8d;
  font-size: 12px;
  margin-bottom: 10px;
}

.item-description {
  font-size: 14px;
  color: #555;
  margin-bottom: 10px;
}

.item-price {
  font-size: 1.3rem;
  font-weight: bold;
  color: #27ae60;
  margin-bottom: 15px;
}

.item-actions {
  display: flex;
  gap: 5px;
}

/* Notifications List */
.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.notification-item {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border-right: 4px solid #3498db;
}

.notification-inactive {
  opacity: 0.6;
  border-right-color: #95a5a6;
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.notification-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.notification-message {
  margin: 10px 0;
  color: #555;
}

.notification-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

/* Period Selector */
.period-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

/* Chart Container */
.chart-container {
  position: relative;
  height: 300px;
}

/* Token Display */
.token-display {
  background: #f8f9fa;
  padding: 5px 10px;
  border-radius: 3px;
  font-family: monospace;
  margin-left: 10px;
}

/* Login Page */
.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  width: 100%;
  height: 100%;
  --color: #1e1e1e;
  background-color: #0c0c0c;
  background-image: linear-gradient(
      0deg,
      transparent 24%,
      var(--color) 25%,
      var(--color) 26%,
      transparent 27%,
      transparent 74%,
      var(--color) 75%,
      var(--color) 76%,
      transparent 77%,
      transparent
    ),
    linear-gradient(
      90deg,
      transparent 24%,
      var(--color) 25%,
      var(--color) 26%,
      transparent 27%,
      transparent 74%,
      var(--color) 75%,
      var(--color) 76%,
      transparent 77%,
      transparent
    );
  background-size: 55px 55px;
}

.login-container {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.login-card {
  background: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.login-card h1 {
  text-align: center;
  margin-bottom: 30px;
  color: #2c3e50;
}

/* Filter Form */
.filter-form .form-row {
  align-items: end;
}

/* Utilities */
.text-center {
  text-align: center;
}

.text-muted {
  color: #7f8c8d;
}

.mt-3 {
  margin-top: 15px;
}

.link {
  color: #3498db;
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .header-content {
    padding: 10px 15px;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 60px;
    right: 0;
    left: 0;
    background: white;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 10px;
  }

  .main-nav.active {
    display: flex;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .page-header {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .action-cards {
    grid-template-columns: 1fr;
  }

  .items-grid {
    grid-template-columns: 1fr;
  }

  .btn-group {
    flex-direction: column;
  }

  .table {
    font-size: 12px;
  }

  .table th,
  .table td {
    padding: 8px;
  }

  .login-card {
    padding: 30px 20px;
  }

  .period-selector {
    flex-wrap: wrap;
  }

  .notification-footer {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .stat-value {
    font-size: 2rem;
  }

  .card-header {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
}

/* Icon Sizes - Material Design Based */
.icon-svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  vertical-align: middle;
  display: inline-block;
  transition: all 0.2s ease;
}

/* Icon Size Variants */
.icon-xs {
  width: 14px !important;
  height: 14px !important;
}

.icon-sm {
  width: 16px !important;
  height: 16px !important;
}

.icon-md {
  width: 20px !important;
  height: 20px !important;
}

.icon-lg {
  width: 24px !important;
  height: 24px !important;
}

.icon-xl {
  width: 32px !important;
  height: 32px !important;
}

.icon-2xl {
  width: 40px !important;
  height: 40px !important;
}

.icon-3xl {
  width: 48px !important;
  height: 48px !important;
}

/* Context-specific size aliases */
.icon-inline {
  width: 18px !important;
  height: 18px !important;
}

.icon-btn {
  width: 16px !important;
  height: 16px !important;
}

.icon-badge {
  width: 16px !important;
  height: 16px !important;
}

.icon-header {
  width: 32px !important;
  height: 32px !important;
}

.icon-empty {
  width: 80px !important;
  height: 80px !important;
  opacity: 0.3;
}

.icon-accessibility-btn {
  width: 32px !important;
  height: 32px !important;
}

.nav-icon-svg {
  width: 24px !important;
  height: 24px !important;
}

/* Context-based icon sizing */
.btn-sm .icon-svg {
  width: 14px;
  height: 14px;
}

.btn .icon-svg {
  width: 16px;
  height: 16px;
  margin-left: 4px;
}

.btn-lg .icon-svg {
  width: 20px;
  height: 20px;
}

.badge .icon-svg {
  width: 14px;
  height: 14px;
  margin-left: 3px;
}

.stat-value .icon-svg {
  width: 28px;
  height: 28px;
  margin-left: 8px;
}

h1 .icon-svg {
  width: 32px;
  height: 32px;
}

h2 .icon-svg {
  width: 28px;
  height: 28px;
}

h3 .icon-svg {
  width: 24px;
  height: 24px;
}

h4 .icon-svg {
  width: 20px;
  height: 20px;
}

small .icon-svg {
  width: 12px;
  height: 12px;
}

/* Alert and notification icons */
.alert .icon-svg,
.notification .icon-svg {
  width: 20px;
  height: 20px;
  margin-left: 6px;
}

/* Table cell icons */
td .icon-svg {
  width: 16px;
  height: 16px;
}

/* Icon-only buttons (no text) */
.btn-icon-only .icon-svg {
  margin: 0;
}

/* Icon spacing when inline with text */
.icon-svg + * {
  margin-right: 4px;
}

* + .icon-svg {
  margin-right: 4px;
}

}

.text-danger .icon-svg,
.btn-danger .icon-svg,
.badge-danger .icon-svg {
  color: inherit;
}

.text-warning .icon-svg,
.btn-warning .icon-svg,
.badge-warning .icon-svg {
  color: inherit;
}

.text-info .icon-svg,
.btn-info .icon-svg,
.badge-info .icon-svg {
  color: inherit;
}

/* RTL Icon Adjustments - Selective Mirroring */
/* By default, icons are NOT mirrored */
[dir="rtl"] .icon-svg {
  transform: none;
}

/* Only mirror directional icons that need it */
[dir="rtl"] .icon-arrow-back,
[dir="rtl"] .icon-arrow-forward,
[dir="rtl"] .icon-arrow {
  transform: scaleX(-1);
}

/* Ensure vertical alignment is correct */
.icon-svg {
  vertical-align: -0.125em;
  line-height: 1;
}

/* Icon in flex containers - improved alignment */
.btn,
.badge,
.alert {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn .icon-svg {
  flex-shrink: 0;
}

/* Icon hover effects - subtle */
.btn:hover .icon-svg,
button:hover .icon-svg {
  transform: scale(1.08);
  transition: transform 0.2s ease;
}

/* Maintain RTL mirror on hover for directional icons */
[dir="rtl"] .btn:hover .icon-arrow-back,
[dir="rtl"] .btn:hover .icon-arrow-forward,
[dir="rtl"] .btn:hover .icon-arrow {
  transform: scaleX(-1) scale(1.08);
}

/* Icon animations */
@keyframes icon-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.icon-spin {
  animation: icon-spin 1s linear infinite;
}

@keyframes icon-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.icon-pulse {
  animation: icon-pulse 2s ease-in-out infinite;
}

/* Icon colors inherit from parent */
.icon-svg {
  color: inherit;
  fill: currentColor;
}
