* {
  box-sizing: border-box;
}
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #ec4899 0%, #ec4899 100%);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 20px;
}
.container {
  max-width: 1400px;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Enhanced Welcome Hero Section */
.welcome-hero {
  background: linear-gradient(135deg, #ec4899 0%, #ec4899 50%, #ec4899 100%);
  color: white;
  padding: 50px 60px;
  position: relative;
  overflow: hidden;
}

.welcome-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  animation: rotate 20s linear infinite;
}

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

.hero-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-title {
  flex: 1;
}

.welcome-label {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  color: #fbbf24;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-title h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin: 0 0 15px 0;
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 50%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  letter-spacing: -2px;
}

.hero-title p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin: 0;
  font-weight: 400;
  max-width: 500px;
  line-height: 1.5;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: right;
}

.user-level .level-label {
  display: inline-block;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #92400e;
  padding: 12px 25px;
  border-radius: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.95rem;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.current-date {
  font-size: 1rem;
  opacity: 0.8;
  font-weight: 500;
}

.hero-actions {
  position: absolute;
  top: 30px;
  right: 60px;
}

.logout-btn-modern {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 15px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.logout-btn-modern:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

nav {
  margin-bottom: 30px;
}
nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
}
nav li {
  display: inline;
}
nav a {
  background: #e83e8c;
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s;
  font-weight: 500;
}
nav a:hover {
  background: #c2185b;
}

/* Dashboard Icons Navigation */
.dashboard-icons {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 40px 0;
  padding: 20px 0;
  flex-wrap: wrap;
}

.icon-link {
  display: inline-block;
  text-decoration: none;
  padding: 35px;
  border-radius: 20px;
  background: white;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border: 2px solid rgba(232, 62, 140, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.icon-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #e83e8c, #d63384, #c2185b);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.icon-link:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 35px rgba(232, 62, 140, 0.2);
  border-color: rgba(232, 62, 140, 0.3);
}

.icon-link:hover::before {
  opacity: 1;
}

.icon-link.featured {
  background: linear-gradient(135deg, #fff5f7 0%, #fce4ec 100%);
  border-color: rgba(232, 62, 140, 0.4);
  box-shadow: 0 12px 30px rgba(232, 62, 140, 0.2);
}

.icon-link.admin {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  border-color: rgba(255, 193, 7, 0.4);
  box-shadow: 0 12px 30px rgba(255, 193, 7, 0.2);
}

.icon-link.admin::before {
  background: linear-gradient(90deg, #ffc107, #fd7e14, #e0a800);
}

.icon {
  font-size: 4.5rem;
  display: block;
  text-align: center;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.15));
}

/* Dashboard Stats Cards */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 30px;
  padding: 0 10px;
}

.stats-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 15px;
  padding: 25px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  border: 2px solid rgba(108, 117, 125, 0.1);
  transition: all 0.3s ease;
}

.stats-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12), 0 6px 15px rgba(0, 0, 0, 0.06);
  border-color: rgba(232, 62, 140, 0.2);
}

.stats-icon {
  font-size: 2.5rem;
  opacity: 0.8;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.stats-info h4 {
  font-size: 2rem;
  font-weight: 700;
  color: #495057;
  margin: 0 0 5px 0;
  letter-spacing: -0.5px;
}

.stats-info p {
  font-size: 0.9rem;
  color: #6c757d;
  margin: 0;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
section {
  margin-bottom: 40px;
}
h2 {
  color: #495057;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
  padding-bottom: 10px;
  margin-bottom: 20px;
}
.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}
.form-row > * {
  flex: 1;
}
input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea,
button {
  padding: 12px 15px;
  border: 1px solid #ced4da;
  border-radius: 5px;
  font-size: 16px;
  margin-bottom: 0;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #e83e8c;
  box-shadow: 0 0 5px rgba(232, 99, 140, 0.5);
}
textarea {
  resize: vertical;
  min-height: 80px;
}
button {
  background: #e83e8c;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: background 0.3s, transform 0.1s;
}
button:hover {
  background: #c2185b;
  transform: translateY(-1px);
}
/* Enhanced Table Styling */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.05);
  background: white;
  border: 2px solid rgba(232, 62, 140, 0.1);
}

th {
  background: linear-gradient(135deg, #e83e8c 0%, #d63384 100%);
  color: white;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 14px;
  padding: 20px 15px;
  text-align: left;
  border: none;
  position: relative;
}

th:first-child {
  border-top-left-radius: 12px;
}

th:last-child {
  border-top-right-radius: 12px;
}

td {
  padding: 15px;
  border-bottom: 1px solid #dee2e6;
  border-right: 1px solid #dee2e6;
  background: white;
  transition: all 0.3s ease;
  vertical-align: middle;
}

td:last-child {
  border-right: none;
}

tbody tr {
  transition: all 0.3s ease;
}

tbody tr:hover {
  background: linear-gradient(135deg, #fff5f7 0%, #fce4ec 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(232, 62, 140, 0.1);
}

/* Additional Table Styling Enhancements */
.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.table-summary {
  margin-top: 20px;
  padding: 15px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 10px;
  border: 2px solid rgba(232, 62, 140, 0.1);
  text-align: center;
}

.summary-text {
  margin: 0;
  color: #495057;
  font-size: 16px;
  font-weight: 600;
}

.warning-text {
  color: #fd7e14;
  font-weight: 700;
}

/* Info displays in tables */
.date-info,
.user-info,
.customer-info {
  font-size: 14px;
}

.amount {
  font-weight: 700;
  font-size: 15px;
}

.total-amount {
  color: #28a745;
  font-size: 16px;
}

.paid-amount {
  color: #007bff;
}

.change-amount {
  font-size: 15px;
}

.change-amount.positive {
  color: #28a745;
}

.change-amount.negative {
  color: #dc3545;
}

.customer-name,
.user-name {
  font-size: 15px;
  font-weight: 600;
}

.contact-info,
.address-info,
.description-info {
  font-size: 13px;
  max-width: 200px;
}

.transaction-count,
.transaction-count-user {
  color: #6c757d;
  font-weight: 600;
}

.no-customer,
.no-contact,
.no-address,
.no-description {
  color: #6c757d;
  font-style: italic;
}

/* Price displays */
.price-info,
.item-info,
.username-info,
.stats-info {
  font-size: 14px;
  line-height: 1.4;
}

.selling-price {
  color: #28a745;
  font-weight: 700;
  font-size: 15px;
}

.buying-price,
.profit-margin,
.current-indicator {
  color: #6c757d;
  font-size: 12px;
}

/* Stock and status badges */
.stock-quantity {
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 13px;
}

.stock-quantity.in-stock {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
}

.stock-quantity.low-stock {
  background: rgba(253, 126, 20, 0.1);
  color: #fd7e14;
}

.stock-quantity.out-of-stock {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

.status-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.status-badge.in-stock {
  background: rgba(40, 167, 69, 0.15);
  color: #28a745;
  border: 2px solid rgba(40, 167, 69, 0.3);
}

.status-badge.low-stock {
  background: rgba(253, 126, 20, 0.15);
  color: #fd7e14;
  border: 2px solid rgba(253, 126, 20, 0.3);
}

.status-badge.out-of-stock {
  background: rgba(220, 53, 69, 0.15);
  color: #dc3545;
  border: 2px solid rgba(220, 53, 69, 0.3);
}

.status-badge.active {
  background: rgba(40, 167, 69, 0.15);
  color: #28a745;
  border: 2px solid rgba(40, 167, 69, 0.3);
}

.status-badge.current {
  background: rgba(0, 123, 255, 0.15);
  color: #007bff;
  border: 2px solid rgba(0, 123, 255, 0.3);
}

.item-row.low-stock {
  border-left: 4px solid #fd7e14;
}

.item-row.out-of-stock {
  border-left: 4px solid #dc3545;
}

/* User level badges */
.level-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.admin-badge {
  background: linear-gradient(
    135deg,
    rgba(255, 193, 7, 0.2) 0%,
    rgba(255, 193, 7, 0.1) 100%
  );
  color: #856404;
  border: 2px solid rgba(255, 193, 7, 0.3);
}

.kasir-badge {
  background: linear-gradient(
    135deg,
    rgba(0, 123, 255, 0.2) 0%,
    rgba(0, 123, 255, 0.1) 100%
  );
  color: #004085;
  border: 2px solid rgba(0, 123, 255, 0.3);
}

.current-user {
  background: linear-gradient(
    135deg,
    #fff3cd 0%,
    #fff3cd 50%,
    #f8f9fa 100%
  ) !important;
  border-left: 4px solid #ffc107;
}

/* Print button styling */
.print-btn {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.print-btn:hover {
  background: linear-gradient(135deg, #218838 0%, #1cb67b 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
  text-decoration: none;
}

/* Inline forms improvements */
.inline-form {
  background: rgba(248, 249, 250, 0.8);
  border: 1px solid rgba(232, 62, 140, 0.2);
  border-radius: 8px;
  padding: 12px;
  transition: all 0.3s ease;
}

.inline-form:hover {
  background: rgba(248, 249, 250, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.price-inputs {
  display: flex;
  gap: 10px;
}

.price-inputs input {
  flex: 1;
}

.form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

tbody tr:nth-child(even) {
  background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
}

tbody tr:nth-child(even):hover {
  background: linear-gradient(135deg, #fef2f8 0%, #fce7f3 100%);
}

tbody tr:last-child td:last-child {
  border-bottom-right-radius: 12px;
}

tbody tr:last-child td:first-child {
  border-bottom-left-radius: 12px;
}

/* Enhanced Action Buttons in Tables */
td form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
}

td input,
td select,
td textarea {
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  font-size: 14px;
  min-width: 80px;
  max-width: 120px;
  transition: all 0.2s ease;
}

td input:focus,
td select:focus,
td textarea:focus {
  outline: none;
  border-color: #e83e8c;
  box-shadow: 0 0 0 3px rgba(232, 62, 140, 0.1);
}

td .edit-btn {
  background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.3s ease;
}

td .edit-btn:hover {
  background: linear-gradient(135deg, #ffca2c 0%, #fd9142 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
}

td .delete-btn {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.3s ease;
}

td .delete-btn:hover {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}
.success {
  color: #28a745;
  font-weight: 500;
  text-align: center;
  margin-bottom: 20px;
}
.error {
  color: #dc3545;
  font-weight: 500;
  text-align: center;
  margin-bottom: 20px;
}
.center {
  text-align: center;
}
.no-print {
  text-align: center;
  margin-top: 20px;
}
a.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}
a.back-link:hover {
  text-decoration: underline;
}

/* Transaction Item Rows */
.item-row {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 15px;
  padding: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(232, 62, 140, 0.1);
  transition: all 0.3s ease;
}

.item-row:hover {
  box-shadow: 0 6px 20px rgba(232, 62, 140, 0.15);
  transform: translateY(-2px);
}

.item-row select,
.item-row input {
  flex: 1;
  padding: 12px 15px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: white;
}

.item-row select:focus,
.item-row input:focus {
  outline: none;
  border-color: #e83e8c;
  box-shadow: 0 0 0 3px rgba(232, 62, 140, 0.1);
}

.item-row .remove-item {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 14px;
}

.item-row .remove-item:hover {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* Total Section Enhancement */
.total-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 20px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
  border: 2px solid rgba(232, 62, 140, 0.1);
  flex-wrap: wrap;
  gap: 15px;
}

.total-section strong {
  color: #495057;
  font-size: 18px;
  font-weight: 700;
}

.total-section #bayar {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 2px solid #28a745;
  font-weight: 600;
}

.total-section #bayar:focus {
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
  border-color: #28a745;
}

/* Dashboard Icons Responsive */
@media (max-width: 768px) {
  .container {
    padding: 20px;
  }
  nav ul {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  td form {
    flex-direction: column;
    gap: 5px;
    align-items: stretch;
  }

  .welcome-hero {
    padding: 30px 30px;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 25px;
  }

  .hero-title h1 {
    font-size: 2.5rem;
  }

  .hero-title p {
    font-size: 1rem;
  }

  .hero-meta {
    text-align: center;
    gap: 10px;
  }

  .hero-actions {
    position: static;
    display: flex;
    justify-content: center;
    margin-top: 20px;
  }

  .dashboard-icons {
    gap: 20px;
    flex-wrap: wrap;
    margin: 30px 0;
    padding: 15px 0;
  }

  .icon-link {
    padding: 20px;
  }

  .icon {
    font-size: 2.5rem;
  }

  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0;
    margin-top: 20px;
  }

  .stats-card {
    padding: 20px;
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .stats-info h4 {
    font-size: 1.5rem;
  }

  table {
    font-size: 14px;
  }

  th,
  td {
    padding: 12px 8px;
  }

  .item-row {
    flex-direction: column;
    gap: 10px;
    padding: 15px;
  }

  .item-row select,
  .item-row input {
    width: 100%;
  }

  .total-section {
    flex-direction: column;
    text-align: center;
  }

  .total-section strong {
    font-size: 16px;
  }

  tbody tr:hover {
    transform: none;
  }

  .item-row:hover {
    transform: none;
  }

  .icon-link:hover {
    transform: none;
    scale: none;
  }

  .stats-card:hover {
    transform: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  }
}

@media (max-width: 480px) {
  .dashboard-icons {
    flex-direction: row;
    gap: 15px;
    justify-content: center;
    padding: 10px 0;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .stats-card {
    padding: 15px;
    flex-direction: row;
    text-align: left;
    gap: 15px;
  }

  .stats-icon {
    font-size: 2rem;
    min-width: 50px;
  }

  .stats-info h4 {
    font-size: 1.25rem;
  }
}

