/* AEORU Admin — Plain CSS */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f4f5f7;
  --surface: #fff;
  --border: #ddd;
  --text: #1a1a1a;
  --text-muted: #666;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --success: #16a34a;
  --warning: #d97706;
  --radius: 6px;
}

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

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }

/* Nav */
nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}
nav .container { display: flex; align-items: center; justify-content: space-between; }
nav .brand { font-size: 1.25rem; font-weight: 700; color: var(--text); }
nav .links { display: flex; gap: 1.5rem; align-items: center; }
nav .links a { color: var(--text-muted); font-size: 0.9rem; }
nav .links a:hover, nav .links a.active { color: var(--primary); text-decoration: none; }
nav .links form { display: inline; }
nav .links button {
  background: none; border: none; color: var(--danger);
  cursor: pointer; font-size: 0.9rem;
}

/* Page header */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin: 1.5rem 0 1rem;
}
.page-header h2 { font-size: 1.5rem; font-weight: 600; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.card h3 { font-size: 1.1rem; margin-bottom: 0.75rem; }

/* Stat grid */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat { text-align: center; }
.stat .value { font-size: 2rem; font-weight: 700; }
.stat .label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat .value.green { color: var(--success); }
.stat .value.yellow { color: var(--warning); }
.stat .value.blue { color: var(--primary); }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 0.6rem 0.75rem; text-align: left; border-bottom: 1px solid var(--border); }
th { font-weight: 600; color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
tr:hover { background: #f9fafb; }

/* Badges */
.badge {
  display: inline-block; padding: 0.15rem 0.5rem; border-radius: 3px;
  font-size: 0.75rem; font-weight: 600;
}
.badge-green { background: #dcfce7; color: #166534; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-gray { background: #f3f4f6; color: #374151; }

/* Buttons */
.btn {
  display: inline-block; padding: 0.5rem 1rem; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer; font-size: 0.875rem;
  font-weight: 500; text-align: center; line-height: 1.5;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); text-decoration: none; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-hover); text-decoration: none; }
.btn-outline {
  background: transparent; border-color: var(--border); color: var(--text);
}
.btn-outline:hover { background: #f9fafb; text-decoration: none; }
.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.8rem; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 500; margin-bottom: 0.3rem; font-size: 0.9rem; }
.form-group input, .form-group select {
  width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 0.9rem;
}
.form-group input:focus, .form-group select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }

.checkbox-group { display: flex; align-items: center; gap: 0.5rem; }
.checkbox-group input { width: auto; }

/* Alerts */
.alert { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.9rem; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }

/* Login page */
.login-wrapper {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
}
.login-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem; width: 100%; max-width: 380px;
}
.login-box h1 { text-align: center; margin-bottom: 1.5rem; font-size: 1.5rem; }
.login-box .version { text-align: center; color: var(--text-muted); font-size: 0.75rem; margin-top: 1.5rem; }

/* Pagination */
.pagination { display: flex; gap: 0.5rem; justify-content: center; margin-top: 1rem; }

/* Current release highlight */
.current-release { border-left: 3px solid var(--primary); }

/* Confirm dialog */
.confirm-text { font-size: 0.8rem; color: var(--danger); }
