:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #22c55e;
  --danger: #ef4444;
  --bg: #f3f4f7;
  --bg-card: #ffffff;
  --border: #e5e7eb;
  --text: #111827;
}

* { box-sizing: border-box; }

/* ===== GLOBAL BODY ===== */
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
}

/* ===== BACKGROUND LOGO (LOGIN) ===== */
body.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;

  background:
    linear-gradient(rgba(255,255,255,0.92), rgba(255,255,255,0.92)),
    url('../img/logo.png') no-repeat center center;

  background-size: 60%;
  background-attachment: fixed;
}

/* ===== BACKGROUND LOGO (ALL PAGES) ===== */
body.main-body {
  min-height: 100vh;

  background:
    linear-gradient(rgba(255,255,255,0.92), rgba(255,255,255,0.92)),
    url('../img/logo.png') no-repeat center center;

  background-size: 50%;
  background-attachment: fixed;
}

/* ===== AUTH CARD ===== */
.auth-card {
  background: rgba(255, 255, 255, 0.97);
  border-radius: 18px;
  padding: 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 16px 30px rgba(15,23,42,0.15);
}

.logo-area {
  text-align: center;
  margin-bottom: 24px;
}

.logo {
  width: 80px;
  margin-bottom: 10px;
}

.logo-area h1 {
  margin: 8px 0 0;
  font-size: 20px;
}

/* ===== FORM ===== */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
}

/* PASSWORD */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  flex: 1;
}

.eye-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #666;
}

.eye-btn:hover {
  color: #000;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 14px;
  text-align: center;
  background: #ffffff;
  transition: 0.2s;
}

.btn:hover {
  background: #f3f4f6;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

.btn-small {
  padding: 4px 10px;
  font-size: 12px;
}

.btn.big {
  width: 100%;
  padding: 16px;
  margin-bottom: 16px;
  font-size: 16px;
}

/* ===== TOPBAR ===== */
.topbar {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-small {
  height: 32px;
}

.brand-name {
  font-weight: 600;
}

.user-info {
  font-size: 12px;
}

/* ===== CONTENT ===== */
.content {
  padding: 16px;
  max-width: 1100px;
  margin: auto;
}

/* ===== TABLE ===== */
.table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
}

.table th,
.table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

.table th {
  background: #f3f4f6;
  text-align: left;
}

/* ===== ALERTS ===== */
.alert {
  padding: 8px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
}

.alert-success {
  background: #dcfce7;
  color: #166534;
}

/* ===== CARDS ===== */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
  gap: 16px;
}

.card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--border);
}

.grid-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(160px,1fr));
  gap: 16px;
}

.card-link {
  display: block;
  background: var(--bg-card);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
}

/* ===== LANG ===== */
.lang-switch {
  margin-top: 12px;
  text-align: center;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .auth-card {
    margin: 0 12px;
  }

  .topbar {
    flex-direction: column;
    gap: 8px;
  }
}