:root{

  --card:#ffffff;
  --muted:#9aa3b5;
  --text:#242837;
  --accent:#ff4b55;
  --accent2:#ff7b55;
  --border:#dde1ee;
  --radius:18px;

}
*{
  box-sizing:border-box;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
}
.wrap{
  max-width:1200px;
  margin:0 auto 80px;
  padding:16px;
}
h1{
  margin:0 0 10px;
  font-size:22px;
  font-weight:700;
  text-align:center;
}
.small{
  font-size:12px;
  color:var(--muted);
}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:24px 22px 20px;
  margin-top:14px;
}

/* Прайс бетіне тән grid, тарифтер */
.tariffs-grid{
  margin-top:14px;
  display:grid;
  gap:18px;
  grid-template-columns:1fr;
}
.tariff-card{
  margin-top:0;
}
@media (min-width: 768px){
  .tariffs-grid{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }
}
@media (min-width: 1024px){
  .tariffs-grid{
    grid-template-columns:repeat(3, minmax(0,1fr));
  }
}

.tariff-header{
  text-align:center;
  margin-bottom:18px;
}
.tariff-title{
  font-size:24px;
  font-weight:700;
  margin:0;
}

.tariff-body{
  margin-top:4px;
}
.tariff-table{
  width:100%;
  border-collapse:collapse;
  margin-top:4px;
  font-size:13px;
}
.tariff-table td{
  padding:4px 0;
}

.tariff-static{
  font-size:13px;
  color:var(--muted);
}

.tariff-section-title{
  font-size:12px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#4b4f5c;
  padding-top:12px;
  padding-bottom:4px;
}

.tariff-label{
  color:#4b4f5c;
  font-size:13px;
}

/* SELECT WRAP + ARROW */
.select-wrap{
  position:relative;
  display:block;
}
.select-wrap::after{
  content:"";
  position:absolute;
  right:0;
  top:50%;
  margin-top:-3px;
  width:0;
  height:0;
  border-left:5px solid transparent;
  border-right:5px solid transparent;
  border-top:6px solid #4b4f5c;
  pointer-events:none;
}

/* underline-style selects */
.cover-select{
  width:100%;
  border:none;
  border-bottom:2px solid #e0e6ee;
  padding:8px 0 10px;
  padding-right:24px;
  font-size:14px;
  background:transparent;
  color:#4b4f5c;
  outline:none;
  appearance:none;
}
.cover-select:focus{
  border-bottom-color:#7da0f8;
}

/* custom checkboxes */
.option-label-inline{
  display:flex;
  align-items:center;
  gap:10px;
  color:#4b4f5c;
  font-size:13px;
}
.option-label-inline input{
  margin:0;
}
.opt-checkbox{
  appearance:none;
  -webkit-appearance:none;
  width:22px;
  height:22px;
  border-radius:4px;
  border:2px solid #52565c;
  background:#f5f7fb;
  position:relative;
  cursor:pointer;
}
.opt-checkbox:checked{
  background:#22252b;
  border-color:#22252b;
}
.opt-checkbox:checked::after{
  content:"";
  position:absolute;
  left:6px;
  top:2px;
  width:6px;
  height:11px;
  border-right:2px solid #fff;
  border-bottom:2px solid #fff;
  transform:rotate(45deg);
}

.tariff-total{
  margin-top:16px;
  padding-top:12px;
  border-top:1px солид #eceffa;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:4px;
}
.tariff-total-label{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--muted);
}
.tariff-total-old{
  font-size:18px;
  color:var(--muted);
  text-decoration:line-through;
}
.tariff-total-value{
  font-weight:700;
  font-size:26px;
  color:#d22f2f;
}
.tariff-total-value-text,
.tariff-total-old-value{
  transition:transform .25s ease;
  will-change:transform;
}

.error{
  padding:10px 14px;
  border-radius:10px;
  margin-top:10px;
  background:#ffe5ea;
  border:1px солид #ff4d6a;
  color:#b52b40;
  font-size:14px;
}

.tariff-actions{
  margin-top:14px;
  display:flex;
  justify-content:center;
}
.btn-request{
  padding:8px 16px;
  border-radius:999px;
  border:none;
  background:linear-gradient(135deg, var(--accent2), var(--accent));
  color:#fff;
  font-size:13px;
  cursor:pointer;
  box-shadow:0 6px 18px rgba(0,0,0,.18);
}
.btn-request:disabled{
  opacity:.5;
  cursor:default;
}

/* POPUP + АНИМАЦИЯ */
.modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(10,14,30,.5);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:999;
  opacity:0;
  pointer-events:none;
  transition:opacity .25s ease;
}
.modal-backdrop.show{
  opacity:1;
  pointer-events:auto;
}
.modal-card{
  background:#ffffff;
  border-radius:16px;
  border:1px solid #dde1ee;
  max-width:380px;
  width:100%;
  padding:16px 16px 18px;
  box-shadow:0 18px 40px rgba(10,12,28,.25);
  transform:translateY(-10px) scale(.96);
  opacity:0;
  transition:transform .25s ease, opacity .25s ease;
}
.modal-backdrop.show .modal-card{
  transform:translateY(-20px) scale(1);
  opacity:1;
}

.modal-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:6px;
}
.modal-title{
  font-size:16px;
  font-weight:600;
}
.modal-close{
  border:none;
  background:transparent;
  color:var(--muted);
  font-size:18px;
  cursor:pointer;
  padding:0 4px;
}
.modal-sub{
  font-size:12px;
  color:var(--muted);
  margin-bottom:10px;
}

/* Форма ішіндегі элементтер (Form.php да қолданады) */
.field{
  margin-bottom:10px;
}
.field label{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin-bottom:4px;
}
.input{
  width:100%;
  padding:8px 10px;
  border-radius:8px;
  border:1px солид #d5dbec;
  background:#fff;
  color:#242837;
  font-size:13px;
  outline:none;
}
.input:focus{
  border-color:var(--accent);
}
.modal-footer{
  margin-top:8px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
}
.btn-submit{
  padding:8px 14px;
  border-radius:999px;
  border:none;
  background:linear-gradient(135deg, var(--accent2), var(--accent));
  color:#fff;
  font-size:13px;
  cursor:pointer;
  flex-shrink:0;
}
.modal-msg{
  font-size:12px;
}
.modal-msg.ok{
  color:#2eaf4a;
}
.modal-msg.err{
  color:#e53935;
}
/* Жүктелу кезіндегі ... анимациясы */
.loading-dots{
  display:inline-flex;
  gap:3px;
  vertical-align:middle;
}
.loading-dots span{
  width:4px;
  height:4px;
  border-radius:50%;
  background:currentColor;
  opacity:0.25;
  animation:dotPulse 1s infinite ease-in-out;
}
.loading-dots span:nth-child(2){
  animation-delay:0.15s;
}
.loading-dots span:nth-child(3){
  animation-delay:0.30s;
}

@keyframes dotPulse{
  0%, 80%, 100%{
    opacity:0.25;
    transform:translateY(0);
  }
  40%{
    opacity:1;
    transform:translateY(-2px);
  }
}
/* Жүктелу анимациясы (таза үш нүкте) */
.loading-dots{
  display:inline-flex;
  gap:5px;
  align-items:center;
}
.loading-dots span{
  width:6px;
  height:6px;
  border-radius:50%;
  background:#ffffff;
  opacity:0.2;
  animation:dotBlink 1s infinite ease-in-out;
}
.loading-dots span:nth-child(2){
  animation-delay:0.2s;
}
.loading-dots span:nth-child(3){
  animation-delay:0.4s;
}

@keyframes dotBlink{
  0%, 100% { opacity:0.2; transform:scale(1); }
  50%      { opacity:1;   transform:scale(1.4); }
}
/* ---------------------------------------------------
   ADMIN PAGE STYLE (same white/red aesthetic)
--------------------------------------------------- */

.admin-wrap {
  max-width: 1200px;
  margin: 20px auto 80px;
  padding: 16px;
}

/* PAGE TITLES */
.admin-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 8px;
  text-align: center;
}
.admin-sub {
  font-size: 13px;
  text-align: center;
  color: var(--muted);
  margin-bottom: 20px;
}

/* ADMIN TABS */
.admin-tabs {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.admin-tab {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: #4b4f5c;
  font-size: 13px;
  cursor: pointer;
  transition: all .2s ease;
}
.admin-tab:hover {
  background: #f5f7fb;
}
.admin-tab.active {
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  border-color: transparent;
  color: #fff;
}

/* CONTENT SECTIONS */
.admin-section {
  display: none;
}
.admin-section.active {
  display: block;
}

/* ---------------------------------------------------
   PROJECTS TABLE
--------------------------------------------------- */

.projects-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.projects-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.projects-table th {
  font-size: 12px;
  color: var(--muted);
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid #e6e9f3;
}

.projects-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f3f8;
}

.projects-row {
  cursor: pointer;
  transition: .15s ease;
}
.projects-row:hover {
  background: #f9f9fc;
}
.projects-row.highlight {
  background: rgba(255, 75, 85, .09);
  border-left: 3px solid var(--accent);
}

/* STATUS BADGES */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid #d9dce7;
  color: #4b4f5c;
}
.badge-red {
  background: #ffe5e7;
  border-color: #ffb5b8;
  color: #d1323c;
}
.badge-green {
  background: #e9fbe5;
  border-color: #b5e8ad;
  color: #3c7f26;
}
.badge-blue {
  background: #e9f3ff;
  border-color: #b5cff8;
  color: #2a64c7;
}

/* ---------------------------------------------------
   CALENDAR STYLE (white, beautiful)
--------------------------------------------------- */

.calendar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.calendar-title {
  font-size: 18px;
  font-weight: 600;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-cell {
  background: #fff;
  border: 1px solid #e6e9f3;
  border-radius: 14px;
  min-height: 90px;
  padding: 6px;
  font-size: 12px;
  position: relative;
  transition: .15s;
}
.calendar-cell:hover {
  background: #fafbff;
}

.calendar-cell-header {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}

.calendar-cell.has-events {
  border-color: var(--accent);
  background: #fff6f6;
}

/* events inside calendar */
.cal-event {
  background: #f1f3ff;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 3px 6px;
  font-size: 11px;
  margin-top: 4px;
  cursor: pointer;
}
.cal-event:hover {
  background: #e6eaff;
}

/* ---------------------------------------------------
   PROJECT CARD POPUP
--------------------------------------------------- */

.project-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30, 35, 50, .5);
  display: none;
  opacity: 0;
  pointer-events: none;
  transition: .25s ease;
  z-index: 9999;
}
.project-modal-backdrop.show {
  display: flex;
  opacity: 1;
  pointer-events: auto;
  justify-content: center;
  align-items: center;
}

.project-modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  width: 500px;
  max-width: 95%;
  padding: 22px;
  transform: translateY(-14px) scale(.97);
  opacity: 0;
  transition: .25s ease;
}
.project-modal-backdrop.show .project-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.project-modal h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
}
.kv-label {
  color: var(--muted);
}
.kv-value {
  font-weight: 600;
  color: #242837;
}

.modal-desc {
  background: #f5f7fb;
  border-radius: 12px;
  padding: 10px;
  margin: 12px 0;
  font-size: 13px;
  white-space: pre-wrap;
  color: #444b5d;
}

/* BUTTONS INSIDE PROJECT POPUP */
.btn-red {
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  color: white;
  cursor: pointer;
  margin-top: 10px;
}
.btn-red:hover {
  filter: brightness(1.05);
}

.btn-outline {
  border: 1px solid var(--border);
  background: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  color: #242837;
}
.btn-outline:hover {
  background: #f5f7fb;
}

/* ---------------------------------------------------
   ADD SHOOTING DAY FORM (inside project page)
--------------------------------------------------- */

.shoot-form {
  background: #fbfcff;
  border: 1px dashed #d5dbec;
  border-radius: 14px;
  padding: 14px;
  margin-top: 14px;
}

.shoot-form h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.shoot-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.shoot-row label {
  font-size: 12px;
  color: var(--muted);
  min-width: 90px;
}
.shoot-row input,
.shoot-row select {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #d5dbec;
  font-size: 13px;
}

/* SAVE BUTTON */
.btn-save {
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  border: none;
  padding: 10px 18px;
  border-radius: 999px;
  color: white;
  cursor: pointer;
  font-size: 13px;
}
.btn-save:hover {
  filter: brightness(1.05);
}
/* ---------- ADMIN PAGE EXTRA STYLES ---------- */

.kv-row{
    display:flex;
    gap:10px;
    margin-bottom:4px;
}
.kv-label{
    width:130px;
    font-size:12px;
    color:var(--muted);
}
.kv-value{
    flex:1;
    font-size:14px;
}
.pm-edit input,
.pm-edit textarea{
    background:transparent;
    border:1px solid var(--border);
    border-radius:8px;
    padding:6px 10px;
    color:inherit;
    font-size:13px;
    outline:none;
}
.pm-edit textarea{
    resize:vertical;
}

/* Карточка заголовогы: № + Школа/Класс + закрыть */
.pm-header-line-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:8px;
    gap:10px;
}
.pm-header-left{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}
#pmOrderHeader{
    font-size:18px;
    font-weight:600;
}
.pm-badge{
    display:inline-flex;
    align-items:center;
    padding:2px 8px;
    border-radius:999px;
    border:1px solid currentColor;
    font-size:11px;
    line-height:1.3;
}

/* Блоктар */
.pm-section{
    margin-bottom:10px;
}
.pm-section-label{
    font-size:12px;
    color:var(--muted);
    margin-bottom:4px;
}
.pm-right-box{
    font-size:13px;
    padding:8px 10px 8px 12px;
    border-radius:8px;
    background:rgba(255,255,255,0.02);
}

/* Описание: қалың, интервалмен */
#pmDesc{
    white-space:pre-line;
    font-weight:600;
    line-height:1.5;
    font-size:13px;
}
#pmDescInput{
    line-height:1.5;
    font-size:13px;
}

/* Сохранённый день съёмки */
#shootResult{
    margin-top:6px;
    font-size:12px;
    color:#6dd26d;
}

/* Лейблдарды жасырамыз */
#lblClient,
#lblPriceFormula,
#lblQty,
#lblSum,
#lblStatus{
    display:none;
}

/* Сумма проекта жолын толық жасырамыз */
#pmSumRow{
    display:none;
}

/* Статус жолын да жасырамыз */
#pmStatusRow{
    display:none;
}

/* Price попап */
#priceModal .project-modal{
    max-width:960px;
    width:96%;
    height:90vh;
    display:flex;
    flex-direction:column;
}
#priceModal iframe{
    flex:1;
    width:100%;
    border:0;
    border-radius:12px;
    background:#000;
}

/* + жаңа проект кнопкасы */
.btn-plus{
    border-radius:999px;
    width:28px;
    height:28px;
    border:1px solid var(--border);
    background:transparent;
    color:#fff;
    font-size:18px;
    line-height:1;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
}
.btn-plus:hover{
    background:rgba(255,255,255,0.06);
}

@media (max-width: 780px){
    .pm-header-line-top{
        align-items:flex-start;
    }
}
/* Съёмка список үшін */
.shoot-item{
    margin-top:4px;
    font-size:12px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:8px;
}
.shoot-text{
    flex:1;
}
.shoot-edit-btn{
    border:none;
    background:transparent;
    color:var(--muted);
    cursor:pointer;
    font-size:13px;
    padding:2px 4px;
}
.shoot-edit-btn:hover{
    color:#fff;
}
/* Сохранённые дни съёмки под описанием */
#shootResult{
    margin-top:8px;
    font-size:12px;
    line-height:1.5;
    color:var(--muted);
}

.shoot-item{
    margin-top:4px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:8px;
}

.shoot-text{
    flex:1;
}

.shoot-actions{
    display:flex;
    gap:4px;
}

.shoot-icon-btn{
    border:none;
    background:transparent;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:2px;
    border-radius:4px;
}

.shoot-icon-btn svg{
    width:14px;
    height:14px;
    fill:#9aa3b5;
}

.shoot-icon-btn:hover svg{
    fill:#ffffff;
    transition:fill 0.15s ease;
}
/* Проект модалының үстіңгі badge-тері */
.pm-header-line-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:6px;
}
.pm-header-left{
    display:flex;
    gap:8px;
    align-items:center;
}
.pm-badge{
    display:inline-flex;
    align-items:center;
    padding:4px 10px;
    border-radius:999px;
    border:1px solid var(--border);
    font-size:12px;
    line-height:1.2;
    background:rgba(255,255,255,0.03);
}
.pm-badge-muted{
    color:var(--muted);
}

/* Описание + сохранённые дни съёмки */
#pmDesc{
    font-size:13px;
    line-height:1.6;
    white-space:pre-line;
    margin-bottom:6px;
}

/* День съёмки тізімі */
#shootResult{
    margin-top:4px;
    font-size:12px;
    line-height:1.5;
    color:var(--muted);
}

.shoot-item{
    margin-top:4px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:8px;
}

.shoot-text{
    flex:1;
}

/* Типке қарай түс */
.shoot-text-school{
    color:#ff9800; /* оранжевый */
}
.shoot-text-walk{
    color:#4caf50; /* жасыл */
}
.shoot-text-studio{
    color:#9c27b0; /* фиолетовый */
}

/* Иконкалар */
#projectEditBtn,
.shoot-icon-btn {
    color: #111;   /* қара */
}

.dark .shoot-icon-btn,
.dark #projectEditBtn {
    color: #fff;   /* ақ */
}
.payment-warn {
    color: #e53935;
    font-weight: 600;
}

.payment-ok {
    color: #1e8e3e;
    font-weight: 600;
}

.pm-payments-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
}

.pm-payments-ul {
    list-style: none;
    padding: 0;
    margin: 0 0 4px 0;
}

.pm-payments-item {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.pm-payments-date {
    opacity: 0.7;
}

.pm-payments-total {
    font-size: 12px;
    font-weight: 600;
}
.fin-remain-ok {
    color: #16a34a; /* жасыл */
    font-weight: 600;
}
.fin-remain-warn {
    color: #b91c1c; /* қызыл */
    font-weight: 600;
}
.finance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.finance-table th,
.finance-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}
.finance-table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6b7280;
}
/* Статус түсі */
#pmStatus.status-process,
#pmOrderHeader.status-process {
    color: #f97316; /* оранжевый */
}
#pmStatus.status-done,
#pmOrderHeader.status-done {
    color: #16a34a; /* жасыл */
}
.projects-row.row-status-process {
    background: rgba(249, 115, 22, 0.05);
}
.projects-row.row-status-done {
    background: rgba(22, 163, 74, 0.05);
}

/* Модалдың ішіндегі блок – ақ фон */
.project-modal-content {
    background:#ffffff;
}

/* Кнопкаларды бір блокқа жинау (HTML-де .pm-actions-row болса) */
.pm-actions-row{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin-top:8px;
}
.pm-actions-row button{
    flex:1 1 auto;
/* Төменгі иконкалар блогы – бір блоктың ішінде */
.pm-actions-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 10px;
    background: #FFFFFF; /* бір ортақ фон, қаласаң өзгертуге болады */
}

/* Осы блок ішіндегі иконкаларды "чистый" иконка қыламыз */
.icon-btn-plain {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 4px !important;
    border-radius: 0 !important;
    min-width: auto;
}
.icon-btn-plain svg {
    display: block;
}}
/* --------------------------
   EVENT COLORS (Updated)
--------------------------- */

/* В школе или в ВУЗе → ORANGE */
.cal-event-school {
    background: #ffb648;
    color: #000;
    border-left: 3px solid #e08e00;
}

/* Прогулочная → GREEN */
.cal-event-walk {
    background: #7bd87b;
    color: #000;
    border-left: 3px solid #2b9e2b;
}

/* Фотостудия → PURPLE */
.cal-event-studio {
    background: #c19bff;
    color: #000;
    border-left: 3px solid #7a55d1;
}

/* Адаптация: hover */
.cal-event:hover {
    opacity: 0.85;
}

/* Ұяшықтағы event көрінісі */
.cal-event {
    padding: 2px 4px;
    font-size: 11px;
    margin: 2px 0;
    border-radius: 4px;
    cursor: pointer;
    line-height: 1.25;
}