/* ===== Cards ===== */
.card{
  width: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  min-width: 0;
}

.grow{ height: 100%; }

.cardhead{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

/* ===== Forms & inputs ===== */
.form { display: grid; gap: 12px; }
.row { display: grid; gap: 6px; }
.row.inline { display: flex; align-items: center; gap: 10px; }
label { color: #cfd6ff; font-size: 13px; }

input[type="text"], input[type="password"], input[type="number"], select, textarea, input[type="file"]{
  width: 100%;
  padding: 10px 10px;
  background: #0e1220;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
}
input[type="checkbox"] { transform: translateY(1px); width: auto; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(76,125,255,0.18); }

.upload{ display: flex; align-items: center; gap: 10px; }
.upload input[type="file"]{ max-width: 360px; }

/* ===== Buttons ===== */
button, .btn{
  display: inline-block;
  padding: 10px 12px;
  background: linear-gradient(180deg, var(--btn2), var(--btn));
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
}
button:hover, .btn:hover { filter: brightness(1.05); text-decoration: none; }
button:active, .btn:active { transform: translateY(1px); }

.btn.danger, .danger{
  border-color: rgba(255,92,122,0.35) !important;
  background: rgba(255,92,122,0.10) !important;
}

.error-glow {
  border-color: #ff4c4c !important;
  box-shadow: 0 0 5px rgba(255, 76, 76, 0.5);
  outline: none;
}

/* ===== Tables ===== */
.table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.table th, .table td {
  border-bottom: 1px solid rgba(42,50,68,0.75);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}
.table th { color: #cfd6ff; font-size: 13px; font-weight: 700; }
.subrow td { background: rgba(255,255,255,0.02); }

/* ===== Messages & feedback ===== */
.msgs{ width: 100%; display: grid; gap: 10px; }
.msg{ padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(42,50,68,0.75); background: rgba(255,255,255,0.02); }
.msg.success{ border-color: rgba(42,214,127,0.35); background: rgba(42,214,127,0.08); }
.msg.error{ border-color: rgba(255,92,122,0.35); background: rgba(255,92,122,0.08); }

.pre{
  margin: 10px 0 0;
  padding: 10px 12px;
  background: #0b0f1a;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.pre.small { font-size: 12px; }
.result { margin-top: 12px; }
.ok { padding: 10px 12px; border: 1px solid rgba(42,214,127,0.35); background: rgba(42,214,127,0.08); border-radius: 10px; }
.err { padding: 10px 12px; border: 1px solid rgba(255,92,122,0.35); background: rgba(255,92,122,0.08); border-radius: 10px; }

/* ===== Login ===== */
.login{ max-width: 140px; }
.login_wrap{ min-height: 100%; display: grid; place-items: center; }
.login_card{ width: 100%; max-width: 420px; flex: 0 1 420px; }
