* { box-sizing: border-box; }
body {
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #212529;
}
header {
    background-color: #343a40;
    padding: 1rem;
    color: white;
    text-align: center;
}
nav {
    background-color: #495057;
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 0.5rem 0;
}
nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}
nav a:hover {
    text-decoration: underline;
}
main {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
form {
    margin-bottom: 2rem;
}
input[type="file"] {
    display: block;
    margin: 1rem 0;
}
button {
    background-color: #007bff;
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}
button:hover {
    background-color: #0056b3;
}
.flashes {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    color: green;
    font-weight: bold;
}
.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.thumb {
    width: 150px;
    text-align: center;
}
.thumb img {
    width: 200px;
    height: auto;
    object-fit: cover;
    border-radius: 5px;
}

.week-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.week-button {
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    color: white;
}
.week-button.green {
    background-color: green;
    color: white;
}
.photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1rem;
}

.photo-thumb {
    width: 150px;
    height: auto;
    border: 1px solid #ccc;
    border-radius: 5px;
}
.week-button.red {
    background-color: red;
    color: white;
}
.week-button.has-photos {
    background-color: green;
}
.week-button.no-photos {
    background-color: red;
}

.week-indicator {
    margin: 20px 0;
}
.week-indicator span {
    display: inline-block;
    padding: 8px 12px;
    margin-right: 5px;
    border-radius: 5px;
    color: white;
}
.has-data {
    background-color: green;
}
.no-data {
    background-color: red;
}

.delete-btn {
    margin-top: 5px;
    background-color: #dc3545;
}
.delete-btn:hover {
    background-color: #a71d2a;
}


body {
    background-color: #f0f4ff;
}

header {
    background-color: #00509e;
    padding: 20px;
    color: white;
    text-align: center;
    font-size: 28px;
}

h2 {
    color: #003f7d;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

.modern-btn {
    background-color: #007bff;
    color: white;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.modern-btn:hover {
    background-color: #0056b3;
}


.top-right {
    position: absolute;
    top: 20px;
    right: 20px;
}

.top-right a {
    color: white;
    margin-left: 20px;
    text-decoration: none;
    font-weight: bold;
}

.top-right a:hover {
    text-decoration: underline;
}

/* -------- Mobile-first adjustments -------- */
@media (max-width: 640px){
  body{font-size:15px}
  main, main.centered{max-width:100%; margin:10px auto; padding:0 10px}
  .gallery, .photo-grid{gap:8px}
  /* override any fixed sizes in template-level CSS */
  .photo-grid img{width:calc(50% - 8px) !important; height:auto !important; object-fit:cover; border-radius:8px}
  .thumbs{gap:8px !important}
  .thumbs img{width:calc(33.33% - 8px) !important; height:auto !important; object-fit:cover}
  input[type="file"]{width:100%}
  button, .modern-btn, .week-button{padding:10px 14px; font-size:14px}
}
.flashes {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}
.flash {
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    font-weight: bold;
}
.flash.success {
    background-color: #d4edda;
    color: #155724;
}
.flash.warning {
    background-color: #fff3cd;
    color: #856404;
}
.flash.danger {
    background-color: #f8d7da;
    color: #721c24;
}
.form-line {
    display: block;
    margin-bottom: 15px;
}
.profile-form {
    max-width: 400px;
    margin: 0 auto;
    font-size: 18px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-form label {
    display: flex;
    flex-direction: column;
}
.profile-form {
    max-width: 600px;
    margin: 0 auto;
    font-size: 18px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.form-row label {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
}
.form-row label.required::after { content: ' *'; color: #dc2626; margin-left: 4px; }

.form-row input {
    flex: 1;
    padding: 8px;
    font-size: 16px;
}

/* Registration form alignment tweaks */
.register-box .form-row { align-items: flex-start; }
.register-box .form-row label { flex: 0 0 180px; text-align: right; font-weight: 700; white-space: nowrap; }
.register-box .form-row .control { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.register-box .form-row .control input { width: 100%; max-width: 100%; }
.register-box .form-row .control small { color:#6b7280; font-size:12px; }
.register-box .button-row .control { display: flex; justify-content: flex-start; }
.register-box .button-row .modern-btn { width: 100%; max-width: 260px; }
.register-box .hint-right { text-align: right; font-size: 12px; color:#6b7280; margin-top: -8px; }

.button-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 в ряд */
    gap: 20px;
    justify-items: center;
    margin-top: 20px;
}

.square-btn {
    width: 160px;  /* ← размер квадрата, можно менять */
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #005BBB;
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    border-radius: 10px;
    transition: background-color 0.3s;
}

.square-btn:hover {
    background-color: #007BFF;
}

.photo-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}
.photo-gallery img {
    width: 200px;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}
.upload-form {
    margin-top: 20px;
    margin-bottom: 30px;
}
.week-indicator {
    margin: 20px 0;
}
.week-indicator span {
    display: inline-block;
    padding: 8px 12px;
    margin-right: 5px;
    border-radius: 5px;
    color: white;
    font-weight: bold;
}
.has-data {
    background-color: green;
}
.no-data {
    background-color: red;
}
.align-right-btn {
    align-self: flex-end;
    width: 50%;
    height: 40px; /* ← увеличенная высота */
    font-size: 18px; /* размер текста побольше */
}
.flash.danger {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 10px;
}
.login-form label {
    display: inline-block;
    width: 140px;
    font-size: 16px;
    font-weight: bold;
    vertical-align: middle;
    margin-bottom: 12px;
}

.login-form input {
    width: 250px;
    padding: 8px 10px;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #ccc;
    margin-bottom: 12px;
    vertical-align: middle;
}

.login-form .form-row {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
    justify-content: flex-start;
}

.login-form .btn-login {
    font-size: 16px;
    padding: 12px 24px;
    margin-top: 12px;
}
.form-box {
    max-width: 500px;
    margin: 0 auto;
    padding: 40px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.button-row {
    justify-content: flex-end !important;
}

.week-button {
    padding: 4px 8px;
    font-size: 14px;
    font-weight: 500;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    min-width: 60px;
    text-align: center;
    margin: 2px;  /* 🔽 уменьшенный отступ */
}

form {
    display: inline-block;
    margin: 2px;  /* 🔽 уменьшенный отступ между кнопками */
}

.week-button:hover {
background-color: #c0392b;
transform: translateY(-2px);
}

.week-button.selected {
background-color: #27ae60;
}

.week-grid {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 10px;
padding: 20px;
max-width: 700px;
margin: 0 auto;
}

.week-button.has-photos {
background-color: green;
}

.week-button.no-photos {
background-color: red;
}

.week-button.selected {
border: 2px solid yellow;
}

.week-selector {
margin-bottom: 20px;
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.create-order-btn {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 8px 14px;
    border-radius: 5px;
    text-decoration: none;
    margin-bottom: 15px;
}
.create-order-btn:hover {
    background: #218838;
}
nav a.active {
  font-weight: bold;
  border-bottom: 2px solid #000; /* или цвет в тему */
}
.hero {
  text-align: center;
  padding: 80px 20px;
  background: linear-gradient(135deg, #0b57a0, #2563eb);
  color: #fff;
  border-radius: 16px;
  margin: 20px 0;
}
.hero h1 {
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 16px;
}
.hero p {
  font-size: 20px;
  opacity: 0.9;
}
.hero-buttons {
  margin-top: 24px;
  display: flex;
  gap: 16px;
  justify-content: center;
}
.btn-primary, .btn-secondary {
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}
.btn-primary {
  background: #fff;
  color: #0b57a0;
}
.btn-secondary {
  background: rgba(255,255,255,0.15);
  border: 2px solid #fff;
  color: #fff;
}
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
  gap: 20px;
  margin: 60px 0;
}
.feature {
  padding: 24px;
  border-radius: 16px;
  background: #f9fafb;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.feature h3 {
  margin-bottom: 8px;
}
/* Ensure required star sits inline with label text on one line */
.profile-form .form-row label { display: flex !important; flex-direction: row !important; align-items: center; gap: 4px; white-space: nowrap; }
.profile-form .form-row label.required::after { content: ' *'; color: #dc2626; margin-left: 4px; }
