:root {
  color-scheme: light;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f6f8;
  color: #172033;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
}

.shell {
  width: min(720px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 14px 28px;
}

.topbar,
.panel {
  background: #ffffff;
  border: 1px solid #e0e6ee;
  border-radius: 10px;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 16px;
}

p {
  color: #697588;
  line-height: 1.5;
}

.panel {
  padding: 16px;
}

.loading-panel {
  display: grid;
  gap: 8px;
}

label {
  display: block;
  margin-bottom: 12px;
  color: #3a4658;
  font-weight: 700;
}

input,
select {
  display: block;
  width: 100%;
  min-height: 46px;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid #cfd8e5;
  border-radius: 8px;
  font-size: 16px;
  background: #ffffff;
  color: #172033;
}

button {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #d8e0ea;
  background: #ffffff;
  color: #172033;
  font-weight: 800;
  font-size: 15px;
}

button:disabled {
  opacity: 0.55;
}

.primary {
  width: 100%;
  background: #11192a;
  color: #ffffff;
  border-color: #11192a;
}

.ghost {
  background: #f4f7fb;
}

.danger {
  background: #fff5f5;
  border-color: #f0b8b8;
  color: #b42318;
}

.phone-list,
.task-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.phone-card,
.task-card {
  width: 100%;
  text-align: left;
  background: #fbfcfe;
  border: 1px solid #e1e7f0;
  border-radius: 10px;
  padding: 14px;
}

.phone-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.phone-info {
  display: grid;
  gap: 4px;
}

.phone-info strong {
  color: #172033;
  font-size: 17px;
  line-height: 1.35;
}

.phone-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.phone-actions .primary,
.phone-actions .ghost,
.task-actions .danger,
.task-actions .primary,
.task-actions .ghost {
  width: 100%;
}

.task-card {
  display: grid;
  gap: 14px;
}

.task-video-player,
.task-video-empty {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 70vh;
  background: #000000;
  border-radius: 10px;
}

.task-video-player {
  display: block;
  object-fit: contain;
}

.task-video-empty {
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
}

.task-title-block {
  display: grid;
  gap: 8px;
}

.task-title {
  white-space: pre-wrap;
  color: #172033;
  font-size: 16px;
  line-height: 1.55;
}

.task-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-dates span {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 6px;
  background: #eef5ff;
  color: #174a8b;
  font-size: 13px;
  font-weight: 800;
}

.task-dates span + span {
  background: #f3f5f8;
  color: #536175;
}

.task-meta {
  color: #738097;
  font-size: 13px;
}

.task-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.task-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.task-toolbar > div {
  flex: 1;
  min-width: 0;
}

.status {
  margin-top: 12px;
  min-height: 22px;
  font-size: 14px;
}

.status.error {
  color: #b42318;
}

.preview-panel {
  display: grid;
  gap: 14px;
}

.preview-file-name {
  overflow-wrap: anywhere;
}

.video-player {
  width: 100%;
  max-height: 62vh;
  background: #000000;
  border-radius: 10px;
}

.preview-title-block {
  display: grid;
  gap: 8px;
}

.preview-actions {
  margin-top: 2px;
}

@media (min-width: 560px) {
  .phone-card {
    grid-template-columns: 1fr 260px;
    align-items: center;
  }
}

@media (max-width: 420px) {
  .task-actions {
    grid-template-columns: 1fr;
  }
}
