/* ═══════════════════════════════════════════════════════════════
   BRIEF v2 — Card-based, Editable, with Annual Sidebar
   ═══════════════════════════════════════════════════════════════ */

:root {
    --b-bg: #060d1a;
    --b-bg2: #0c1527;
    --b-bg3: #111d33;
    --b-surface: #0f1a2e;
    --b-border: rgba(56, 189, 248, 0.08);
    --b-border-hover: rgba(56, 189, 248, 0.2);
    --b-text: #e2e8f0;
    --b-text2: #94a3b8;
    --b-text3: #64748b;
    --b-cyan: #38bdf8;
    --b-radius: 14px;
    --b-radius-sm: 8px;
    --b-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 240px;
}

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

html {
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--b-bg);
    color: var(--b-text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ═══════════════════════════════════════════════════════════════
   PASSWORD GATE
   ═══════════════════════════════════════════════════════════════ */

.gate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--b-bg);
    transition: opacity 0.5s, visibility 0.5s;
}

.gate.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.gate-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.gate-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    animation: gateFloat 12s ease-in-out infinite;
}

.gate-orb--1 {
    width: 400px;
    height: 400px;
    background: #1d4ed8;
    top: -10%;
    left: -5%;
}

.gate-orb--2 {
    width: 300px;
    height: 300px;
    background: #0ea5e9;
    bottom: -10%;
    right: -5%;
    animation-delay: -4s;
}

.gate-orb--3 {
    width: 250px;
    height: 250px;
    background: #06b6d4;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -8s;
}

@keyframes gateFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-30px) scale(1.1);
    }
}

.gate-card {
    position: relative;
    z-index: 2;
    background: rgba(15, 26, 46, 0.85);
    border: 1px solid var(--b-border);
    backdrop-filter: blur(40px);
    border-radius: 20px;
    padding: 48px 40px;
    width: 420px;
    max-width: 90vw;
    text-align: center;
}

.gate-logo svg {
    opacity: 0.7;
    margin-bottom: 20px;
}

.gate-title {
    font-family: 'Anton', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--b-text);
    margin-bottom: 8px;
}

.gate-subtitle {
    color: var(--b-text2);
    font-size: 0.85rem;
    margin-bottom: 28px;
}

.gate-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gate-input-wrapper {
    display: flex;
    border: 1px solid var(--b-border-hover);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(15, 26, 46, 0.5);
}

.gate-input {
    flex: 1;
    padding: 14px 18px;
    background: transparent;
    border: none;
    color: var(--b-text);
    font-size: 0.95rem;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.gate-input::placeholder {
    color: var(--b-text3);
}

.gate-submit {
    padding: 0 18px;
    background: transparent;
    border: none;
    color: var(--b-cyan);
    cursor: pointer;
    transition: var(--b-transition);
}

.gate-submit:hover {
    background: rgba(56, 189, 248, 0.1);
}

.gate-error {
    color: #f87171;
    font-size: 0.8rem;
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: opacity 0.3s, height 0.3s;
}

.gate-error.show {
    opacity: 1;
    height: auto;
}

.gate-back {
    display: inline-block;
    margin-top: 16px;
    color: var(--b-text3);
    text-decoration: none;
    font-size: 0.8rem;
    transition: var(--b-transition);
}

.gate-back:hover {
    color: var(--b-cyan);
}

.shake {
    animation: shakeAnim 0.4s ease;
}

@keyframes shakeAnim {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    75% {
        transform: translateX(8px);
    }
}

/* ═══════════════════════════════════════════════════════════════
   BRIEF APP — Layout with Sidebar
   ═══════════════════════════════════════════════════════════════ */

.brief-app {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    max-width: 100vw;
    overflow-x: hidden;
}

.brief-app.visible {
    display: flex;
    opacity: 1;
}

/* --- SIDEBAR --- */
.brief-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--b-bg2);
    border-right: 1px solid var(--b-border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--b-border);
}

.sidebar-brand svg {
    opacity: 0.7;
    flex-shrink: 0;
}

.sidebar-brand span {
    font-weight: 700;
    font-size: 0.95rem;
    background: linear-gradient(135deg, var(--b-cyan), #7dd3fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-year-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 12px 8px;
}

.sidebar-year-title {
    color: var(--b-text);
    font-size: 1.1rem;
    font-weight: 800;
}

.sidebar-year-nav {
    background: transparent;
    border: 1px solid var(--b-border);
    color: var(--b-text2);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--b-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-year-nav:hover {
    color: var(--b-cyan);
    border-color: var(--b-border-hover);
}

.sidebar-months {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-month {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: var(--b-radius-sm);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--b-text2);
    font-size: 0.92rem;
    text-align: left;
    transition: var(--b-transition);
    width: 100%;
    font-family: 'Inter', sans-serif;
}

.sidebar-month:hover {
    background: rgba(56, 189, 248, 0.05);
    color: var(--b-text);
}

.sidebar-month.active {
    background: rgba(56, 189, 248, 0.1);
    color: var(--b-cyan);
    font-weight: 600;
}

.sidebar-month.has-data .sidebar-month-name {
    color: var(--b-text);
}

.sidebar-month.active .sidebar-month-name {
    color: var(--b-cyan);
}

.sidebar-month-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.sidebar-month-count {
    font-size: 0.8rem;
    color: var(--b-text3);
}

.sidebar-month-bar {
    width: 48px;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.sidebar-month-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--b-cyan), #10b981);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.sidebar-month-empty {
    font-size: 0.75rem;
    color: var(--b-text3);
    font-style: italic;
}

/* --- MAIN CONTENT --- */
.brief-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    min-width: 0;
}

/* --- HEADER --- */
.brief-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 28px;
    background: rgba(6, 13, 26, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--b-border);
}

.brief-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brief-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brief-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: var(--b-text2);
    text-decoration: none;
    border: 1px solid var(--b-border);
    transition: var(--b-transition);
}

.brief-back-btn:hover {
    color: var(--b-cyan);
    border-color: var(--b-border-hover);
}

.brief-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brief-brand span {
    font-weight: 700;
    font-size: 1rem;
    background: linear-gradient(135deg, var(--b-cyan), #7dd3fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-toggle-sidebar {
    display: none;
    /* shown only on mobile */
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid var(--b-border);
    color: var(--b-text2);
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--b-transition);
}

.btn-toggle-sidebar:hover {
    color: var(--b-cyan);
    border-color: var(--b-border-hover);
}

/* Buttons */
.b-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: var(--b-transition);
    border: none;
    white-space: nowrap;
}

.b-btn-primary {
    background: linear-gradient(135deg, var(--b-cyan), #0ea5e9);
    color: #000;
}

.b-btn-primary:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

.b-btn-outline {
    background: transparent;
    border: 1px solid var(--b-border-hover);
    color: var(--b-text2);
}

.b-btn-outline:hover {
    color: var(--b-cyan);
    border-color: var(--b-cyan);
    background: rgba(56, 189, 248, 0.05);
}

.b-btn-ghost {
    background: transparent;
    border: 1px solid transparent;
    color: var(--b-text3);
}

.b-btn-ghost:hover {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.2);
}

.b-btn-danger {
    background: transparent;
    border: 1px solid rgba(248, 113, 113, 0.2);
    color: var(--b-text2);
}

.b-btn-danger:hover {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.4);
}

/* ═══════════════════════════════════════════════════════════════
   STATS BAR
   ═══════════════════════════════════════════════════════════════ */
.b-stats {
    display: flex;
    gap: 12px;
    padding: 20px 28px;
    flex-wrap: wrap;
}

.b-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--b-surface);
    border: 1px solid var(--b-border);
    border-radius: var(--b-radius);
    padding: 14px 18px;
    flex: 1;
    min-width: 120px;
    cursor: pointer;
    transition: var(--b-transition);
    user-select: none;
}

.b-stat-card:hover {
    border-color: var(--b-border-hover);
    background: rgba(56, 189, 248, 0.04);
    transform: translateY(-1px);
}

.b-stat-card.stat-active {
    border-color: var(--b-cyan);
    background: rgba(56, 189, 248, 0.1);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}

.b-stat-card.stat-active .b-stat-label {
    color: var(--b-cyan);
}

.b-stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.b-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    display: block;
}

.b-stat-label {
    font-size: 0.8rem;
    color: var(--b-text3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.b-progress-card {
    flex: 2;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.b-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.b-progress-header .b-stat-value {
    font-size: 1.1rem;
}

.b-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
}

.b-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--b-cyan), #10b981);
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════════════════════════
   CONTROLS — Month + Tabs
   ═══════════════════════════════════════════════════════════════ */
.b-controls {
    padding: 0 28px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.b-controls-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.b-controls-row-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
}

.b-month-title {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--b-text);
}

.b-format-filters-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -28px;
    padding: 0 28px;
}

.b-format-filters-scroll::-webkit-scrollbar {
    display: none;
}

.b-format-filters {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
}

.format-chip {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    background: rgba(56, 189, 248, 0.08);
    color: var(--b-text2);
    border: 1px solid var(--b-border);
    cursor: pointer;
    white-space: nowrap;
    transition: var(--b-transition);
    flex-shrink: 0;
}

.format-chip:hover {
    color: var(--b-cyan);
    border-color: var(--b-border-hover);
    background: rgba(56, 189, 248, 0.15);
}

.format-chip.active {
    color: #ffffff;
    background: rgba(56, 189, 248, 0.25);
    border-color: var(--b-cyan);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.2);
}

/* ═══ VIEW TOGGLE ═══ */
.b-view-toggle {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.view-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--b-border);
    color: var(--b-text3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--b-transition);
    padding: 0;
}

.view-toggle-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.view-toggle-btn:hover {
    color: var(--b-text);
    border-color: var(--b-border-hover);
}

.view-toggle-btn.active {
    color: var(--b-cyan);
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.3);
}

/* ═══ CLIENT BRANDING BAR ═══ */
.client-brand-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(56, 189, 248, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 14px;
    margin-bottom: 16px;
}

.client-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.08);
    padding: 2px;
}

.client-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--b-text1);
    letter-spacing: -0.015em;
    flex: 1;
}

.client-year {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--b-text2);
    white-space: nowrap;
}

.role-indicator {
    font-size: 0.82rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.role-admin {
    background: rgba(56, 189, 248, 0.12);
    color: var(--b-cyan);
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.role-guest {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

/* ═══ GATE HINT ═══ */
.gate-hint {
    color: var(--b-text3);
    font-size: 0.75rem;
    margin-top: 10px;
    text-align: center;
    opacity: 0.6;
}

/* ═══ SHARE BUTTON ═══ */
.b-btn-share {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(56, 189, 248, 0.1));
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.b-btn-share:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(56, 189, 248, 0.15));
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-1px);
}

/* ═══ SHARE MODAL ═══ */
.share-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.share-modal-overlay.open {
    display: flex;
}

.share-modal {
    background: var(--b-card);
    border: 1px solid var(--b-border);
    border-radius: 16px;
    padding: 28px;
    max-width: 560px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.share-modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--b-text1);
}

.share-close-btn {
    background: transparent;
    border: none;
    color: var(--b-text3);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: var(--b-transition);
}

.share-close-btn:hover {
    color: var(--b-text1);
    background: rgba(255, 255, 255, 0.05);
}

.share-info {
    color: var(--b-cyan);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 18px;
    padding: 8px 12px;
    background: rgba(56, 189, 248, 0.06);
    border-radius: 8px;
}

.share-field {
    margin-bottom: 16px;
}

.share-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--b-text3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.share-url-row {
    display: flex;
    gap: 8px;
}

.share-url-input {
    flex: 1;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--b-border);
    border-radius: 8px;
    color: var(--b-text2);
    font-size: 0.8rem;
    font-family: monospace;
    outline: none;
}

.share-url-input:focus {
    border-color: var(--b-cyan);
}

.share-json-btn {
    width: 100%;
}

.share-keys-info {
    margin-top: 20px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--b-border);
    border-radius: 10px;
    font-size: 0.8rem;
    color: var(--b-text3);
    line-height: 1.8;
}

.share-keys-info strong {
    color: var(--b-text1);
}

.share-keys-info code {
    background: rgba(56, 189, 248, 0.08);
    color: var(--b-cyan);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-family: 'SF Mono', monospace;
}

/* ═══ MEDIA UPLOAD SECTION ═══ */
.card-media-section {
    padding: 0 16px 10px;
}

.card-media-section label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--b-text3);
    margin-bottom: 8px;
}

.media-previews {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.media-thumb {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--b-border);
    transition: var(--b-transition);
}

.media-thumb:hover {
    border-color: var(--b-cyan);
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.15);
}

.media-thumb img,
.media-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 1.1rem;
}

.media-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    background: rgba(239, 68, 68, 0.85);
    color: #fff;
    font-size: 0.6rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.media-thumb:hover .media-remove {
    display: flex;
}

.media-upload-btn {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 2px dashed var(--b-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--b-transition);
    color: var(--b-text3);
    font-size: 1.3rem;
    background: transparent;
}

.media-upload-btn:hover {
    border-color: var(--b-cyan);
    color: var(--b-cyan);
    background: rgba(56, 189, 248, 0.05);
}

/* ═══ LIGHTBOX ═══ */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.lightbox-overlay.open {
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-media {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--b-transition);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-name {
    color: var(--b-text3);
    font-size: 0.78rem;
    margin-top: 10px;
    text-align: center;
}

/* ═══ GUEST MODE ═══ */
.guest-mode [contenteditable] {
    pointer-events: none;
}

.guest-mode .card-status-btn {
    pointer-events: none;
}

.guest-mode .card-pillar,
.guest-mode .card-format,
.guest-mode .card-responsible-btn {
    pointer-events: none;
    cursor: default;
}

.guest-mode .plat-tag {
    pointer-events: none;
}

.b-avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.b-week-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.b-week-tab {
    padding: 9px 18px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--b-border);
    color: var(--b-text2);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--b-transition);
    font-family: 'Inter', sans-serif;
}

.b-week-tab:hover {
    color: var(--b-text);
    border-color: var(--b-border-hover);
}

.b-week-tab.active {
    background: rgba(56, 189, 248, 0.1);
    border-color: var(--b-cyan);
    color: var(--b-cyan);
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════ */
.cards-container {
    padding: 0 28px 32px;
}

.week-section {
    margin-bottom: 28px;
}

.week-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--b-border);
}

.week-badge {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--b-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.week-range {
    font-size: 0.85rem;
    color: var(--b-text3);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

/* ═══ LIST VIEW ═══ */
.cards-grid.cards-list-view {
    grid-template-columns: 1fr;
    gap: 10px;
}

.cards-list-view .post-card {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 16px 20px;
    gap: 16px;
}

.cards-list-view .card-top-bar {
    width: 100%;
    border-bottom: 1px solid var(--b-border);
    padding-bottom: 10px;
}

.cards-list-view .card-title {
    flex: 1;
    min-width: 200px;
}

.cards-list-view .card-tags {
    flex-shrink: 0;
}

.cards-list-view .card-platforms {
    flex-shrink: 0;
}

.cards-list-view .card-field {
    flex: 1;
    min-width: 200px;
}

.cards-list-view .card-footer {
    width: 100%;
    border-top: 1px solid var(--b-border);
    padding-top: 10px;
}

.cards-list-view .card-media-section {
    width: 100%;
}

.post-card {
    background: var(--b-surface);
    border: 1px solid var(--b-border);
    border-radius: var(--b-radius);
    padding: 22px;
    transition: var(--b-transition);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.post-card:hover {
    border-color: var(--b-border-hover);
}

.card-top-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-number {
    font-size: 0.82rem;
    color: var(--b-text3);
    font-weight: 700;
    letter-spacing: 1px;
}

.card-date {
    font-size: 0.88rem;
    color: var(--b-text2);
    margin-right: auto;
}

.card-status-btn {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--b-transition);
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.card-status-btn:hover {
    filter: brightness(1.2);
    transform: scale(1.05);
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--b-text);
    line-height: 1.4;
    outline: none;
    border-radius: 6px;
    padding: 2px 4px;
    margin: -2px -4px;
    transition: background 0.2s;
}

.card-title:focus {
    background: rgba(56, 189, 248, 0.08);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15);
}

.card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.card-pillar,
.card-format {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.card-pillar-wrapper,
.card-format-wrapper {
    position: relative;
}

.card-pillar {
    cursor: pointer;
    transition: var(--b-transition);
}

.card-pillar:hover {
    filter: brightness(1.3);
}

.pillar-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 200;
    min-width: 180px;
    background: rgba(12, 21, 39, 0.95);
    border: 1px solid var(--b-border-hover);
    border-radius: var(--b-radius-sm);
    padding: 4px;
    backdrop-filter: blur(20px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    gap: 2px;
    max-height: 260px;
    overflow-y: auto;
}

.pillar-dropdown.open {
    display: flex;
    animation: dropdownFade 0.15s ease;
}

.pillar-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--b-text2);
    font-size: 0.75rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    text-align: left;
    transition: var(--b-transition);
    white-space: nowrap;
}

.pillar-option:hover {
    background: rgba(56, 189, 248, 0.1);
    color: var(--b-text);
}

.pillar-option.active {
    background: rgba(56, 189, 248, 0.15);
    color: var(--b-cyan);
    font-weight: 700;
}

.pillar-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.card-format {
    cursor: pointer;
    transition: var(--b-transition);
}

.card-format:hover {
    filter: brightness(1.3);
}

.format-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 200;
    min-width: 160px;
    background: rgba(12, 21, 39, 0.95);
    border: 1px solid var(--b-border-hover);
    border-radius: var(--b-radius-sm);
    padding: 4px;
    backdrop-filter: blur(20px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    gap: 2px;
}

.format-dropdown.open {
    display: flex;
    animation: dropdownFade 0.15s ease;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.format-option {
    padding: 7px 12px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--b-text2);
    font-size: 0.75rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    text-align: left;
    transition: var(--b-transition);
}

.format-option:hover {
    background: rgba(56, 189, 248, 0.1);
    color: var(--b-text);
}

.format-option.active {
    background: rgba(56, 189, 248, 0.15);
    color: var(--b-cyan);
    font-weight: 700;
}

.card-platforms {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.plat-tag {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--b-transition);
    border: 1px solid transparent;
}

.plat-tag.inactive {
    opacity: 0.25;
    filter: grayscale(1);
}

.plat-tag.inactive:hover {
    opacity: 0.5;
}

.plat-tiktok {
    background: rgba(255, 0, 80, 0.1);
    color: #ff4d6d;
    border-color: rgba(255, 0, 80, 0.2);
}

.plat-instagram {
    background: rgba(225, 48, 108, 0.1);
    color: #e1306c;
    border-color: rgba(225, 48, 108, 0.2);
}

.plat-facebook {
    background: rgba(24, 119, 242, 0.1);
    color: #1877f2;
    border-color: rgba(24, 119, 242, 0.2);
}

.plat-youtube {
    background: rgba(255, 0, 0, 0.1);
    color: #ff0000;
    border-color: rgba(255, 0, 0, 0.2);
}

.plat-twitterx {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.2);
}

.plat-linkedin {
    background: rgba(0, 119, 181, 0.1);
    color: #0077b5;
    border-color: rgba(0, 119, 181, 0.2);
}

.plat-pinterest {
    background: rgba(189, 8, 28, 0.1);
    color: #bd081c;
    border-color: rgba(189, 8, 28, 0.2);
}

.plat-threads {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.2);
}

.card-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-field label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--b-text3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-copy,
.card-objective,
.card-notes {
    font-size: 0.95rem;
    color: var(--b-text2);
    line-height: 1.6;
    outline: none;
    border-radius: 6px;
    padding: 6px 8px;
    margin: -6px -8px;
    transition: background 0.2s;
    min-height: 1.5em;
}

.card-copy:focus,
.card-objective:focus,
.card-notes:focus {
    background: rgba(56, 189, 248, 0.06);
    color: var(--b-text);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.1);
}

.placeholder-text {
    color: var(--b-text3);
    font-style: italic;
}

.card-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-links label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--b-text3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-links a {
    color: var(--b-cyan);
    font-size: 0.88rem;
    text-decoration: none;
    word-break: break-all;
    transition: var(--b-transition);
}

.card-links a:hover {
    text-decoration: underline;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--b-border);
    margin-top: auto;
}

.card-responsible-wrapper {
    position: relative;
}

.card-responsible-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 4px 8px;
    cursor: pointer;
    transition: var(--b-transition);
    font-family: 'Inter', sans-serif;
}

.card-responsible-btn:hover {
    border-color: var(--b-border-hover);
    background: rgba(56, 189, 248, 0.04);
}

.card-responsible-btn span {
    font-size: 0.75rem;
    color: var(--b-text2);
}

.resp-arrow {
    color: var(--b-text3) !important;
    font-size: 0.65rem !important;
}

.responsible-dropdown {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    z-index: 200;
    min-width: 200px;
    background: rgba(12, 21, 39, 0.95);
    border: 1px solid var(--b-border-hover);
    border-radius: var(--b-radius-sm);
    padding: 4px;
    backdrop-filter: blur(20px);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    gap: 2px;
}

.responsible-dropdown.open {
    display: flex;
    animation: dropdownFadeUp 0.15s ease;
}

@keyframes dropdownFadeUp {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.responsible-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--b-text2);
    font-size: 0.75rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    text-align: left;
    transition: var(--b-transition);
}

.responsible-option:hover {
    background: rgba(56, 189, 248, 0.1);
    color: var(--b-text);
}

.responsible-option.active {
    background: rgba(56, 189, 248, 0.15);
    color: var(--b-cyan);
    font-weight: 700;
}

.responsible-option span {
    font-size: 0.75rem;
}

.card-delete-btn {
    background: transparent;
    border: none;
    color: var(--b-text3);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 6px;
    transition: var(--b-transition);
    opacity: 0.4;
}

.post-card:hover .card-delete-btn {
    opacity: 1;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-save-btn {
    background: transparent;
    border: none;
    color: var(--b-text3);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 6px;
    transition: var(--b-transition);
    opacity: 0.4;
}

.post-card:hover .card-save-btn {
    opacity: 1;
}

.card-save-btn:hover {
    color: var(--b-cyan);
}

.card-save-btn.save-flash {
    opacity: 1;
    animation: savePulse 0.4s ease;
}

@keyframes savePulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

/* Editable inline fields */
.editable-inline {
    outline: none;
    border-bottom: 1px dashed transparent;
    transition: var(--b-transition);
}

.editable-inline:hover,
.editable-inline:focus {
    border-bottom-color: var(--b-cyan);
}

.card-date {
    cursor: text;
    outline: none;
    border-bottom: 1px dashed transparent;
    transition: var(--b-transition);
}

.card-date:hover,
.card-date:focus {
    border-bottom-color: var(--b-cyan);
}

/* Reference field */
.card-reference {
    color: var(--b-text2);
    font-size: 0.95rem;
    line-height: 1.6;
    outline: none;
    border-radius: 6px;
    padding: 4px;
    transition: var(--b-transition);
}

.card-reference:hover {
    background: rgba(255, 255, 255, 0.03);
}

.card-reference:focus {
    background: rgba(56, 189, 248, 0.05);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.2);
}

.card-delete-btn:hover {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--b-text3);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--b-text2);
}

.empty-state p {
    font-size: 0.85rem;
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE UTILITIES
   ═══════════════════════════════════════════════════════════════ */
.mobile-menu-btn {
    display: none;
}

.mobile-logout-btn {
    display: none;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    font-size: 0.78rem;
    font-weight: 700;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 8px;
}

.mobile-logout-btn svg {
    color: #ef4444;
}

.mobile-add-btn {
    display: none;
    font-size: 0.82rem;
    padding: 6px 14px;
    border-radius: 8px;
}

/* ═══ ICON TOGGLE BUTTONS ═══ */
.b-icon-toggles {
    display: flex;
    gap: 8px;
}

.b-icon-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--b-border);
    color: var(--b-text3);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--b-transition);
}

.b-icon-toggle:hover {
    color: var(--b-cyan);
    border-color: rgba(56, 189, 248, 0.3);
    background: rgba(56, 189, 248, 0.08);
}

.b-icon-toggle.active {
    color: var(--b-cyan);
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.12);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.1);
}

.b-icon-toggle svg {
    flex-shrink: 0;
}

/* Toggle Panels */
.b-toggle-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    padding: 0;
}

.b-toggle-panel.open {
    max-height: 200px;
    opacity: 1;
    padding: 10px 0 0;
}

#panelStats.open {
    max-height: 500px;
}

.b-toggle-panel .b-format-filters {
    flex-wrap: wrap;
    gap: 6px;
}

.b-toggle-panel .b-week-tabs {
    flex-wrap: wrap;
    gap: 6px;
}

/* Mobile Bottom Sheet */
.mobile-sheet-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-sheet-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-sheet {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--b-bg2);
    border-top: 1px solid var(--b-border);
    border-radius: 20px 20px 0 0;
    padding: 8px 16px 32px;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-sheet.active {
    display: block;
    transform: translateY(0);
}

.mobile-sheet-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 0 auto 12px;
}

.mobile-sheet-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--b-text3);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 4px 12px;
}

.mobile-sheet-actions {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mobile-sheet-action {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 12px;
    border: none;
    background: transparent;
    color: var(--b-text);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    border-radius: 12px;
    transition: background 0.15s;
}

.mobile-sheet-action:hover,
.mobile-sheet-action:active {
    background: rgba(255, 255, 255, 0.06);
}

.mobile-sheet-action svg {
    flex-shrink: 0;
    color: var(--b-text2);
}

.mobile-sheet-divider {
    height: 1px;
    background: var(--b-border);
    margin: 6px 0;
}

.mobile-sheet-logout {
    color: #ef4444;
}

.mobile-sheet-logout svg {
    color: #ef4444;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .brief-sidebar {
        transform: translateX(-100%);
        width: 280px;
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
    }

    .brief-sidebar.open {
        transform: translateX(0);
    }

    .brief-main {
        margin-left: 0;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .btn-toggle-sidebar {
        display: flex;
    }

    /* Hide desktop buttons, show mobile menu */
    .desktop-only {
        display: none !important;
    }

    .mobile-menu-btn {
        display: inline-flex !important;
    }

    .mobile-logout-btn {
        display: inline-flex !important;
    }

    .mobile-add-btn {
        display: inline-flex !important;
    }

    /* Icon toggles on mobile — hide text, show only icon */
    .b-icon-toggle span {
        display: none;
    }

    .b-icon-toggle {
        padding: 10px 12px;
        border-radius: 10px;
    }

    .b-toggle-panel.open {
        max-height: 300px;
    }

    .b-toggle-panel .b-format-filters {
        flex-wrap: wrap;
        gap: 8px;
    }

    .b-toggle-panel .b-format-filters-scroll {
        margin: 0;
        padding: 0;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .b-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 12px;
        box-sizing: border-box;
        width: 100%;
        overflow: hidden;
    }

    .b-stat-card {
        padding: 10px;
        gap: 8px;
        min-width: 0;
        flex: none;
        overflow: hidden;
    }

    .b-stat-info {
        min-width: 0;
        overflow: hidden;
    }

    .b-stat-icon {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    .b-stat-value {
        font-size: 1.2rem;
    }

    .b-stat-label {
        font-size: 0.65rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .b-progress-card {
        grid-column: 1 / -1;
    }

    .brief-header {
        padding: 10px 12px;
        gap: 6px;
    }

    .brief-header-left {
        gap: 8px;
    }

    .brief-header-right {
        gap: 4px;
    }

    .cards-container {
        padding: 0 12px 24px;
    }

    .b-controls {
        padding: 0 12px 12px;
    }

    .b-format-filters-scroll {
        margin: 0 -12px;
        padding: 0 12px;
    }

    .b-btn {
        padding: 8px 10px;
    }

    .brief-brand span {
        font-size: 0.85rem;
    }

    .b-controls-row-top {
        gap: 8px;
    }

    .b-month-title {
        font-size: 0.9rem;
    }

    .b-week-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
    }

    .b-week-tabs::-webkit-scrollbar {
        display: none;
    }

    .b-week-tab {
        flex-shrink: 0;
    }

    .client-brand-bar {
        padding: 10px 14px;
        gap: 10px;
    }

    .client-logo {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }

    .client-name {
        display: none;
    }

    .client-year {
        font-size: 0.9rem;
        flex: 1;
    }

    .role-indicator {
        font-size: 0.65rem;
        padding: 3px 8px;
    }

    /* Mobile list view — compact rows */
    .cards-list-view .post-card {
        flex-direction: row;
        align-items: center;
        padding: 10px 14px;
        gap: 10px;
    }

    .cards-list-view .card-top-bar {
        display: flex;
        align-items: center;
        gap: 8px;
        border-bottom: none;
        padding-bottom: 0;
        width: auto;
        flex: 1;
        min-width: 0;
    }

    .cards-list-view .card-title {
        font-size: 0.82rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
        flex: 1;
    }

    .cards-list-view .card-tags,
    .cards-list-view .card-platforms,
    .cards-list-view .card-field,
    .cards-list-view .card-footer,
    .cards-list-view .card-media-section {
        display: none;
    }

    .share-modal {
        padding: 20px;
        margin: 10px;
    }

    .share-url-row {
        flex-direction: column;
    }

    .media-thumb {
        width: 50px;
        height: 50px;
    }

    .media-upload-btn {
        width: 50px;
        height: 50px;
    }

    .lightbox-close {
        top: -32px;
        width: 32px;
        height: 32px;
    }

    .b-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        gap: 0;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .b-tabs::-webkit-scrollbar {
        display: none;
    }

    .b-tab {
        flex-shrink: 0;
        padding: 8px 14px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 16px;
    }

    .brief-header {
        padding: 8px 10px;
    }

    .brief-back-btn {
        width: 32px;
        height: 32px;
    }

    .btn-toggle-sidebar {
        width: 32px;
        height: 32px;
    }

    .b-stat {
        padding: 10px 12px;
    }

    .b-stat-value {
        font-size: 1.4rem;
    }

    .b-stat-label {
        font-size: 0.72rem;
    }

    .b-stat-icon {
        width: 34px;
        height: 34px;
    }

    .b-progress-label {
        font-size: 0.72rem;
    }

    .b-progress-percent {
        font-size: 1.2rem;
    }

    .post-card {
        padding: 16px;
    }

    .card-title {
        font-size: 1.15rem;
    }

    .card-tags {
        gap: 6px;
        flex-wrap: wrap;
    }

    .card-pillar,
    .card-format {
        padding: 5px 12px;
        font-size: 0.82rem;
    }

    .plat-tag {
        padding: 5px 12px;
        font-size: 0.78rem;
    }

    .card-copy,
    .card-objective,
    .card-notes {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .card-field label {
        font-size: 0.75rem;
    }

    .card-number {
        font-size: 0.78rem;
    }

    .card-date {
        font-size: 0.82rem;
    }

    .card-status-btn {
        font-size: 0.78rem;
        padding: 5px 12px;
    }

    .card-reference {
        font-size: 0.92rem;
    }

    /* Touch-friendly dropdowns */
    .pillar-dropdown,
    .format-dropdown {
        min-width: 220px;
        max-height: 260px;
    }

    .pillar-option,
    .format-option {
        padding: 11px 14px;
        font-size: 0.85rem;
    }

    .responsible-dropdown {
        min-width: 220px;
    }

    .responsible-option {
        padding: 10px 14px;
    }

    .card-responsible-btn {
        padding: 6px 10px;
    }

    .card-delete-btn {
        font-size: 1rem;
        padding: 6px 10px;
        opacity: 0.6;
    }

    .week-badge {
        font-size: 0.88rem;
    }

    .week-range {
        font-size: 0.8rem;
    }

    .week-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .b-week-tab {
        padding: 8px 14px;
        font-size: 0.82rem;
    }

    .format-chip {
        padding: 6px 12px;
        font-size: 0.78rem;
    }

    .b-month-title {
        font-size: 0.95rem;
    }

    .card-media-section label {
        font-size: 0.75rem;
    }

    /* Sidebar full width on small phones */
    .brief-sidebar {
        width: 85vw;
        max-width: 320px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   PRINT / PDF EXPORT
   ═══════════════════════════════════════════════════════════════ */
@media print {
    body {
        background: #fff !important;
        color: #1e293b !important;
    }

    .gate,
    .brief-sidebar,
    .brief-header,
    .btn-toggle-sidebar,
    .b-week-tabs,
    .card-delete-btn,
    .b-btn {
        display: none !important;
    }

    .brief-app {
        display: block !important;
        opacity: 1 !important;
    }

    .brief-main {
        margin-left: 0 !important;
    }

    .b-stats {
        display: flex !important;
        gap: 8px;
        padding: 0 0 16px;
    }

    .b-stat-card {
        background: #f1f5f9 !important;
        border: 1px solid #e2e8f0 !important;
    }

    .b-stat-value {
        color: #1e293b !important;
    }

    .b-stat-label {
        color: #64748b !important;
    }

    .b-progress-bar {
        background: #e2e8f0 !important;
    }

    .b-progress-fill {
        background: #10b981 !important;
    }

    .b-controls {
        padding: 0 0 12px;
    }

    .b-month-title {
        color: #1e293b !important;
        font-size: 1.1rem;
    }

    .b-format-filters {
        display: none;
    }

    .cards-container {
        padding: 0;
    }

    .cards-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .post-card {
        background: #fff !important;
        border: 1px solid #e2e8f0 !important;
        break-inside: avoid;
        page-break-inside: avoid;
        padding: 12px;
    }

    .card-title {
        color: #1e293b !important;
        font-size: 0.85rem;
    }

    .card-copy,
    .card-objective,
    .card-notes {
        color: #475569 !important;
        font-size: 0.75rem;
    }

    .card-field label {
        color: #94a3b8 !important;
    }

    .week-badge {
        color: #0369a1 !important;
    }

    .week-header {
        border-color: #e2e8f0 !important;
    }

    .card-status-btn {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .card-pillar,
    .card-format,
    .plat-tag {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .b-stat-icon {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

.print-mode .brief-sidebar,
.print-mode .brief-header {
    display: none;
}

.print-mode .brief-main {
    margin-left: 0;
}

/* ═══════════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════════ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}