:root{
  --bg:#061019;
  --bg2:#071a24;
  --card:rgba(10, 26, 38, .72);
  --card2:rgba(7, 20, 31, .72);
  --text:#e7f2ff;
  --muted:#a9c0d6;
  --line:rgba(255,255,255,.10);

  --accent:#22d3ee;
  --accent2:#3aa0ff;

  --btn:#0f2a3d;
  --btn2:#143552;

  --danger:#7a1f2a;
  --danger2:#a32938;

  --radius:16px;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:
    radial-gradient(1200px 800px at 20% -10%, rgba(34,211,238,.22), transparent 60%),
    radial-gradient(900px 700px at 90% 10%, rgba(58,160,255,.18), transparent 60%),
    linear-gradient(180deg,var(--bg),var(--bg2));
  color:var(--text);
}

.wrap{max-width:980px;margin:0 auto;padding:0 12px}

a{color:var(--accent2)}
a:hover{color:var(--accent)}

.topbar{
  position:sticky;top:0;z-index:10;
  background:rgba(6,16,25,.78);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.topbar__inner{display:flex;align-items:center;gap:14px;padding:12px 0;flex-wrap:wrap}
.brand{color:var(--text);text-decoration:none;font-weight:900;letter-spacing:.2px}
.nav{display:flex;gap:10px;flex-wrap:wrap}
.nav a{
  color:var(--muted);text-decoration:none;
  padding:8px 10px;border-radius:12px;border:1px solid transparent;
}
.nav a:hover{color:var(--text);border-color:var(--line);background:rgba(255,255,255,.03)}

h1{font-size:28px;margin:18px 0 8px}
p{color:var(--muted);line-height:1.5}

.card{
  background:linear-gradient(180deg,var(--card),var(--card2));
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:14px;
  box-shadow: 0 12px 32px rgba(0,0,0,.28);
}

.muted{color:var(--muted)}

.btn, button.btn, a.btn{
  display:inline-flex;align-items:center;justify-content:center;
  padding:10px 12px;border-radius:14px;
  border:1px solid var(--line);
  background:var(--btn);
  color:var(--text);
  text-decoration:none;
  font-weight:800;
  cursor:pointer;
}
.btn:hover{background:var(--btn2)}
.btn-primary{border-color:rgba(34,211,238,.35);background:rgba(34,211,238,.14)}
.btn-primary:hover{background:rgba(34,211,238,.22)}
.btn-cancel{background:var(--danger)}
.btn-cancel:hover{background:var(--danger2)}

.footer{margin:28px 0 18px;border-top:1px solid var(--line)}
.footer__inner{display:flex;justify-content:space-between;gap:10px;padding:14px 0;color:var(--muted);font-size:14px}

/* формы */
label{display:block;font-size:13px;color:var(--muted);font-weight:800;margin:10px 0 6px}
input, select, textarea{
  width:100%;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.03);
  color:var(--text);
  outline:none;
}
input::placeholder, textarea::placeholder{color:rgba(169,192,214,.7)}
input:focus, select:focus, textarea:focus{border-color:rgba(34,211,238,.45);box-shadow:0 0 0 3px rgba(34,211,238,.12)}
.row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media (max-width: 760px){ .row{grid-template-columns:1fr} }

/* таблицы */
.table-wrap{overflow:auto;border-radius:14px;border:1px solid var(--line)}
table{width:100%;border-collapse:collapse;min-width:900px;background:rgba(255,255,255,.02)}
th, td{padding:10px;border-bottom:1px solid rgba(255,255,255,.08);vertical-align:top}
th{background:rgba(255,255,255,.03);text-align:left;font-size:13px;color:var(--muted)}
tr.deleted td{opacity:.45}

/* оператор */
.op-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}
.op-head__actions{display:flex;gap:10px;flex-wrap:wrap}
.op-menu{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media (max-width: 760px){ .op-menu{grid-template-columns:1fr} }
.op-sep{height:1px;background:var(--line);margin:14px 0}
.op-reports__title{font-weight:900;margin-bottom:6px}
.op-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}

/* календарь (май–октябрь) */
.cal{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:12px;
  margin:14px 0 18px;
}
@media (max-width: 900px){
  .cal{grid-template-columns: 1fr;}
}
.cal__month{
  background:linear-gradient(180deg,var(--card),var(--card2));
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
}
.cal__title{font-weight:900;margin-bottom:8px}
.cal__week{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap:6px;
  color:var(--muted);
  font-size:12px;
  margin-bottom:6px;
}
.cal__week > div{ text-align:center; }

.cal__grid{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap:6px;
}
.cal__cell{
  display:flex;
  align-items:center;
  justify-content:center;
  height:32px;
  border-radius:10px;
  text-decoration:none;
  color:var(--text);
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.02);
  font-weight:800;
}
.cal__cell--empty{border-color:transparent;background:transparent}
.cal__cell--today{font-weight:900;border-color:rgba(34,211,238,.35)}
.cal__cell--has{background:rgba(34,211,238,.10); border-color:rgba(34,211,238,.25)}
.cal__cell--changed{background:rgba(255,60,70,.14); border-color:rgba(255,60,70,.35)}

/* список по дням */
.dayhead{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}
.dayhead__date{font-weight:900;font-size:18px}

.daylist{margin-top:10px;display:grid;gap:10px}

.triprow{
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  padding:10px;
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  background:rgba(255,255,255,.02);
}
.triprow--cancel{
  border-color:rgba(255,60,70,.35);
  background:rgba(255,60,70,.08);
}
.triprow__vessel{font-weight:900}
.triprow__main{color:var(--muted);font-weight:800;margin-top:2px}
.triprow__right{text-align:right;min-width:160px}
.triprow__status{font-weight:900;color:#ffb3b8;margin-bottom:2px}
.triprow__seats{font-weight:900}


.hint{padding:12px;border:1px dashed rgba(34,211,238,.35);border-radius:14px;background:rgba(34,211,238,.08);color:var(--text)}

.h2{font-size:16px;font-weight:900;margin:0 0 10px}

.h3{font-size:14px;font-weight:900;margin:0 0 8px}
.small{font-size:13px}
.grid{display:grid;gap:10px}
.section{margin-top:12px}
.trips{display:grid;gap:10px;margin-top:10px}
.trip-card{
  display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;
  padding:12px;border-radius:14px;border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.02);
}
.trip-card.sel{border-color:rgba(34,211,238,.35);box-shadow:0 0 0 3px rgba(34,211,238,.10) inset}
.trip-card .left{min-width:220px}
.trip-card .right{text-align:right;min-width:160px}
.status{font-weight:900}
.status.cancel{color:#ffb3b8}
.seats{font-weight:900}

.op-year{display:flex;gap:10px;flex-wrap:wrap}

/* --- HEADER: full photo (no crop) + blurred fill --- */
.site-header{
  height: 360px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: #06121a;
}

/* blurred background fills width */
.site-header::before{
  content:"";
  position:absolute;
  inset:-30px;
  background: url("/static/header_f1.jpg") center/cover no-repeat;
  filter: blur(18px) brightness(.60) saturate(1.05);
  transform: scale(1.08);
}

/* dark marine overlay for readability */
.site-header::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(6,14,22,.72), rgba(6,14,22,.38));
}

/* the full photo on top (no crop) */
.site-header .header-photo{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit: contain;          /* ВАЖНО: показывает всю картинку */
  object-position: center;
  z-index: 1;
  filter: contrast(1.03) brightness(.92);
}

/* header content above everything */
.site-header .header-inner{
  position: relative;
  z-index: 2;
  padding:16px 14px 14px;
}

.operator-page{padding:12px 0 28px}

.operator-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-top:12px;
}
.operator-header__actions{display:flex;gap:10px;flex-wrap:wrap}

.op-form{display:grid;gap:10px}
.form-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}

/* PRICE: ширины колонок + переносы без fixed-layout */
.price-table{
  width:100%;
  min-width:0 !important;
  table-layout:auto !important;
}

.price-table th, .price-table td{
  white-space: normal !important;
  overflow-wrap:anywhere !important;
  word-break:break-word !important;
}

/* Ширины по колонкам (1..7) */
.price-table th:nth-child(1), .price-table td:nth-child(1){ width: 5ch; }     /* Порядок */
.price-table th:nth-child(5), .price-table td:nth-child(5){ width: 12ch; }    /* Цена */
.price-table th:nth-child(7), .price-table td:nth-child(7){ width: 10ch; }    /* Действия */

/* Цена в одну строку */
.price-table .price-cell{ white-space: nowrap !important; }

/* Описание пусть расширяется */
.price-table th:nth-child(6), .price-table td:nth-child(6){ width: auto; }

/* кнопки-иконки */
.icon-btn{ padding:8px 10px; line-height:1; min-width:44px; justify-content:center; }

.row-inactive td{opacity:.55}
.empty-note{color:var(--muted);margin:0}

.catalog-menu{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.catalog-menu .btn{justify-content:flex-start}
@media (max-width:760px){
  .catalog-menu{grid-template-columns:1fr}
}

.operator-page{padding:12px 0 28px}

.op-form{display:grid;gap:10px}
.form-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}

.price-group{margin-top:12px}
.price-group__title{font-size:18px;font-weight:900;margin:0 0 10px}
.price-cell{white-space:nowrap;font-weight:900}
.desc-cell{max-width:280px}
.actions-cell{white-space:nowrap}
.actions-cell form{display:inline-flex;margin:0 0 0 6px}
.btn-sm{padding:8px 10px;border-radius:12px;font-size:13px}

.row-inactive td{opacity:.55}

.archive-form{
  margin:0;
}

.checkline{
  display:flex;
  align-items:center;
  gap:10px;
  width:fit-content;
  margin:0;
  font-weight:700;
  color:var(--text);
  cursor:pointer;
}

.checkline input,
.checkline input[type="checkbox"]{
  width:18px !important;
  min-width:18px;
  max-width:18px;
  height:18px;
  margin:0;
  padding:0;
  flex:0 0 18px;
  accent-color: var(--accent);
  box-shadow:none;
}

.checkline span{
  line-height:1.2;
}

@media (max-width: 760px){
  .op-head__actions{
    width:100%;
  }

  .op-head__actions .btn{
    flex:1 1 auto;
  }

  .form-actions .btn{
    flex:1 1 auto;
  }

  .actions-cell{
    white-space:normal;
  }

  .actions-cell form{
    display:block;
    margin:6px 0 0 0;
  }
}
/* Прайс: визуальная ширина поля order */
.order-field input{
  width: 12ch !important;
  max-width: 12ch !important;
}

/* Единый тёмный стиль для select как у остальных полей */
.op-form select{
  color: var(--text);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.12);
}

/* Выпадающий список (опции) — тёмный фон и светлый текст
   (на iOS часть стилей option может игнорироваться системой — это нормально) */
.op-form select option{
  background: var(--bg);
  color: var(--text);
}
/* Формы оператора: нормальные отступы между заголовком поля и инпутом */
.op-form{
  display:grid;
  gap:14px;
}

.op-form label{
  display:block;
  margin:0;
  font-size:13px;
  color:var(--muted);
  font-weight:800;
  line-height:1.25;
}

.op-form label > input,
.op-form label > select,
.op-form label > textarea{
  margin-top:8px;
}

/* Чуть больше “воздуха” у самих полей */
.op-form input,
.op-form select,
.op-form textarea{
  padding:12px 12px;
}

/* Порядок сортировки: чтобы не прилипал к подписи */
.order-field{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.order-field input{
  margin-top:0 !important;
}

/* price form: category radios */
.op-form .field{display:grid; gap:8px}
.op-form .field-label{
  font-size:13px;
  color:var(--muted);
  font-weight:800;
  line-height:1.25;
}
.radio-group{display:grid; gap:10px}
.radio-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.03);
  cursor:pointer;
}
.radio-item input{width:auto; margin:0; padding:0; flex:0 0 auto}
.radio-item span{font-weight:800; color:var(--text)}

/* price width ~ 20 symbols */
.price-field input{
  width:20ch !important;
  max-width:20ch !important;
}

/* ===== PRICE TABLE (final) ===== */

/* десктоп: нормальная таблица, без "рубки" заголовков */
.price-table{
  width:100%;
  min-width:0;
  table-layout:auto;
}

.price-table th{
  white-space:nowrap;
  overflow-wrap:normal;
  word-break:normal;
}

.price-table td{
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
}

.price-table .price-cell{ white-space:nowrap; }

/* кнопки-иконки */
.icon-btn{
  padding:8px 10px;
  line-height:1;
  min-width:44px;
  justify-content:center;
}

/* mobile: превращаем строки в карточки */
@media (max-width: 760px){
  .price-desktop{ display:none; }
  .price-mobile{ display:block; }
}

/* Desktop table: нормальные ширины колонок */
.price-table{ width:100%; table-layout:auto; min-width:0; }
.price-table th{ white-space:nowrap; }
.price-table td{ vertical-align:top; }

.price-table .col-order{ width:5ch; }
.price-table .col-price{ width:12ch; }
.price-table .col-actions{ width:10ch; }
.price-table .col-desc{ width:auto; }

.price-table .price-cell{ white-space:nowrap; }

/* Переносы только в описании/длинных полях */
.price-table .desc-cell{
  white-space: normal;
  overflow-wrap:anywhere;
  word-break:break-word;
}

/* PRICE: карточки всегда */
.price-cards{ display:grid; gap:10px; margin-top:10px; }

.price-card{
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  background:rgba(255,255,255,.02);
  padding:10px;
}

.pc-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:8px 0;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.pc-row:last-of-type{ border-bottom:0; }

.pc-k{
  color:var(--muted);
  font-weight:800;
  flex:0 0 42%;
}

.pc-v{ flex:1 1 auto; min-width:0; overflow-wrap:anywhere; word-break:break-word; }
.pc-price{ font-weight:900; white-space:nowrap; }

.pc-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:10px;
}

.icon-btn{
  padding:8px 10px;
  line-height:1;
  min-width:44px;
  justify-content:center;
}