:root {
  --bg: #f5f3ef;
  --card: #ffffff;
  --text: #2b2620;
  --muted: #847d70;
  --accent: #8a6d4b;
  --accent-dark: #6e5638;
  --border: #e5ddd0;
  --green: #4a7c4a;
  --amber: #b8860b;
  --blue: #4a6fa5;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
}

header.topbar {
  background: var(--accent);
  color: #fff;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header.topbar h1 {
  font-size: 18px;
  margin: 0;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--accent-dark); }
.btn.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn.danger {
  background: #b3463f;
}
.btn.small {
  padding: 6px 10px;
  font-size: 13px;
}

input, select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  margin-bottom: 10px;
  background: #fff;
  color: var(--text);
}

label {
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}

.field { margin-bottom: 10px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--border);
}
[dir="rtl"] th, [dir="rtl"] td { text-align: right; }

.muted { color: var(--muted); font-size: 13px; }

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  color: #fff;
}
.badge.new { background: var(--muted); }
.badge.progress { background: var(--blue); }
.badge.done { background: var(--amber); }
.badge.delivered { background: var(--green); }

.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }

.client-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.client-list-item:last-child { border-bottom: none; }

.link-box {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #faf8f4;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 8px;
  font-size: 12px;
  word-break: break-all;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.tabs button {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
.tabs button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.error { color: #b3463f; font-size: 13px; margin: 6px 0; }
.center { text-align: center; }
.hidden { display: none !important; }

a.lang-switch {
  color: #fff;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}

footer.note {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 20px 0;
}
