:root {
  --green: #01a200;
  --green-dark: #047c00;
  --green-soft: #ebf9eb;
  --green-pale: #f6fff6;

  --red: #b42318;
  --red-soft: #fff2f0;

  --text: #151515;
  --muted: #606760;
  --white: #ffffff;

  --page: #f7faf7;
  --card: #ffffff;
  --border: #e1e9e1;

  --shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
  --green-shadow: 0 16px 34px rgba(1, 162, 0, 0.22);

  --radius-md: 16px;
  --radius-lg: 26px;
  --radius-xl: 34px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(1, 162, 0, 0.12), transparent 32%),
    radial-gradient(circle at bottom right, rgba(1, 162, 0, 0.1), transparent 30%),
    var(--page);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 520px) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  width: min(92%, 1180px);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) 0;
}

.login-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(1, 162, 0, 0.14);
  border-radius: var(--radius-xl);
  padding: clamp(1.6rem, 4vw, 2.4rem);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 2.2rem;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: var(--white);
  font-size: 1.45rem;
  font-weight: 900;
  box-shadow: var(--green-shadow);
}

.brand h1 {
  color: var(--green);
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: -0.055em;
}

.brand h1 span {
  color: var(--text);
}

.brand p {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
}

.login-heading {
  margin-bottom: 1.7rem;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 0.8rem;
  padding: 0.38rem 0.78rem;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-heading h2 {
  max-width: 420px;
  margin-bottom: 0.7rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.login-heading p {
  color: var(--muted);
}

.auth-form {
  width: 100%;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 850;
}

.form-group input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--text);
  padding: 0.85rem 1rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.035);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.toolbar-card input:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(1, 162, 0, 0.2);
  outline-offset: 2px;
  border-color: rgba(1, 162, 0, 0.42);
}

.form-group input::placeholder,
.toolbar-card input::placeholder {
  color: #99a199;
}

.auth-submit {
  width: 100%;
  min-height: 52px;
  margin-top: 0.4rem;
  border: 1px solid var(--green);
  border-radius: 999px;
  background: var(--green);
  color: var(--white);
  font-weight: 850;
  cursor: pointer;
  box-shadow: var(--green-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-submit:hover {
  transform: translateY(-2px);
  background: var(--green-dark);
}

.auth-submit:disabled {
  opacity: 0.68;
  cursor: not-allowed;
  transform: none;
}

.form-message {
  min-height: 1.4rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 750;
  text-align: center;
}

.form-message.error {
  color: var(--red);
}

.form-message.success {
  color: var(--green-dark);
}

.security-note {
  display: grid;
  gap: 0.15rem;
  margin-top: 1.4rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--green-pale);
}

.security-note strong {
  font-size: 0.95rem;
}

.security-note span {
  color: var(--muted);
  font-size: 0.9rem;
}

.login-side {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 5vw, 4rem);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.22), transparent 36%),
    linear-gradient(135deg, var(--green), var(--green-dark));
  color: var(--white);
  box-shadow: var(--green-shadow);
}

.login-side::after {
  content: "";
  position: absolute;
  right: -18%;
  bottom: -28%;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.status-pill {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin-bottom: 1.1rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.88rem;
  font-weight: 850;
}

.login-side h2,
.login-side p,
.feature-list {
  position: relative;
  z-index: 1;
}

.login-side h2 {
  max-width: 620px;
  margin-bottom: 1rem;
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.07em;
}

.login-side p {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.08rem;
}

.feature-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 2rem;
  max-width: 620px;
}

.feature-list div {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.11);
}

.feature-list strong,
.feature-list span {
  display: block;
}

.feature-list strong {
  margin-bottom: 0.2rem;
  font-size: 1rem;
}

.feature-list span {
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.94rem;
}

.admin-body {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  background: var(--page);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.35rem;
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 12px 0 34px rgba(0, 0, 0, 0.04);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.sidebar-brand .brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  font-size: 1.2rem;
}

.sidebar-brand h1 {
  color: var(--green);
  font-size: 1.4rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.sidebar-brand h1 span {
  color: var(--text);
}

.sidebar-brand p {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.sidebar-nav {
  display: grid;
  gap: 0.35rem;
}

.sidebar-nav a {
  padding: 0.78rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: var(--green-soft);
  color: var(--green);
}

.sidebar-nav a:hover {
  transform: translateX(2px);
}

.sidebar-logout {
  width: 100%;
  min-height: 46px;
  margin-top: auto;
  border: 1px solid rgba(1, 162, 0, 0.28);
  border-radius: 999px;
  background: #ffffff;
  color: var(--green);
  font-weight: 850;
  cursor: pointer;
}

.admin-main {
  min-width: 0;
  padding: clamp(1.2rem, 3vw, 2.2rem);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.2rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid rgba(1, 162, 0, 0.14);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(1, 162, 0, 0.1), transparent 32%),
    #ffffff;
  box-shadow: var(--shadow);
}

.admin-header h2 {
  max-width: 760px;
  margin-bottom: 0.45rem;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.065em;
}

.admin-header p:not(.eyebrow) {
  color: var(--muted);
}

.admin-profile {
  min-width: 180px;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--green-pale);
  text-align: right;
}

.admin-profile span,
.admin-profile small {
  display: block;
}

.admin-profile span {
  font-weight: 900;
}

.admin-profile small {
  color: var(--muted);
  font-weight: 750;
}

.dashboard-message {
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
  color: var(--muted);
  font-weight: 750;
}

.dashboard-message.error {
  border-color: rgba(180, 35, 24, 0.25);
  background: #fff7f6;
  color: var(--red);
}

.dashboard-message.success {
  border-color: rgba(1, 162, 0, 0.22);
  background: var(--green-pale);
  color: var(--green-dark);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.stat-card,
.admin-card,
.toolbar-card,
.table-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 1.25rem;
}

.stat-card span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.stat-card strong {
  color: var(--green);
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.activity-section {
  margin-top: 1rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.admin-card {
  padding: 1.35rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--green-shadow);
}

.card-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  border-radius: 16px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 950;
}

.admin-card h3 {
  margin-bottom: 0.45rem;
  color: var(--text);
  font-size: 1.2rem;
  letter-spacing: -0.025em;
}

.admin-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.admin-card a {
  display: inline-flex;
  margin-top: 0.85rem;
  color: var(--green);
  font-weight: 850;
  text-decoration: none;
}

.admin-card a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.toolbar-card {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
}

.toolbar-main {
  flex: 1;
}

.toolbar-main label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 850;
}

.toolbar-card input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--text);
  padding: 0.8rem 0.95rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.035);
}

.toolbar-button {
  min-height: 50px;
  padding: 0 1.15rem;
  border: 1px solid var(--green);
  border-radius: 999px;
  background: var(--green);
  color: #ffffff;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(1, 162, 0, 0.18);
}

.toolbar-button:hover {
  background: var(--green-dark);
}

.table-card {
  overflow: hidden;
}

.table-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.table-header h3 {
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.table-header p {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 750;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: var(--muted);
  background: #fbfdfb;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-table td {
  color: var(--text);
  font-size: 0.94rem;
}

.admin-table tbody tr:hover {
  background: var(--green-pale);
}

.admin-table td strong {
  display: block;
  color: var(--text);
  font-weight: 900;
}

.admin-table td small {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
}

.status-badge.success {
  background: var(--green-soft);
  color: var(--green-dark);
}

.status-badge.danger {
  background: var(--red-soft);
  color: var(--red);
}

.status-badge.muted {
  background: #f1f3f1;
  color: var(--muted);
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.table-actions button {
  min-height: 34px;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(1, 162, 0, 0.26);
  border-radius: 999px;
  background: #ffffff;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
}

.table-actions button:hover {
  background: var(--green-soft);
}

@media (max-width: 1050px) {
  .stats-grid,
  .admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-side {
    order: -1;
  }
}

@media (max-width: 760px) {
  .admin-body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-header,
  .toolbar-card {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-profile {
    width: 100%;
    text-align: left;
  }
}

@media (max-width: 520px) {
  .login-page {
    width: 94%;
    padding: 1rem 0;
  }

  .login-card,
  .login-side {
    border-radius: 24px;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
  }

  .brand h1 {
    font-size: 1.5rem;
  }

  .stats-grid,
  .admin-grid,
  .sidebar-nav {
    grid-template-columns: 1fr;
  }
}