/* Global Variables */
:root {
  --primary-color: #00b894;
  --primary-hover: #009f7a;
  --background-color: #f9f9f9;
  --surface-color: #ffffff;
  --border-color: #e0e0e0;
  --text-color: #333333;
  --text-secondary: #666666;
  --error-color: #ff6b6b;
  --success-color: #51cf66;
  --warning-color: #fcc419;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

/* Base */
body {
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  direction: rtl;
  min-height: 100vh;
  line-height: 1.7;
}

.container {
  padding: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Navigation */
nav {
  background-color: var(--surface-color);
  padding: 15px 30px;
  display: flex;
  gap: 30px;
  flex-direction: row-reverse;
  box-shadow: 0 3px 12px var(--shadow-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
  padding: 8px 14px;
  border-radius: 8px;
  transition: 0.3s ease;
}

nav a:hover {
  background-color: var(--primary-color);
  color: white;
}

nav a.active {
  background-color: var(--primary-color);
  color: white;
}

/* Typography */
h1, h2, h3, h4 {
  color: var(--primary-color);
  margin: 0 0 20px;
}

h1 {
  font-size: 2.5rem;
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 12px;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.6rem;
}

h4 {
  font-size: 1.3rem;
}

/* Form Elements */
input, select, button {
  padding: 14px 18px;
  margin: 10px 0;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 1.05rem;
  transition: 0.3s;
}

input[type=text],
input[type=number],
input[type=password],
input[type=date],
select {
  width: 100%;
  max-width: 450px;
  background-color: var(--surface-color);
  color: var(--text-color);
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 184, 148, 0.2);
}

/* Buttons */
button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: bold;
  min-width: 150px;
}

button:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

button:active {
  transform: translateY(0);
}

button.secondary {
  background-color: var(--surface-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

button.danger {
  background-color: var(--error-color);
}

button.success {
  background-color: var(--success-color);
}

button.warning {
  background-color: var(--warning-color);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 30px 0;
  box-shadow: 0 0 20px var(--shadow-color);
  border-radius: 10px;
  overflow: hidden;
}

th, td {
  border: 1px solid var(--border-color);
  padding: 15px 18px;
  text-align: center;
}

th {
  background-color: var(--primary-color);
  color: white;
  font-weight: 700;
}

tr:nth-child(even) {
  background-color: #f4f4f4;
}

tr:hover {
  background-color: #e9f7f5;
}

/* Alerts */
.alert {
  padding: 15px 20px;
  border-radius: 8px;
  margin: 20px 0;
  font-weight: 500;
  border-left: 5px solid;
}

.alert.success {
  background-color: #e6f7ec;
  border-color: var(--success-color);
}

.alert.error {
  background-color: #ffe6e6;
  border-color: var(--error-color);
}

.alert.warning {
  background-color: #fff7e6;
  border-color: var(--warning-color);
}

/* Receipt Box */
.receipt {
  background-color: var(--surface-color);
  padding: 25px;
  margin: 30px 0;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 10px var(--shadow-color);
}

.receipt h3 {
  text-align: center;
  margin-bottom: 15px;
  color: var(--primary-color);
}

/* Utilities */
.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

.hidden {
  display: none;
}

/* Responsive */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    gap: 15px;
    padding: 12px;
  }

  .container {
    padding: 20px;
  }

  input, select {
    max-width: 100%;
  }

  table, th, td {
    font-size: 0.9rem;
  }

  nav a {
    font-size: 1rem;
  }
}
