/* GCY admin panel */
:root {
  --ink: #0d2430; --ink-2: #163847; --teal: #138a8a; --accent: #b88a4a;
  --bg: #f4f2ee; --line: #e6e2da; --muted: #6b7a80;
  --bs-primary: #0d2430; --bs-primary-rgb: 13, 36, 48;
}
body.admin, body.login-page { font-family: "Manrope", system-ui, sans-serif; background: var(--bg); color: #22323a; }
h1, h2, .h4, .h5 { font-family: "Manrope", sans-serif; font-weight: 700; color: var(--ink); }
a { color: var(--teal); text-decoration: none; }
.btn { border-radius: 10px; font-weight: 600; }
.btn-primary { background: var(--ink); border-color: var(--ink); }
.btn-primary:hover, .btn-primary:focus { background: var(--ink-2); border-color: var(--ink-2); }
.form-control, .form-select { border-radius: 10px; border-color: var(--line); }
.form-control:focus, .form-select:focus { border-color: var(--teal); box-shadow: 0 0 0 .2rem rgba(19,138,138,.15); }
.form-label { font-size: .82rem; font-weight: 600; margin-bottom: .3rem; }
.form-check-input:checked { background-color: var(--teal); border-color: var(--teal); }
.brand-mark { font-family: "Fraunces", Georgia, serif; font-weight: 500; letter-spacing: .08em; background: #fff; color: var(--ink); padding: .3rem .5rem; border-radius: 8px; font-size: .95rem; }
.brand-mark-lg { background: var(--ink); color: #f0d9b5; font-size: 1.6rem; padding: .5rem .8rem; border-radius: 14px; display: inline-block; }

/* Shell */
.admin-shell { display: flex; min-height: 100vh; }
.admin-side { width: 250px; background: var(--ink); color: rgba(255,255,255,.8); display: flex; flex-direction: column; flex-shrink: 0; }
@media (min-width: 992px) { .admin-side { position: sticky; top: 0; height: 100vh; } }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.25rem 1rem; }
.side-brand { color: #fff; font-weight: 700; display: flex; align-items: center; gap: .6rem; }
.side-brand:hover { color: #fff; }
.side-nav { padding: .5rem .75rem; flex: 1; overflow-y: auto; }
.side-nav a { display: flex; align-items: center; gap: .75rem; color: rgba(255,255,255,.72); padding: .65rem .85rem; border-radius: 10px; font-weight: 600; font-size: .92rem; margin-bottom: 2px; }
.side-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-nav a.active { background: rgba(255,255,255,.12); color: #fff; }
.side-nav a i { font-size: 1.05rem; opacity: .85; }
.badge-pill { margin-left: auto; background: var(--accent); color: #fff; font-size: .7rem; padding: .1rem .5rem; border-radius: 999px; }
.side-foot { padding: 1rem 1.25rem; border-top: 1px solid rgba(255,255,255,.08); font-size: .85rem; }
.side-foot > a { color: rgba(255,255,255,.65); display: block; margin-bottom: .75rem; }
.side-user { display: flex; align-items: center; justify-content: space-between; }
.side-user strong { color: #fff; display: block; font-size: .88rem; }
.side-user span { font-size: .75rem; color: rgba(255,255,255,.5); }

.admin-main { flex: 1; min-width: 0; }
.admin-top { display: flex; align-items: center; gap: 1rem; padding: 1rem 2rem; background: rgba(244,242,238,.9); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 1020; border-bottom: 1px solid var(--line); }
.admin-top h1 { font-size: 1.35rem; margin: 0; }
.admin-content { padding: 1.75rem 2rem 4rem; max-width: 1500px; }
@media (max-width: 767.98px) { .admin-top, .admin-content { padding-left: 1rem; padding-right: 1rem; } }

/* Cards */
.card-a { background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.card-a-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.card-a-head h2 { font-size: 1rem; margin: 0; }
.card-title-a { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 1.1rem; }
.stat { display: block; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem 1.2rem; color: var(--ink); transition: border-color .2s, transform .2s; height: 100%; }
.stat:hover { border-color: var(--teal); transform: translateY(-2px); color: var(--ink); }
.stat i { color: var(--accent); font-size: 1.25rem; }
.stat strong { display: block; font-size: 1.8rem; line-height: 1.2; margin-top: .4rem; }
.stat span { font-size: .8rem; color: var(--muted); }
.list-a { list-style: none; margin: 0; padding: .5rem 1.25rem; }
.list-a li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.list-a li:last-child { border: 0; }
.list-a span { color: var(--muted); white-space: nowrap; }

/* Tables */
.table-a { --bs-table-bg: transparent; font-size: .9rem; }
.table-a thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; border-bottom-color: var(--line); padding: .8rem 1rem; background: #faf9f6; }
.table-a td { padding: .8rem 1rem; border-color: var(--line); }
.table-a tr.clickable { cursor: pointer; }
.thumb-a { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; background: #eee; }
.star { color: #c9c3b8; font-size: 1.1rem; }
.star.on { color: var(--accent); }
.pill-toggle { font-size: .72rem; font-weight: 700; border-radius: 999px; padding: .2rem .7rem; background: #ece9e3; color: var(--muted); border: 0; display: inline-block; }
.pill-toggle.on { background: #d8f0ee; color: #0e6e6e; }
.status-select { width: auto; font-weight: 600; font-size: .8rem; border-radius: 999px; padding-top: .2rem; padding-bottom: .2rem; }
.st-available { background-color: #e7f5ee; color: #19734a; }
.st-reserved { background-color: #fdf1d8; color: #8a5a00; }
.st-sold, .st-rented { background-color: #ece9e3; color: #555; }
.st-badge { font-size: .72rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; background: #ece9e3; color: #555; }
.st-new { background: #fde3d6; color: #a2410f; }
.st-contacted { background: #e2eefc; color: #1c4f8c; }
.st-qualified { background: #d8f0ee; color: #0e6e6e; }
.st-closed { background: #e7f5ee; color: #19734a; }
.st-spam { background: #eee; color: #999; }

/* Forms */
.dropzone { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: 2rem; border: 2px dashed var(--line); border-radius: 14px; cursor: pointer; text-align: center; background: #faf9f6; transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone.drag { border-color: var(--teal); background: #eef7f6; }
.dropzone i { font-size: 2rem; color: var(--teal); }
.dropzone span { font-size: .8rem; color: var(--muted); }
.dropzone input { display: none; }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; }
.img-tile { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.img-tile img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.img-tile.new { border-color: var(--teal); }
.img-tile .new-tag { font-size: .72rem; padding: .3rem .5rem; color: var(--teal); font-weight: 700; }
.icon-pick { display: flex; flex-wrap: wrap; gap: .35rem; }
.icon-pick .btn { width: 42px; height: 42px; padding: 0; display: grid; place-items: center; }
.icon-pick .btn-check:checked + .btn { background: var(--ink); border-color: var(--ink); color: #fff; }
.hero-thumb { width: 160px; height: 90px; object-fit: cover; border-radius: 10px; }
.editor { background: #fff; border-radius: 0 0 10px 10px; min-height: 220px; font-size: .95rem; }
.editor-tall { min-height: 420px; }
.ql-toolbar.ql-snow { border-radius: 10px 10px 0 0; border-color: var(--line); }
.ql-container.ql-snow { border-color: var(--line); }
.save-bar { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 35%); padding: 1.5rem 0 1rem; }

/* Service site cards */
.page-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; height: 100%; }
.page-card-hero { height: 110px; background: var(--pc-accent) center/cover; position: relative; display: flex; align-items: flex-end; padding: .75rem; }
.page-card-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent, rgba(0,0,0,.35)); }
.page-card-hero i { position: relative; z-index: 1; color: #fff; font-size: 1.6rem; background: var(--pc-accent); width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.page-card-hero .pill-toggle { position: absolute; top: .75rem; right: .75rem; z-index: 1; }

/* Inquiry detail */
.detail-list { display: grid; grid-template-columns: 90px 1fr; gap: .4rem 1rem; font-size: .9rem; margin: 0; }
.detail-list dt { color: var(--muted); font-weight: 600; }
.detail-list dd { margin: 0; word-break: break-word; }
.msg-box { background: #faf9f6; border: 1px solid var(--line); border-radius: 12px; padding: 1rem; margin-top: 1rem; font-size: .92rem; white-space: normal; }

/* Login & install */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
  background: radial-gradient(1200px 600px at 10% -10%, #1e5560 0%, transparent 60%), var(--ink); }
.login-card { background: #fff; border-radius: 22px; padding: 2.5rem; width: 100%; max-width: 420px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.6); }
.login-card.wide { max-width: 560px; }
.pagination .page-link { border-radius: 8px !important; margin: 0 2px; color: var(--ink); }
.pagination .active .page-link { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Sidebar: keep the dark background at every width (Bootstrap makes .offcanvas-lg transparent on desktop) */
.admin-side, .admin-side.offcanvas-lg { background-color: var(--ink) !important; --bs-offcanvas-bg: var(--ink); --bs-offcanvas-color: #fff; color: #fff; }
.side-nav a { color: rgba(255,255,255,.9); }
.side-nav a i { opacity: 1; color: #f0d9b5; }
.side-nav a.active { background: rgba(255,255,255,.16); color: #fff; }
.side-foot > a { color: rgba(255,255,255,.85); }
.side-user span { color: rgba(255,255,255,.7); }

/* Bilingual editing */
.i18n-tabs { position: sticky; top: 72px; z-index: 1010; display: inline-flex; align-items: center; gap: .25rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .25rem; margin-bottom: 1rem; box-shadow: 0 6px 18px -12px rgba(0,0,0,.35); }
.i18n-tabs-label { font-size: .75rem; font-weight: 700; color: var(--muted); padding: 0 .6rem 0 .5rem; text-transform: uppercase; letter-spacing: .08em; }
.i18n-tabs button { border: 0; background: transparent; font-weight: 700; font-size: .85rem; padding: .4rem .9rem; border-radius: 999px; color: var(--ink); position: relative; }
.i18n-tabs button.active { background: var(--ink); color: #fff; }
.i18n-missing { display: none; width: 7px; height: 7px; border-radius: 50%; background: #e0892f; position: absolute; top: 5px; right: 6px; }
.i18n-tabs.has-missing .i18n-missing { display: block; }
.lang-tag { display: inline-block; font-size: .62rem; font-weight: 700; letter-spacing: .06em; padding: .1rem .35rem; border-radius: 5px; background: #e8eef0; color: #35505a; vertical-align: middle; }
[data-lang-pane="es"] .lang-tag { background: #fbeedd; color: #8a5a1c; }
.es-badge { display: inline-block; font-size: .6rem; font-weight: 700; padding: .1rem .35rem; border-radius: 5px; vertical-align: middle; margin-left: .25rem; }
.es-badge.ok { background: #e7f5ee; color: #19734a; }
.es-badge.part { background: #fdf1d8; color: #8a5a00; }
.es-badge.none { background: #ece9e3; color: #8a8a8a; }
.palette-opt { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line); border-radius: 10px; padding: .55rem .8rem; cursor: pointer; font-size: .88rem; font-weight: 600; background: #fff; }
.palette-opt:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink) inset; }
.palette-opt .sw { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.1); }
.avatar-ph { width: 48px; height: 48px; border-radius: 50%; background: #ece9e3; display: grid; place-items: center; color: var(--muted); }
