* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f5f7fb;
  color: #1f2937;
}

body {
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

.hidden {
  display: none !important;
}

.app-shell {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card,
.panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.auth-card {
  width: 100%;
  max-width: 460px;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.staff-info {
  font-size: 14px;
  color: #4b5563;
}

.page-title {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.2;
}

.page-subtitle {
  margin: 0;
  color: #6b7280;
  font-size: 15px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 24px;
}

.panel {
  padding: 24px;
}

.panel-title {
  margin: 0 0 20px;
  font-size: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-full {
  grid-column: 1 / -1;
}

label {
  font-size: 14px;
  font-weight: 700;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
  color: #111827;
}

input:focus,
select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.help-text {
  color: #6b7280;
  font-size: 12px;
}

.btn {
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 700;
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-secondary {
  background: #e5e7eb;
  color: #111827;
}

.btn-secondary:hover {
  background: #d1d5db;
}

.btn-block {
  width: 100%;
}

.form-message {
  min-height: 24px;
  font-size: 14px;
  color: #374151;
}

.form-message.success {
  color: #047857;
}

.form-message.error {
  color: #b91c1c;
}

.image-preview-wrap {
  width: 100%;
  min-height: 160px;
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.image-preview {
  max-height: 340px;
  object-fit: contain;
}

.rules-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #4b5563;
  font-size: 14px;
}

.rules-box p {
  margin: 0;
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 16px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .page-title {
    font-size: 24px;
  }
}
