/* Shared styling for login / signup / editor / admin pages */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: black;
  color: white;
  font-family: "Almarai", sans-serif;
  min-height: 100vh;
}

.account-wrap {
  max-width: 460px;
  margin: 0 auto;
  padding: 12vh 6vw 8vh 6vw;
}

.dashboard-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 10vh 6vw 8vh 6vw;
}

.account-logo {
  display: block;
  height: 42px;
  margin: 0 auto 4vh auto;
}

h1.account-title {
  font-family: "Spectral", serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  text-align: center;
  margin-bottom: 1vh;
}

p.account-sub {
  text-align: center;
  color: #b3b3b3;
  margin-bottom: 4vh;
  line-height: 1.5;
}

.field {
  margin-bottom: 1.6rem;
}

.field label {
  display: block;
  font-size: 0.9rem;
  color: #cccccc;
  margin-bottom: 0.5rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background-color: #161616;
  border: 1px solid #333;
  border-radius: 8px;
  color: white;
  font-family: inherit;
  font-size: 1rem;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: #ff7c7c;
}

.btn {
  display: inline-block;
  width: 100%;
  background-color: #ff7c7c;
  color: white;
  font-family: inherit;
  font-weight: bold;
  font-size: 1.05rem;
  border: none;
  border-radius: 8px;
  padding: 0.95rem 1rem;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.btn-secondary {
  background-color: transparent;
  border: 1px solid #555;
  color: white;
  width: auto;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
}

.account-link {
  display: block;
  text-align: center;
  margin-top: 3vh;
  color: #ff9191;
  text-decoration: none;
}

.account-link:hover {
  text-decoration: underline;
}

.message {
  padding: 0.9rem 1rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  line-height: 1.4;
  display: none;
}

.message.error {
  background-color: #3a1c1c;
  border: 1px solid #7a2e2e;
  color: #ffb3b3;
  display: block;
}

.message.success {
  background-color: #1c3a24;
  border: 1px solid #2e7a45;
  color: #b3ffc8;
  display: block;
}

/* Dashboard / admin specifics */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5vh;
  gap: 1rem;
  flex-wrap: wrap;
}

.dash-header h1 {
  font-family: "Spectral", serif;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.card {
  background-color: #111;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid #242424;
  flex-wrap: wrap;
}

.user-row:last-child {
  border-bottom: none;
}

.user-meta strong {
  display: block;
}

.user-meta span {
  color: #999;
  font-size: 0.9rem;
}

.status-pill {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.status-pending { background: #4a3a12; color: #ffd98a; }
.status-approved { background: #1c3a24; color: #b3ffc8; }
.status-rejected { background: #3a1c1c; color: #ffb3b3; }

.row-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.grants {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem 0.9rem;
}

.chk {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: #ccc;
  white-space: nowrap;
}

.branch-checks {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.9rem;
  padding-left: 0.9rem;
  border-left: 1px solid #333;
}

.row-actions select {
  padding: 0.45rem 0.6rem;
  background: #161616;
  border: 1px solid #333;
  border-radius: 6px;
  color: white;
}

.preview-img {
  max-width: 100%;
  max-height: 220px;
  border-radius: 8px;
  margin-top: 1rem;
  display: none;
}

.current-img {
  max-height: 180px;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.muted { color: #888; font-size: 0.9rem; }

.editor-item {
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.editor-item .current-img {
  max-height: 140px;
  display: block;
}
