* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  background: radial-gradient(circle at top, #f7f9fc 0%, #eef2f7 45%, #e6edf5 100%);
  color: #1b2533;
}

.page {
  max-width: 412px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.header {
  margin-bottom: 20px;
}

h1 {
  margin: 0 0 8px;
  font-size: 2.0rem;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0;
  color: #556070;
}

.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 15px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.1rem;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.90rem;
}

.field input {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.90rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field select {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.9rem;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.field select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}

button {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.95rem;
  cursor: pointer;
  background: #e2e8f0;
  color: #1f2937;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

button:hover:enabled {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.primary {
  background: #2563eb;
  color: #ffffff;
}

.primary:hover:enabled {
  background: #1d4ed8;
}

.success {
  background: #22c55e;
  color: #ffffff;
}

.success:hover:enabled {
  background: #16a34a;
}

.danger {
  background: #ef4444;
  color: #ffffff;
}

.danger:hover:enabled {
  background: #dc2626;
}

.hint {
  color: #64748b;
  font-size: 0.9rem;
}

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

.media-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.dial-pad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.dial-pad button {
  border-radius: 12px;
  padding: 12px 0;
  width: 100%;
  font-size: 1.05rem;
}

.status {
  font-weight: 600;
  margin-bottom: 12px;
}

.log {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow: auto;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.85rem;
}

.log-line.error {
  color: #b91c1c;
}

.log-line.warning {
  color: #92400e;
}

.tabs {
  display: flex;
  cursor: pointer;
  margin-bottom: 10px;
}
.tab {
  padding: 10px 20px;
  border: 1px solid #ccc;
  border-bottom: none;
  background: #eee;
}
.tab.active {
  background: #fff;
  font-weight: bold;
}
.tab-content {
  border: 1px solid #ccc;
  padding: 20px;
  display: none;
}
.tab-content.active {
  display: block;
}
