.admin-body {
  background: #eef2f6;
  min-height: 100vh;
}

.admin-login-screen[hidden],
.admin-app[hidden],
.admin-panel[hidden] {
  display: none !important;
}

.admin-login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1565b0, #003366);
}

.admin-login-box {
  background: #fff;
  padding: 36px 32px;
  border-radius: 6px;
  width: 400px;
  max-width: 92%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.admin-login-box h1 {
  text-align: center;
  color: #1565b0;
  font-size: 22px;
  margin-bottom: 8px;
}

.admin-sub {
  text-align: center;
  color: #666;
  font-size: 13px;
  margin-bottom: 24px;
}

.admin-tip {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

.admin-topbar {
  background: #003366;
  color: #fff;
  padding: 0 20px;
}

.admin-topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.admin-topbar h1 {
  font-size: 18px;
}

.admin-topbar-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.admin-topbar-actions a,
.admin-topbar-actions button {
  color: rgba(255, 255, 255, 0.9);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
}

.admin-layout {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  padding: 20px;
}

.admin-sidebar {
  background: #fff;
  border-radius: 6px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  align-self: start;
}

.sidebar-section h3 {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

.category-menu {
  list-style: none;
  margin-bottom: 16px;
}

.category-menu li a {
  display: block;
  padding: 8px 10px;
  font-size: 14px;
  border-radius: 4px;
  color: #333;
}

.category-menu li a:hover,
.category-menu li a.active {
  background: #e8f4fc;
  color: #1565b0;
}

.admin-panel {
  background: #fff;
  border-radius: 6px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.panel-toolbar h2 {
  font-size: 18px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  text-align: left;
}

.admin-table th {
  background: #f8f9fa;
  font-weight: 600;
}

.status-published {
  color: #1a6b52;
}

.status-draft {
  color: #999;
}

.table-actions button {
  margin-right: 8px;
  padding: 4px 10px;
  font-size: 12px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 3px;
  cursor: pointer;
}

.table-actions button:hover {
  background: #f0f7fc;
  border-color: #1565b0;
  color: #1565b0;
}

.article-form .form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.article-form textarea,
.article-form input[type="text"],
.article-form select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
}

.article-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #555;
}

.media-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.media-section h3 {
  font-size: 15px;
  margin-bottom: 12px;
}

.upload-row {
  display: flex;
  gap: 8px;
}

.upload-row input[type="text"] {
  flex: 1;
}

.upload-btn {
  position: relative;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.media-preview img {
  max-width: 200px;
  max-height: 120px;
  margin-top: 8px;
  border: 1px solid #ddd;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.btn-danger {
  background: #c00000;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
}

.admin-hint {
  font-size: 12px;
  color: #888;
}

.sidebar-section[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .article-form .form-row {
    grid-template-columns: 1fr;
  }
}
