* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: #f6f7fb;
  color: #1f2430;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  background: #0f172a;
  color: #fff;
}

.brand-title {
  font-size: 20px;
  font-weight: 700;
}

.brand-subtitle {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 6px;
}

.controls {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.container {
  padding: 24px 28px 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.card {
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.card-title {
  font-size: 13px;
  opacity: 0.6;
}

.card-value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 10px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.panel {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.table-wrap {
  overflow: auto;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

thead {
  background: #f1f5f9;
}

th, td {
  text-align: right;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 13px;
}

tr:hover {
  background: #f8fafc;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.form-section {
  background: #f8fafc;
  border-radius: 12px;
  padding: 14px;
  border: 1px solid #e2e8f0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 12px;
}

.field.inline {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.field.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

input[type="text"],
input[type="number"],
input[type="datetime-local"],
input[type="file"] {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #cbd5f5;
  font-size: 13px;
}

.btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #cbd5f5;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
}

.btn.primary {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.btn.danger {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

.btn.small {
  padding: 6px 8px;
  font-size: 12px;
}

.result {
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px;
  border-radius: 10px;
  overflow: auto;
  max-height: 220px;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.message {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f1f5f9;
  font-size: 12px;
}

.message.success {
  background: #dcfce7;
  color: #166534;
}

.message.error {
  background: #fee2e2;
  color: #991b1b;
}
