/* ═══════════════════════════════════════════════════════════
   Belarretan Campamento – Frontend Styles
   Paleta: Verde oscuro Belarretan + lima + fondo crema-verde
   ═══════════════════════════════════════════════════════════ */

:root {
    --bel-dark:     #1a3d0e;
    --bel-med:      #2d6b1a;
    --bel-leaf:     #4a8a22;
    --bel-lime:     #7ab020;
    --bel-lime-lt:  #a8cc40;
    --bel-bg:       #f0f5e0;
    --bel-bg-alt:   #e4ecc8;
    --bel-table:    #c8dc64;
    --bel-cream:    #fafff0;
    --bel-text:     #1a2a0a;
    --bel-muted:    #5a7040;
    --bel-border:   #c0d498;
    --bel-jana:     #d4a855;
    --bel-libre:    #5594aa;
    --bel-gaua:     #3d5a6a;
    --bel-red:      #b83030;
    --r:            10px;
}

/* ─── Wrap ─── */
.bel-camp-wrap {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    color: var(--bel-text);
    background: var(--bel-bg);
    border-radius: var(--r);
    overflow: hidden;
    max-width: 1100px;
    margin: 0 auto;
}

/* ─── Header ─── */
.bel-header {
    background: var(--bel-dark);
    background-image:
        radial-gradient(ellipse at 15% 60%, rgba(122,176,32,.25) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 20%, rgba(168,204,64,.15) 0%, transparent 50%);
    padding: 2.2rem 2rem 1.8rem;
}
.bel-header-inner { max-width: 1060px; margin: 0 auto; }
.bel-badge {
    display: inline-block;
    background: var(--bel-lime);
    color: var(--bel-dark);
    font-size: .72rem; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase;
    padding: .25rem .8rem;
    border-radius: 100px;
    margin-bottom: .7rem;
}
.bel-title {
    font-size: clamp(1.8rem, 4.5vw, 2.8rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.1;
    margin-bottom: .3rem;
}
.bel-subtitle {
    color: rgba(255,255,255,.65);
    font-size: .9rem; font-weight: 500;
}
.bel-chips {
    display: flex; flex-wrap: wrap; gap: .8rem;
    margin-top: 1.2rem;
}
.bel-chip {
    display: flex; align-items: center; gap: .35rem;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 7px;
    padding: .35rem .85rem;
    color: #fff;
    font-size: .82rem; font-weight: 600;
}

/* ─── Nav ─── */
.bel-nav-wrap {
    background: var(--bel-dark);
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 3px 16px rgba(0,0,0,.3);
}
.bel-nav {
    display: flex; overflow-x: auto;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    max-width: 1060px; margin: 0 auto;
}
.bel-nav::-webkit-scrollbar { display: none; }
.bel-tab {
    flex-shrink: 0;
    padding: .8rem 1.1rem;
    color: rgba(255,255,255,.6);
    font-weight: 700; font-size: .83rem;
    cursor: pointer; white-space: nowrap;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-family: inherit;
    transition: all .2s;
}
.bel-tab:hover { color: #fff; background: rgba(255,255,255,.06); }
.bel-tab.active {
    color: var(--bel-lime-lt);
    border-bottom-color: var(--bel-lime-lt);
    background: rgba(122,176,32,.1);
}

/* ─── Main ─── */
.bel-main {
    max-width: 1060px; margin: 0 auto;
    padding: 1.8rem 1.2rem 3rem;
}
.bel-panel { display: none; }
.bel-panel.active { display: block; }

.bel-section-title {
    font-size: 1.6rem; font-weight: 900;
    color: var(--bel-dark);
    margin-bottom: .25rem;
}
.bel-section-sub {
    color: var(--bel-muted); font-size: .88rem;
    margin-bottom: 1.4rem;
}
.bel-section-subtitle {
    font-size: 1.1rem; font-weight: 800;
    color: var(--bel-med);
}

/* ─── Week grid ─── */
.bel-week-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: .9rem;
}
.bel-day-card {
    background: #fff;
    border: 2px solid var(--bel-border);
    border-radius: var(--r);
    overflow: hidden;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.bel-day-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(26,61,14,.14);
    border-color: var(--bel-lime);
}
.bel-day-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: .8rem 1rem;
    background: var(--bel-bg);
}
.bel-day-label { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--bel-lime); }
.bel-day-num { font-size: 2rem; font-weight: 900; color: var(--bel-dark); line-height: 1; }
.bel-day-icon { font-size: 1.7rem; }
.bel-day-body { padding: .6rem 1rem .9rem; border-top: 2px dashed var(--bel-border); }
.bel-day-acts { list-style: none; }
.bel-day-acts li {
    font-size: .8rem; color: #555;
    padding: .18rem 0;
    display: flex; align-items: center; gap: .4rem;
}
.bel-day-acts li::before {
    content: ''; width: 6px; height: 6px;
    background: var(--bel-lime); border-radius: 50%; flex-shrink: 0;
}

/* ─── Day detail ─── */
.bel-day-detail-head {
    display: flex; align-items: flex-start;
    justify-content: space-between; flex-wrap: wrap;
    gap: .8rem; margin-bottom: 1.3rem;
}
.bel-day-detail-title {
    font-size: 1.8rem; font-weight: 900; color: var(--bel-dark);
}
.bel-day-detail-date { color: var(--bel-muted); font-weight: 700; font-size: .88rem; margin-top: .2rem; }

.bel-plan-toggle {
    display: flex; gap: .4rem;
    background: var(--bel-bg-alt);
    padding: .3rem; border-radius: 9px;
    flex-shrink: 0;
}
.bel-plan-btn {
    padding: .45rem 1.1rem;
    border: none; background: none; border-radius: 7px;
    font-family: inherit; font-weight: 800; font-size: .85rem;
    cursor: pointer; transition: all .2s;
}
.bel-plan-a.active { background: var(--bel-med); color: #fff; }
.bel-plan-b.active { background: var(--bel-gaua); color: #fff; }
.bel-plan-btn:not(.active) { color: #999; }

.bel-planb-banner {
    background: var(--bel-gaua); color: #fff;
    border-radius: 8px; padding: .7rem 1rem;
    font-size: .85rem; font-weight: 700;
    margin-bottom: 1rem;
    display: flex; align-items: center; gap: .5rem;
}

/* ─── Timeline ─── */
.bel-timeline { position: relative; }
.bel-timeline::before {
    content: '';
    position: absolute; left: 50px; top: 0; bottom: 0;
    width: 2px; background: var(--bel-border);
}
.bel-sched-row {
    display: flex; gap: .8rem;
    margin-bottom: .9rem; align-items: flex-start;
}
.bel-sched-time {
    width: 46px; flex-shrink: 0;
    font-size: .75rem; font-weight: 700; color: var(--bel-muted);
    padding-top: .85rem; text-align: right;
    font-family: 'Courier New', monospace;
}
.bel-sched-dot-col {
    display: flex; align-items: flex-start;
    padding-top: .82rem; position: relative; z-index: 1; flex-shrink: 0;
}
.bel-sched-dot {
    width: 14px; height: 14px; border-radius: 50%;
    background: #fff; border: 3px solid var(--bel-lime);
    flex-shrink: 0;
}
.bel-sched-dot.bel-type-jana   { border-color: var(--bel-jana); }
.bel-sched-dot.bel-type-libre  { border-color: var(--bel-libre); }
.bel-sched-dot.bel-type-gaua   { border-color: var(--bel-gaua); }

/* ─── Activity card ─── */
.bel-act-card {
    flex: 1;
    background: #fff;
    border: 2px solid var(--bel-border);
    border-radius: var(--r);
    overflow: hidden;
    transition: border-color .2s;
}
.bel-act-card:hover { border-color: var(--bel-lime); }
.bel-act-card.bel-type-jana  { border-color: #e8c890; }
.bel-act-card.bel-type-libre { border-color: #a0cce0; }
.bel-act-card.bel-type-gaua  { border-color: #90aab8; }

.bel-act-head {
    display: flex; align-items: center; gap: .6rem;
    padding: .75rem 1rem;
    cursor: pointer; user-select: none;
    background: var(--bel-cream);
}
.bel-act-icon { font-size: 1.35rem; flex-shrink: 0; }
.bel-act-meta { flex: 1; }
.bel-act-name { font-weight: 800; font-size: .93rem; color: var(--bel-text); }
.bel-act-chips { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .2rem; }
.bel-chip {
    display: inline-flex; align-items: center; gap: .2rem;
    font-size: .71rem; font-weight: 700;
    padding: .12rem .5rem; border-radius: 100px;
    background: var(--bel-bg);
    color: var(--bel-muted);
}
.bel-chip-dur { background: #fdf0e0; color: #a06020; }
.bel-chip-mon { background: #eaf5e0; color: var(--bel-med); }
.bel-act-arrow {
    font-size: .85rem; color: #bbb;
    transition: transform .3s; flex-shrink: 0;
}
.bel-act-arrow.open { transform: rotate(180deg); }

.bel-act-body {
    display: none; padding: .9rem 1rem;
    border-top: 2px dashed var(--bel-border);
}
.bel-act-body.open { display: block; }
.bel-act-sec { margin-bottom: .9rem; }
.bel-act-sec:last-child { margin-bottom: 0; }
.bel-act-sec-title {
    font-size: .68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .1em;
    color: #aaa; margin-bottom: .35rem;
}
.bel-act-sec p, .bel-act-sec ul { font-size: .88rem; color: #444; line-height: 1.6; }
.bel-act-sec ul { padding-left: 1.1rem; }

.bel-media-grid { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .3rem; }
.bel-media-btn {
    display: inline-flex; align-items: center; gap: .3rem;
    background: var(--bel-bg);
    border: 2px solid var(--bel-border);
    border-radius: 7px; padding: .4rem .85rem;
    font-size: .8rem; font-weight: 700;
    color: var(--bel-med);
    text-decoration: none;
    transition: all .2s;
}
.bel-media-btn:hover { background: var(--bel-table); border-color: var(--bel-lime); }
.bel-media-doc { background: #eaf5e0; border-color: var(--bel-lime); }
.bel-media-empty { color: #bbb; border-style: dashed; cursor: default; }
.bel-media-empty:hover { background: var(--bel-bg); border-color: var(--bel-border); }

/* ─── Arauak ─── */
.bel-arauak-card {
    background: #fff;
    border: 2px solid var(--bel-border);
    border-radius: var(--r);
    padding: 1.2rem;
    margin-bottom: 1.2rem;
}
.bel-arauak-title {
    font-size: 1rem; font-weight: 800; color: var(--bel-dark);
    margin-bottom: .8rem;
}
.bel-arau-list { padding-left: 1.2rem; }
.bel-arau-list li {
    font-size: .9rem; color: #444;
    padding: .3rem 0;
    border-bottom: 1px solid var(--bel-bg-alt);
    line-height: 1.5;
}
.bel-arau-list li:last-child { border-bottom: none; }

/* ─── Contacts ─── */
.bel-contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: .9rem;
}
.bel-contact-card {
    background: #fff;
    border: 2px solid var(--bel-border);
    border-radius: var(--r);
    padding: .9rem 1.1rem;
}
.bel-contact-card.bel-emergency { border-color: #e0a090; background: #fff8f5; }
.bel-contact-cat {
    font-size: .68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .1em;
    color: #bbb; margin-bottom: .6rem;
}
.bel-contact-item {
    display: flex; align-items: flex-start; gap: .6rem;
    padding: .45rem 0;
    border-bottom: 1px solid var(--bel-bg-alt);
}
.bel-contact-item:last-child { border-bottom: none; }
.bel-contact-icon { font-size: 1.05rem; flex-shrink: 0; padding-top: .15rem; }
.bel-contact-name { font-weight: 700; font-size: .86rem; }
.bel-contact-phone {
    font-family: 'Courier New', monospace;
    font-size: .84rem; color: var(--bel-red); font-weight: 700;
    margin-top: .1rem;
}
.bel-contact-note { font-size: .74rem; color: #999; margin-top: .1rem; }

/* ─── Tasks ─── */
.bel-tasks-filter {
    display: flex; gap: .4rem; flex-wrap: wrap;
    margin-bottom: 1.2rem;
}
.bel-filter {
    padding: .32rem .85rem;
    border: 2px solid var(--bel-border);
    background: #fff; border-radius: 100px;
    font-family: inherit; font-size: .79rem; font-weight: 700;
    cursor: pointer; color: var(--bel-muted);
    transition: all .2s;
}
.bel-filter.active { border-color: var(--bel-med); background: var(--bel-med); color: #fff; }

.bel-tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: .9rem;
}
.bel-task-card {
    background: #fff;
    border: 2px solid var(--bel-border);
    border-radius: var(--r);
    padding: .9rem 1rem;
    display: flex; gap: .8rem;
    transition: border-color .2s, opacity .2s;
}
.bel-task-card.done {
    opacity: .55;
    border-color: var(--bel-lime);
    background: #f8fdf0;
}

.bel-task-check-wrap { flex-shrink: 0; padding-top: .15rem; cursor: pointer; }
.bel-task-check { display: none; }
.bel-task-check-box {
    width: 22px; height: 22px;
    border: 2.5px solid var(--bel-border);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    transition: all .2s;
    background: #fff;
}
.bel-task-check:checked + .bel-task-check-box {
    background: var(--bel-med);
    border-color: var(--bel-med);
}
.bel-task-check:checked + .bel-task-check-box::after {
    content: '✓'; color: #fff; font-size: .85rem; font-weight: 900;
}

.bel-task-body { flex: 1; }
.bel-task-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.bel-task-icon {
    width: 36px; height: 36px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; flex-shrink: 0;
}
.bel-bg-goiza   { background: #fff3d8; }
.bel-bg-eguerdi { background: #eaf5e0; }
.bel-bg-arrats  { background: #e0f0f8; }
.bel-bg-gaua    { background: #e8eef8; }
.bel-bg-beti    { background: #fde8e8; }

.bel-task-name { font-weight: 800; font-size: .92rem; }
.bel-task-time { font-size: .73rem; color: var(--bel-muted); margin-top: .1rem; }
.bel-task-desc { font-size: .84rem; color: #555; line-height: 1.5; margin-bottom: .55rem; }
.bel-task-who {
    display: inline-block;
    background: var(--bel-bg-alt);
    color: var(--bel-med);
    font-size: .75rem; font-weight: 800;
    padding: .18rem .6rem; border-radius: 100px;
}

/* ─── Documents ─── */
.bel-doc-section { margin-bottom: 1.5rem; }
.bel-doc-category {
    font-size: .78rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: .08em;
    color: var(--bel-muted);
    margin-bottom: .7rem;
    padding-bottom: .4rem;
    border-bottom: 2px solid var(--bel-border);
}
.bel-doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: .7rem;
}
.bel-doc-card {
    background: #fff;
    border: 2px solid var(--bel-border);
    border-radius: var(--r);
    padding: .8rem 1rem;
    display: flex; align-items: center; gap: .8rem;
    transition: border-color .2s;
}
.bel-doc-card:hover { border-color: var(--bel-lime); }
.bel-doc-icon { font-size: 1.5rem; flex-shrink: 0; }
.bel-doc-info { flex: 1; }
.bel-doc-name { font-weight: 700; font-size: .88rem; }
.bel-doc-desc { font-size: .76rem; color: #999; margin-top: .1rem; }
.bel-doc-btn {
    flex-shrink: 0;
    background: var(--bel-med);
    color: #fff;
    border-radius: 7px;
    padding: .4rem .85rem;
    font-size: .78rem; font-weight: 700;
    text-decoration: none;
    transition: background .2s;
    white-space: nowrap;
}
.bel-doc-btn:hover { background: var(--bel-dark); }
.bel-doc-empty { background: #eee; color: #bbb; cursor: default; }
.bel-doc-empty:hover { background: #eee; }

/* ─── Responsive ─── */
@media (max-width: 600px) {
    .bel-main { padding: 1.2rem .8rem 2.5rem; }
    .bel-timeline::before { left: 40px; }
    .bel-sched-time { width: 36px; font-size: .68rem; }
    .bel-day-detail-head { flex-direction: column; }
}

/* ═══════════════════════════════════════════════════════════════
   BELARRETAN v2.0 – Atal berriak
   ═══════════════════════════════════════════════════════════════ */

/* ─── Day date & alt badge ─────────────────────────────────────── */
.bel-day-date   { font-size: .75rem; color: #888; margin-top: 2px; }
.bel-day-altbadge {
    font-size: .75rem; color: #92400e; background: #fef3c7;
    padding: 2px 8px; border-radius: 10px; margin-top: .4rem; display: inline-block;
}
.bel-tab-baldintza { border-color: #60a5fa !important; }
.bel-tab-baldintza.active { background: #dbeafe !important; color: #1d4ed8 !important; }

/* ─── Needs alternative badge on act card ──────────────────────── */
.bel-act-altbadge {
    display: inline-block; font-size: .75rem; margin-left: .3rem;
    cursor: help; vertical-align: middle;
}
.bel-act-card.bel-needs-alt { border-left: 3px solid #f59e0b; }

/* ─── Baldintza section ────────────────────────────────────────── */
.bel-baldintza-section { margin-bottom: 2rem; }
.bel-baldintza-label {
    font-size: 1rem; font-weight: 700; color: #1e3a5f;
    padding: .5rem .75rem; background: #dbeafe; border-radius: 6px;
    margin-bottom: 1rem; display: inline-block;
}

/* ─── Oharra (comment) section ─────────────────────────────────── */
.bel-oharra-sec { border-top: 1px dashed #e2e8f0; margin-top: .5rem; padding-top: .5rem; }
.bel-oharra-toggle {
    font-size: .78rem; color: #6b7280; margin-left: .5rem;
    background: none; border: none; cursor: pointer; text-decoration: underline;
}
.bel-oharra-display {
    background: #fefce8; border: 1px solid #fde68a;
    border-radius: 5px; padding: .5rem .75rem;
    font-size: .88rem; color: #713f12;
    display: flex; align-items: flex-start; gap: .5rem;
}
.bel-oharra-readonly { background: #f0fdf4; border-color: #86efac; color: #14532d; }
.bel-oharra-text { flex: 1; line-height: 1.5; white-space: pre-wrap; }
.bel-oharra-edit, .bel-oharra-delete {
    background: none; border: none; cursor: pointer; font-size: .8rem;
    padding: 0 2px; opacity: .7; flex-shrink: 0;
}
.bel-oharra-edit:hover, .bel-oharra-delete:hover { opacity: 1; }
.bel-oharra-form { margin-top: .5rem; }
.bel-oharra-textarea {
    width: 100%; border: 1px solid #d1d5db; border-radius: 4px;
    padding: .4rem .5rem; font-size: .88rem; resize: vertical;
    font-family: inherit; color: #374151;
}
.bel-oharra-btns { display: flex; align-items: center; gap: .5rem; margin-top: .4rem; flex-wrap: wrap; }
.bel-oharra-msg  { font-size: .8rem; color: #6b7280; }

/* ─── Task done state ──────────────────────────────────────────── */
.bel-task-done .bel-task-name { text-decoration: line-through; opacity: .55; }
.bel-task-done { opacity: .7; }
