/* ==============================
   ROSA — Pure PHP Website
   Multi-page version
   ============================== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Montserrat:wght@300;400;500;600&display=swap');

:root {
  --bg: hsl(40, 33%, 97%);
  --fg: hsl(30, 10%, 15%);
  --primary: hsl(40, 60%, 54%);
  --primary-fg: hsl(40, 33%, 97%);
  --secondary-bg: hsl(35, 25%, 90%);
  --muted: hsl(30, 8%, 50%);
  --border: hsl(35, 25%, 85%);
  --card-bg: hsl(40, 30%, 95%);
  --gold-gradient: linear-gradient(135deg, hsl(40, 60%, 54%), hsl(45, 70%, 65%));
  --gold-text-gradient: linear-gradient(135deg, hsl(40, 60%, 50%), hsl(35, 50%, 40%));
  --shadow: 0 10px 30px -10px rgba(0,0,0,0.12);
  --radius: 0.25rem;
  --font-display: 'Playfair Display', serif;
  --font-heading: 'Cormorant Garamond', serif;
  --font-body: 'Montserrat', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}
html { overflow-x: hidden; max-width: 100vw; }

section { overflow: hidden; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 768px; margin: 0 auto; padding: 0 1.5rem; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* Gold gradient text */
.gold-text {
  background: var(--gold-text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gold-line { height: 1px; width: 4rem; background: var(--gold-gradient); }
.gold-line-center { margin: 0 auto; }

/* Typography */
.font-display { font-family: var(--font-display); }
.font-heading { font-family: var(--font-heading); }
.font-body { font-family: var(--font-body); }
.tracking-wide { letter-spacing: 0.25em; }
.tracking-wider { letter-spacing: 0.35em; }
.text-center { text-align: center; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--muted); }
.uppercase { text-transform: uppercase; }
.italic { font-style: italic; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: hsla(40, 33%, 97%, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid hsla(35, 25%, 85%, 0.5);
}
.navbar .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1rem; padding-bottom: 1rem;
}
.navbar-brand {
  font-family: var(--font-display); font-size: 1.5rem; letter-spacing: 0.35em;
}
.navbar-links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.navbar-links a {
  font-family: var(--font-body); font-size: 0.7rem;
  letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--muted); transition: color 0.3s;
}
.navbar-links a:hover, .navbar-links a.active { color: var(--primary); }
.nav-btn {
  font-family: var(--font-body); font-size: 0.7rem;
  letter-spacing: 0.35em; text-transform: uppercase;
  background: var(--primary); color: var(--primary-fg);
  border: none; cursor: pointer; padding: 0.5rem 1.25rem;
  transition: background 0.3s;
}
.nav-btn:hover { background: hsla(40, 60%, 54%, 0.9); }
.lang-btn {
  font-size: 1.25rem; background: none; border: none; cursor: pointer;
  transition: transform 0.2s;
}
.lang-btn:hover { transform: scale(1.1); }

.hamburger { display: none; background: none; border: none; cursor: pointer; color: var(--fg); font-size: 1.5rem; }
.mobile-menu { display: none; }

@media (max-width: 768px) {
  .navbar-links { display: none; }
  .hamburger { display: block; }
  .mobile-menu.open {
    display: flex; flex-direction: column; align-items: center;
    gap: 1.5rem; padding: 1.5rem 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
  }
  .mobile-menu a, .mobile-menu button {
    font-family: var(--font-body); font-size: 0.8rem;
    letter-spacing: 0.35em; text-transform: uppercase;
    color: var(--muted); background: none; border: none; cursor: pointer;
  }
  .mobile-menu .nav-btn { background: var(--primary); color: var(--primary-fg); padding: 0.75rem 2rem; }
}

/* ===== SECTIONS ===== */
section { padding: 6rem 0; }
section.alt-bg { background: var(--secondary-bg); }

.section-header { text-align: center; margin-bottom: 4rem; }
.section-subtitle {
  font-family: var(--font-body); font-size: 0.7rem;
  letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--font-display); font-size: 2.25rem;
  color: var(--fg); margin-bottom: 1rem;
}
@media (min-width: 768px) { .section-title { font-size: 3rem; } }

/* ===== PAGE HERO (multi-page) ===== */
.page-hero {
  padding: 8rem 0 3rem;
  background: var(--bg);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; position: relative; overflow: hidden;
  padding-top: 5rem;
}
.hero-fullwidth { position: relative; }
.hero-fullwidth .hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-fullwidth .hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-fullwidth .hero-content { width: 100%; }
.hero-content { position: relative; z-index: 1; text-align: left; }
.hero-name {
  font-family: var(--font-display); font-size: 3.75rem; line-height: 1;
  margin-bottom: 1.5rem;
}
@media (min-width: 768px) { .hero-name { font-size: 6rem; } }
@media (min-width: 1024px) { .hero-name { font-size: 8rem; } }

.hero-grid {
  display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center;
  overflow: hidden; width: 100%;
}
.hero-grid > * { min-width: 0; overflow: hidden; }
@media (min-width: 768px) { .hero-grid { grid-template-columns: 1fr 1fr; } }

.hero-image { position: relative; }
.hero-image img { box-shadow: var(--shadow); }
.hero-image .overlay {
  position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px hsla(40, 60%, 54%, 0.2);
}

.img-small { max-width: 400px; width: 100%; }
.img-medium { max-width: 600px; width: 100%; }
.img-large { max-width: 100%; }

.layout-grid {
  display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: flex-start;
  overflow: hidden; width: 100%;
}
.layout-grid > * { min-width: 0; overflow: hidden; }
@media (min-width: 768px) { .layout-grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }

/* Read more link */
.read-more {
  display: inline-block; margin-top: 1.5rem;
  font-family: var(--font-body); font-size: 0.7rem;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--primary); transition: opacity 0.3s;
}
.read-more:hover { opacity: 0.7; }

/* Personal Details Card */
.details-heading {
  font-family: var(--font-heading); font-size: 2rem;
  color: var(--fg); text-align: center; margin-bottom: 1rem;
  font-weight: 400; word-break: break-word;
}
@media (min-width: 768px) { .details-heading { font-size: 2.5rem; } }
.details-card {
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 2px 20px rgba(0,0,0,0.07);
  padding: 0.5rem 2rem;
  max-width: 550px;
  margin: 0 auto;
}
.detail-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 1rem 0;
  border-bottom: 1px solid #eae6e1;
}
.detail-row:last-child { border-bottom: none; }
.detail-label {
  font-family: var(--font-body); font-size: 0.875rem;
  color: var(--fg); font-weight: 400;
}
.detail-value {
  font-family: var(--font-body); font-size: 0.875rem;
  color: var(--muted); text-align: right;
}
@media (max-width: 480px) {
  .details-card { padding: 0.5rem 1.25rem; max-width: 100%; }
  .detail-label, .detail-value { font-size: 0.8rem; }
  .details-heading { font-size: 1.5rem; }
  .detail-value { word-break: break-word; }
}

/* Outline button */
.btn-outline {
  display: inline-block;
  font-family: var(--font-body); font-size: 0.7rem;
  letter-spacing: 0.35em; text-transform: uppercase;
  padding: 0.85rem 2.5rem;
  border: 1px solid var(--primary); color: var(--primary);
  transition: all 0.3s;
}
.btn-outline:hover { background: var(--primary); color: var(--primary-fg); }

/* ===== SERVICES ===== */
.services-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 1.5rem; max-width: 768px; margin: 0 auto;
}
@media (min-width: 768px) { .services-grid { grid-template-columns: 1fr 1fr; } }

.service-card {
  border: 1px solid var(--border); padding: 2rem; transition: border-color 0.3s;
}
.service-card:hover { border-color: hsla(40, 60%, 54%, 0.4); }
.service-card h3 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 0.5rem; }
.service-card p { font-size: 0.875rem; color: var(--muted); margin-bottom: 1rem; }
.service-card .price {
  font-family: var(--font-heading); font-size: 1.125rem;
  color: var(--primary); font-style: italic;
}

/* ===== PORTFOLIO ===== */
.portfolio-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) { .portfolio-grid { grid-template-columns: repeat(4, 1fr); } }

.portfolio-item { overflow: hidden; }
.portfolio-item img { width: 100%; object-fit: cover; transition: transform 0.7s; }
.portfolio-item:hover img { transform: scale(1.05); }
.portfolio-item.full-width { grid-column: 1 / -1; }
.portfolio-item.half-left { grid-column: span 2; }
.portfolio-item.half-right { grid-column: 3 / span 2; }

.img-h-small { height: 12rem; }
.img-h-medium { height: 18rem; }
.img-h-large { height: 24rem; }

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.9); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; cursor: pointer;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img {
  max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: var(--radius);
}
.lightbox-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  background: none; border: none; color: white; font-size: 2rem; cursor: pointer;
}

/* ===== RATES ===== */
.rate-list { max-width: 36rem; margin: 0 auto; }
.rate-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 0; border-bottom: 1px solid var(--border);
}
.rate-item:last-child { border-bottom: none; }
.rate-duration { font-family: var(--font-heading); font-size: 1.25rem; }
.rate-price { font-family: var(--font-heading); font-size: 1.25rem; color: var(--primary); font-style: italic; }
.rate-note {
  text-align: center; font-size: 0.875rem; color: var(--muted);
  margin-top: 2.5rem; max-width: 28rem; margin-left: auto; margin-right: auto;
}

/* ===== FAQ ===== */
.faq-list { max-width: 42rem; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); padding: 0 1.5rem; margin-bottom: 0.75rem; }
.faq-question {
  width: 100%; text-align: left; background: none; border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 0;
  font-family: var(--font-heading); font-size: 1.125rem;
  color: var(--fg); transition: color 0.3s;
}
.faq-question:hover { color: var(--primary); }
.faq-question .arrow { transition: transform 0.3s; font-size: 0.75rem; }
.faq-item.open .faq-question .arrow { transform: rotate(180deg); }
.faq-answer {
  display: none; padding-bottom: 1rem;
  font-family: var(--font-body); font-size: 0.875rem;
  color: var(--muted); line-height: 1.6;
}
.faq-item.open .faq-answer { display: block; }

/* ===== CONTACT ===== */
.contact-form { max-width: 100%; }
.contact-form .form-group { margin-bottom: 1.5rem; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 0.75rem 1rem;
  border: 1px solid var(--border); background: var(--bg);
  font-family: var(--font-body); font-size: 0.875rem; color: var(--fg);
  outline: none; transition: border-color 0.3s;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--primary); }
.contact-form textarea { resize: vertical; min-height: 8rem; }

/* Contact method cards */
.contact-method-card {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.25rem 1.5rem; border: 1px solid var(--border);
  transition: border-color 0.3s;
}
.contact-method-card:hover { border-color: var(--primary); }
.contact-icon { font-size: 1.5rem; }
.contact-method-card strong {
  display: block; font-family: var(--font-display); font-size: 0.9rem; margin-bottom: 0.15rem;
}
.contact-method-card span { font-size: 0.8rem; color: var(--muted); }

/* Flash messages */
.flash-success {
  background: #f0fff4; border: 1px solid #9ae6b4; color: #276749;
  padding: 0.85rem 1.25rem; font-size: 0.85rem; text-align: center;
}
.flash-error {
  background: #fee; border: 1px solid #feb2b2; color: #c53030;
  padding: 0.85rem 1.25rem; font-size: 0.85rem; text-align: center;
}

.btn-primary {
  display: inline-block; width: 100%;
  background: var(--primary); color: var(--primary-fg);
  font-family: var(--font-body); font-size: 0.7rem;
  letter-spacing: 0.35em; text-transform: uppercase;
  padding: 1rem 2rem; border: none; cursor: pointer;
  text-align: center; transition: background 0.3s;
}
.btn-primary:hover { background: hsla(40, 60%, 54%, 0.9); }

/* ===== BOOK ME MODAL ===== */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--bg); border: 1px solid var(--border);
  max-width: 54rem; width: 92%; max-height: 90vh; overflow: hidden; border-radius: var(--radius);
  display: flex; flex-direction: column;
}
@media (min-width: 768px) { .modal-box { flex-direction: row; min-height: 50vh; } }
.modal-photo { width: 100%; height: 220px; object-fit: cover; flex-shrink: 0; }
@media (min-width: 768px) { .modal-photo { width: 50%; height: auto; min-height: 50vh; } }
.modal-info {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 2rem; gap: 1rem;
}
.modal-info h3 {
  font-family: var(--font-display); font-size: 1.5rem;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.modal-info p { font-size: 0.85rem; color: var(--muted); text-align: center; max-width: 20rem; line-height: 1.6; }
.modal-contacts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem;
  width: 100%; max-width: 22rem; margin-top: 0.5rem;
}
.modal-contact-link {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  padding: 1.25rem 0.75rem; border-radius: 0.5rem;
  background: rgba(0,0,0,0.02); border: 1px solid transparent;
  transition: all 0.25s ease;
  cursor: pointer;
}
.modal-contact-link:hover {
  background: rgba(201,168,76,0.08); border-color: var(--primary);
  transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.modal-contact-link:hover .contact-icon { transform: scale(1.15); }
.modal-contact-link:hover small { color: var(--fg); }
.modal-contact-link small { font-size: 0.95rem; color: var(--muted); transition: color 0.25s; word-break: break-all; text-align: center; }
.contact-icon { color: var(--primary); display: flex; align-items: center; justify-content: center; transition: transform 0.25s; }
.contact-icon svg { width: 40px; height: 40px; }
.modal-close {
  position: absolute; top: 1rem; right: 1rem; z-index: 2;
  background: rgba(255,255,255,0.8); border: none; width: 2rem; height: 2rem;
  border-radius: 50%; font-size: 1rem; cursor: pointer; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.modal-close:hover { background: #fff; color: var(--fg); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

/* ===== FOOTER ===== */
.footer { padding: 3rem 0; border-top: 1px solid var(--border); text-align: center; }
.footer-brand {
  font-family: var(--font-display); font-size: 1.25rem; letter-spacing: 0.35em;
  margin-bottom: 1rem;
}
.footer-copy { font-size: 0.7rem; color: var(--muted); letter-spacing: 0.15em; }

/* ===== MOBILE BOOK ME BAR ===== */
.mobile-bookme {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
  padding: 0.75rem; background: hsla(40, 33%, 97%, 0.95); backdrop-filter: blur(12px);
  border-top: 1px solid hsla(35, 25%, 85%, 0.5);
  -webkit-transform: translateZ(0); /* force GPU layer for iOS */
}
.mobile-bookme button { width: 100%; padding: 0.75rem; }
@media (max-width: 768px) { .mobile-bookme { display: block; } body { padding-bottom: 4.5rem; } }

/* ===== ADMIN ===== */
.admin-header {
  position: sticky; top: 0; z-index: 10;
  border-bottom: 1px solid var(--border); padding: 1rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg);
}
.admin-tabs { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-bottom: 2rem; }
.admin-tab {
  font-family: var(--font-body); font-size: 0.7rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  padding: 0.5rem 1rem; border: 1px solid var(--border);
  background: none; cursor: pointer; color: var(--muted);
  transition: all 0.3s;
}
.admin-tab.active, .admin-tab:hover {
  border-color: var(--primary); background: hsla(40, 60%, 54%, 0.1); color: var(--primary);
}
.admin-section { display: none; }
.admin-section.active { display: block; }

.admin-form label {
  display: block; font-family: var(--font-body); font-size: 0.7rem;
  color: var(--muted); margin-bottom: 0.25rem; text-transform: uppercase; letter-spacing: 0.1em;
}
.admin-form input, .admin-form textarea, .admin-form select {
  width: 100%; padding: 0.5rem 0.75rem;
  border: 1px solid var(--border); background: var(--bg);
  font-family: var(--font-body); font-size: 0.875rem; color: var(--fg);
  margin-bottom: 0.75rem; outline: none;
}
.admin-form input:focus, .admin-form textarea:focus { border-color: var(--primary); }
.admin-form textarea { resize: vertical; min-height: 5rem; }

.admin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 640px) { .admin-grid-2 { grid-template-columns: 1fr; } }

.btn-save {
  background: var(--primary); color: var(--primary-fg);
  font-family: var(--font-body); font-size: 0.7rem;
  letter-spacing: 0.35em; text-transform: uppercase;
  padding: 0.5rem 1.5rem; border: none; cursor: pointer;
  transition: background 0.3s;
}
.btn-save:hover { background: hsla(40, 60%, 54%, 0.9); }

.btn-delete {
  background: none; border: 1px solid #e53e3e; color: #e53e3e;
  font-family: var(--font-body); font-size: 0.7rem; letter-spacing: 0.1em;
  padding: 0.35rem 0.75rem; cursor: pointer; transition: all 0.3s;
}
.btn-delete:hover { background: #e53e3e; color: white; }

.btn-ghost {
  background: none; border: 1px solid var(--border); color: var(--muted);
  font-family: var(--font-body); font-size: 0.7rem; letter-spacing: 0.1em;
  padding: 0.35rem 0.75rem; cursor: pointer; transition: all 0.3s;
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

.btn-edit-img {
  background: none; border: 1px solid var(--primary); color: var(--primary);
  font-family: var(--font-body); font-size: 0.65rem; letter-spacing: 0.1em;
  padding: 0.3rem 0.6rem; cursor: pointer; transition: all 0.3s;
}
.btn-edit-img:hover { background: var(--primary); color: var(--primary-fg); }

.color-input-group {
  display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem;
}
.color-input-group input[type="color"] {
  width: 1.5rem; height: 1.5rem; border: 1px solid var(--border);
  cursor: pointer; padding: 0; margin: 0;
}
.color-input-group input[type="text"] {
  width: 5rem; font-family: monospace; font-size: 0.7rem;
  padding: 0.25rem 0.5rem; margin: 0;
}

.image-options-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.image-option {
  border: 2px solid var(--border); padding: 0.5rem; text-align: center;
  cursor: pointer; transition: all 0.3s;
  font-family: var(--font-body); font-size: 0.6rem;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.image-option.active { border-color: var(--primary); background: hsla(40, 60%, 54%, 0.1); color: var(--primary); }
.size-options-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }

.current-image-thumb {
  width: 5rem; height: 5rem; object-fit: cover; border: 1px solid var(--border);
}

.portfolio-admin-item { border: 1px solid var(--border); padding: 1rem; margin-bottom: 1rem; }
.portfolio-admin-item .thumb-row { display: flex; gap: 1rem; margin-bottom: 1rem; }
.portfolio-admin-item .thumb-row img { width: 8rem; height: 8rem; object-fit: cover; flex-shrink: 0; }

/* Toast */
.toast {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 200;
  background: var(--fg); color: var(--bg);
  padding: 0.75rem 1.5rem; font-family: var(--font-body); font-size: 0.8rem;
  border-radius: var(--radius); animation: fadeIn 0.3s, fadeOut 0.3s 2.7s;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(1rem); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

/* Login */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.login-box { width: 100%; max-width: 24rem; }
.login-box h1 { text-align: center; margin-bottom: 2rem; }
.login-box input {
  width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--border);
  background: var(--bg); font-family: var(--font-body); font-size: 0.875rem;
  margin-bottom: 1rem; outline: none;
}
.login-box input:focus { border-color: var(--primary); }
.login-error { color: #e53e3e; font-size: 0.8rem; text-align: center; margin-bottom: 1rem; }

/* ===== IMAGE EDITOR OVERLAY ===== */
#sph-editor-overlay {
  display: none; position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.85); backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
}
#sph-editor-overlay.open { display: flex; }

.sph-editor-wrap {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); width: 95vw; max-width: 900px;
  max-height: 95vh; display: flex; flex-direction: column; overflow: hidden;
}
.sph-editor-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1rem; border-bottom: 1px solid var(--border);
}
.sph-editor-title {
  font-family: var(--font-display); font-size: 1rem;
  background: var(--gold-text-gradient); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.sph-editor-close {
  background: none; border: none; font-size: 1.25rem; cursor: pointer; color: var(--muted);
}
.sph-editor-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem;
  padding: 0.5rem 1rem; border-bottom: 1px solid var(--border);
  background: var(--card-bg);
}
.sph-editor-toolbar button {
  font-family: var(--font-body); font-size: 0.65rem;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 0.35rem 0.6rem; border: 1px solid var(--border);
  background: var(--bg); color: var(--fg); cursor: pointer;
  transition: all 0.2s;
}
.sph-editor-toolbar button:hover { border-color: var(--primary); color: var(--primary); }
.sph-sep { width: 1px; height: 1.5rem; background: var(--border); margin: 0 0.15rem; }

.sph-slider-label {
  display: flex; align-items: center; gap: 0.3rem;
  font-size: 0.7rem; color: var(--muted);
}
.sph-slider-label input[type="range"] {
  width: 70px; height: 3px; accent-color: var(--primary); cursor: pointer;
}
.sph-slider-label span {
  font-family: monospace; font-size: 0.65rem; min-width: 1.5rem; color: var(--fg);
}

.sph-editor-canvas-wrap {
  flex: 1; overflow: auto; display: flex; align-items: center;
  justify-content: center; padding: 1rem; position: relative;
  background: hsl(30, 5%, 20%); min-height: 300px;
}
.sph-editor-canvas-wrap canvas {
  display: block; box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
#sphCropOverlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%; cursor: crosshair;
}

.sph-editor-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1rem; border-top: 1px solid var(--border);
}
.sph-editor-status { font-size: 0.7rem; color: var(--muted); }
.sph-btn-cancel {
  font-family: var(--font-body); font-size: 0.7rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  padding: 0.5rem 1.25rem; border: 1px solid var(--border);
  background: none; color: var(--muted); cursor: pointer;
  margin-right: 0.5rem; transition: all 0.2s;
}
.sph-btn-cancel:hover { border-color: var(--primary); color: var(--primary); }
.sph-btn-save {
  font-family: var(--font-body); font-size: 0.7rem;
  letter-spacing: 0.35em; text-transform: uppercase;
  padding: 0.5rem 1.5rem; border: none;
  background: var(--primary); color: var(--primary-fg); cursor: pointer;
  transition: background 0.2s;
}
.sph-btn-save:hover { background: hsla(40, 60%, 54%, 0.9); }

@media (max-width: 640px) {
  .sph-editor-toolbar { gap: 0.25rem; padding: 0.4rem 0.5rem; }
  .sph-editor-toolbar button { font-size: 0.55rem; padding: 0.25rem 0.4rem; }
  .sph-slider-label input[type="range"] { width: 50px; }
}
