/* Wayana dashboard */
:root { --green: #0F4733; --green-2: #1B5E44; --green-soft: #FFF3E6; --orange: #E5842E; --bg: #FFFFFF; --card: #fff; --ink: #14251C; --ink-2: #56685E; --line: #E5E5E5; --red: #B3261E; --blue: #1A73E8; }
* { box-sizing: border-box; }
body { margin: 0; font-family: "Readex Pro", Tahoma, sans-serif; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.6; }
a { color: var(--green-2); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
h1 { font-size: 1.5rem; margin: 0; color: var(--green); }
h2 { font-size: 1.15rem; margin: 0 0 12px; color: var(--green); }

.layout { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { background: #fff; color: var(--ink); border-inline-start: 1px solid var(--line); padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .logo { display: flex; align-items: center; gap: 10px; color: #000; text-decoration: none; font-weight: 700; margin-bottom: 24px; }
.side .logo img { width: 44px; height: 44px; border-radius: 10px; background: #fff; object-fit: contain; padding: 3px; }
.side h3 { font-size: .75rem; color: #8A6A4A; margin: 18px 10px 6px; font-weight: 500; }
.side a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.side a:hover { background: var(--green-soft); }
.side a.active { background: var(--orange); color: #fff; font-weight: 700; }
.side .badge { background: #000; color: #fff; font-size: .75rem; font-weight: 700; border-radius: 999px; padding: 0 8px; }
.main { padding: 24px clamp(16px, 3vw, 36px) 60px; min-width: 0; }
.topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.topline .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.side-toggle { display: none; }
@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; }
    .side { position: fixed; inset: 0; z-index: 50; height: 100%; display: none; }
    .side.open { display: block; }
    .btn.side-toggle { display: inline-flex; }
}

.btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 16px; border-radius: 8px; border: 1px solid transparent; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; background: var(--green); color: #fff; }
.btn:hover { background: var(--green-2); color: #fff; }
.btn.light { background: #fff; color: var(--green); border-color: var(--line); }
.btn.light:hover { background: var(--green-soft); }
.btn.orange { background: var(--orange); color: #fff; }
.btn.danger { background: #fff; color: var(--red); border-color: #E8B4B0; }
.btn.danger:hover { background: #FDECEA; }
.btn.sm { min-height: 32px; padding: 4px 10px; font-size: .88rem; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 20px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; text-decoration: none; color: var(--ink); display: block; }
.stat strong { display: block; font-size: 1.9rem; color: var(--green); line-height: 1.2; }
.stat span { color: var(--ink-2); }
.stat.hot { border-color: var(--orange); background: #FFF6EC; }
.list th { background: #FAFAFA !important; }

table.list { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.list th, .list td { padding: 11px 14px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list th { background: #F7FAF8; font-weight: 600; color: var(--ink-2); font-size: .88rem; }
.list tr:last-child td { border-bottom: 0; }
.list tr:hover td { background: #FAFCFB; }
.list .thumb { width: 64px; height: 44px; object-fit: cover; border-radius: 6px; background: var(--green-soft); display: block; }
.list .logo { width: 90px; height: 50px; object-fit: contain; }
.table-wrap { overflow-x: auto; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--green-soft); color: var(--green); white-space: nowrap; }
.pill.new { background: #FFE9D4; color: #8A4100; }
.pill.contacted { background: #E3EEFD; color: #174EA6; }
.pill.accepted { background: #DDF3E4; color: #14532D; }
.pill.rejected, .pill.off { background: #F1F3F2; color: #66736C; }
.pill.missing { background: #FDECEA; color: var(--red); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.tabs a.active { background: var(--orange); color: #fff; border-color: var(--orange); }
.tabs .count { font-size: .8rem; opacity: .8; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.filters input, .filters select { min-height: 40px; }

label { display: block; font-weight: 600; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.field .hint { color: var(--ink-2); font-size: .85rem; margin-top: 4px; font-weight: 400; }
input[type=text], input[type=email], input[type=url], input[type=password], input[type=number], input[type=search], input[type=date], input[type=datetime-local], select, textarea {
    width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; color: var(--ink);
}
textarea { min-height: 100px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green); outline: 3px solid rgba(26,115,232,.25); }
input[dir=ltr], textarea[dir=ltr] { text-align: left; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; margin-inline-end: 20px; }
.check input { width: 18px; height: 18px; accent-color: var(--green); }
.lang-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.lang-cols > div { min-width: 0; }
.lang-tag { display: inline-block; font-size: .72rem; padding: 1px 8px; border-radius: 6px; background: var(--green-soft); color: var(--green); margin-inline-start: 6px; font-weight: 600; vertical-align: middle; }
.lang-tag.en { background: #E3EEFD; color: #174EA6; }
@media (max-width: 1000px) { .lang-cols { grid-template-columns: 1fr; } }
.lang-switch { display: flex; gap: 6px; margin-bottom: 12px; }
.lang-switch button { padding: 6px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font: inherit; cursor: pointer; }
.lang-switch button[aria-pressed=true] { background: var(--orange); color: #fff; border-color: var(--orange); }
.img-preview { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.img-preview img { max-width: 220px; max-height: 120px; border-radius: 8px; border: 1px solid var(--line); background: #fff; object-fit: contain; }
.gallery-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-bottom: 10px; }
.gallery-edit label { position: relative; margin: 0; font-weight: 400; }
.gallery-edit img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
.gallery-edit input { position: absolute; top: 6px; inset-inline-start: 6px; width: 18px; height: 18px; }
.sticky-save { position: sticky; bottom: 0; background: rgba(255,255,255,.96); padding: 12px 0; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; margin-top: 12px; z-index: 5; }

.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; }
.alert.ok { background: #DDF3E4; color: #14532D; border: 1px solid #A7D7B8; }
.alert.err { background: #FDECEA; color: #7F1D1D; border: 1px solid #F2B8B5; }
.error { color: var(--red); font-size: .88rem; margin-top: 4px; }
.muted { color: var(--ink-2); }
.dl { display: grid; grid-template-columns: minmax(160px, 35%) 1fr; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.dl > div { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.dl > div:nth-child(odd) { background: #F7FAF8; color: var(--ink-2); }
.dl .sec { grid-column: 1 / -1; background: var(--green-soft) !important; color: var(--green) !important; font-weight: 700; }
.pagination { display: flex; gap: 4px; list-style: none; padding: 0; margin: 20px 0; flex-wrap: wrap; }
.pagination a, .pagination span { display: block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-decoration: none; color: var(--ink); }
.pagination .active span { background: var(--orange); color: #fff; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: #fff; border-top: 6px solid var(--orange); }
.login .card { width: min(420px, 100%); padding: 32px; }
.login img { height: 80px; display: block; margin: 0 auto 16px; }
.tox-tinymce { border-radius: 10px !important; border-color: var(--line) !important; }
