/* ============================================
   TTT Whiteboard App — Premium Design
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@700&display=swap');

:root {
    --bg-outer: #0f1923;
    --bg-outer-grad: linear-gradient(145deg, #0f1923 0%, #1a2a3d 50%, #162232 100%);
    --bg-panel: #ffffff;
    --bg-controls: rgba(15, 25, 40, 0.92);
    --accent: #4a9eff;
    --accent-hover: #3a8bee;
    --accent-glow: rgba(74, 158, 255, 0.25);
    --danger: #ff6b6b;
    --danger-hover: #ee5a5a;
    --success: #51cf66;
    --success-hover: #40c057;
    --warning: #ffd43b;
    --text-dark: #1a1a2e;
    --text-body: #3d3d56;
    --text-light: #f0f4f8;
    --text-muted: #8892a4;
    --border-subtle: rgba(0,0,0,0.06);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 8px;
    --radius-lg: 14px;
    --radius-xl: 20px;
}

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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-outer);
    background-image: var(--bg-outer-grad);
    color: var(--text-dark);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Auto-hiding Control Panel
   ============================================ */

#control-panel-zone {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    height: 36px;
}

#control-panel-zone:hover,
#control-panel-zone.pinned {
    height: auto;
}

#control-panel {
    background: var(--bg-controls);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

#control-panel-zone:hover #control-panel,
#control-panel-zone.pinned #control-panel {
    transform: translateY(0);
    opacity: 1;
}

#control-panel label {
    color: rgba(240, 244, 248, 0.7);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
}

#control-panel select {
    padding: 7px 12px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    background: rgba(255,255,255,0.08);
    color: var(--text-light);
    transition: all var(--transition);
    cursor: pointer;
    appearance: auto;
}

#control-panel select:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
}

#control-panel select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

#control-panel select option {
    background: #1a2a3d;
    color: var(--text-light);
}

#board-selector {
    min-width: 190px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.control-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    margin: 0 4px;
}

.control-spacer {
    flex: 1;
}

.share-tools {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

#session-token-label {
    color: rgba(240, 244, 248, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255,255,255,0.06);
    border-radius: var(--radius);
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    white-space: nowrap;
}

body.mode-participant .facilitator-only,
body.mode-display .facilitator-only,
body.mode-facilitator .participant-tools,
body.mode-display .participant-tools {
    display: none !important;
}

body.mode-display #control-panel-zone,
body.mode-display #toolbar-hint,
body.mode-display .category-add-btn {
    display: none !important;
}

body.mode-display #board-container {
    padding: 20px 24px;
}

body.mode-participant .entry-actions,
body.mode-participant .entry-drag-handle,
body.mode-display .entry-actions,
body.mode-display .entry-drag-handle {
    display: none !important;
}

/* Hover indicator bar */
#toolbar-hint {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 0 0 4px 4px;
    z-index: 199;
    transition: all 0.3s ease;
    pointer-events: none;
}

#control-panel-zone:hover ~ #toolbar-hint,
#control-panel-zone.pinned ~ #toolbar-hint {
    opacity: 0;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    padding: 7px 14px;
    border: none;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.2px;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 8px rgba(74, 158, 255, 0.3);
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 14px rgba(74, 158, 255, 0.4);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: var(--success-hover);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: var(--danger-hover);
}

.btn-toolbar {
    background: rgba(255,255,255,0.06);
    color: rgba(240, 244, 248, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11px;
    padding: 6px 12px;
}

.btn-toolbar:hover {
    background: rgba(255,255,255,0.12);
    color: var(--text-light);
    border-color: rgba(255, 255, 255, 0.18);
}

.switch-label {
    color: rgba(240,244,248,.78) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.session-status {
    position: absolute;
    z-index: 2;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(15,25,40,.88);
    color: #eef4fa;
    font-size: 11px;
    box-shadow: var(--shadow-md);
}

.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #ffd43b; }
.session-status[data-status="live"] .status-dot { background: #51cf66; box-shadow: 0 0 0 3px rgba(81,207,102,.18); }
.session-status[data-status="offline"] .status-dot { background: #ff6b6b; }
#participant-count { border-left: 1px solid rgba(255,255,255,.2); padding-left: 7px; }

.session-notice {
    position: fixed;
    z-index: 180;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 10px;
    background: #fff8db;
    color: #654f00;
    padding: 9px 14px;
    box-shadow: var(--shadow-lg);
    font-size: 13px;
}

.side-panel {
    position: fixed;
    inset: 0;
    z-index: 400;
    background: rgba(5,10,18,.46);
}

.side-panel-card {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(440px, 94vw);
    padding: 22px;
    overflow-y: auto;
    background: #f7f9fc;
    box-shadow: -12px 0 40px rgba(0,0,0,.25);
}

.side-panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.queue-item, .history-item { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid #dde3ec; }
.queue-item > div:first-child { display: flex; flex-direction: column; gap: 4px; }
.queue-item > div:last-child { display: flex; gap: 5px; align-items: center; }
.queue-item small, .history-item small { color: #6f7b8a; display: block; }
.history-item { flex-direction: column; gap: 3px; }

.dashboard-page { overflow: auto; min-height: 100%; color: var(--text-light); }
.dashboard-shell { width: min(1080px, calc(100% - 32px)); margin: 0 auto; padding: 48px 0; }
.dashboard-shell > header { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 30px; }
.dashboard-shell h1 { font-family: 'Playfair Display', Georgia, serif; font-size: clamp(34px, 5vw, 54px); }
.dashboard-shell header p:not(.eyebrow) { color: var(--text-muted); }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: 2px; font-size: 11px; font-weight: 700; }
.session-list { display: grid; gap: 12px; }
.session-card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); padding: 18px; border-radius: 14px; display: grid; grid-template-columns: 1fr 1.5fr auto; gap: 18px; align-items: center; }
.session-card h2 { font-size: 18px; }
.session-card p, .session-metrics { color: #aeb8c5; font-size: 12px; }
.session-metrics, .session-links { display: flex; gap: 7px; flex-wrap: wrap; }
.session-metrics span { background: rgba(255,255,255,.06); padding: 5px 8px; border-radius: 6px; }
.empty-state { color: #788596; padding: 24px 0; }

@media (max-width: 760px) {
    .session-card { grid-template-columns: 1fr; }
    .dashboard-shell > header { align-items: flex-start; flex-direction: column; }
}

.btn-small {
    padding: 3px 8px;
    font-size: 11px;
}

.btn-icon {
    padding: 3px 5px;
    background: transparent;
    border: none;
    color: rgba(0,0,0,0.25);
    cursor: pointer;
    border-radius: 6px;
    font-size: 12px;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-icon:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-body);
}

.btn-icon.danger:hover {
    background: rgba(255, 107, 107, 0.1);
    color: var(--danger);
}

/* ============================================
   App Layout
   ============================================ */

#app {
    height: 100vh;
    width: 100vw;
}

/* ============================================
   Board Container
   ============================================ */

#board-container {
    height: 100vh;
    padding: 12px 20px 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#board-title {
    text-align: center;
    font-family: 'Playfair Display', 'Georgia', serif;
    color: var(--text-light);
    font-size: 30px;
    font-weight: 700;
    padding: 14px 0 14px;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
    opacity: 0.95;
}

#board-heading {
    position: relative;
    flex-shrink: 0;
}

#board-grid {
    flex: 1;
    display: grid;
    gap: 14px;
    min-height: 0;
}

/* ============================================
   Board Columns (per-column height splitting)
   ============================================ */

.board-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
}

.board-column .category-panel {
    flex: 1;
    min-height: 0;
}

/* ============================================
   Category Panels
   ============================================ */

.category-panel {
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all var(--transition);
    min-height: 0;
}

.category-panel:hover {
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255,255,255,0.08);
}

.category-panel.drag-over {
    box-shadow: 0 0 0 2px var(--accent), var(--shadow-xl);
}

.category-header {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    user-select: none;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

/* Gradient headers per color */
.category-panel[data-color="yellow"] .category-header {
    background: linear-gradient(135deg, #f6b93b, #e58e26);
}
.category-panel[data-color="blue"] .category-header {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
}
.category-panel[data-color="green"] .category-header {
    background: linear-gradient(135deg, #55efc4, #00b894);
}
.category-panel[data-color="pink"] .category-header {
    background: linear-gradient(135deg, #fd79a8, #e84393);
}
.category-panel[data-color="orange"] .category-header {
    background: linear-gradient(135deg, #fdcb6e, #e17055);
}
.category-panel[data-color="lavender"] .category-header {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
}
.category-panel[data-color="mint"] .category-header {
    background: linear-gradient(135deg, #81ecec, #00cec9);
}
.category-panel[data-color="peach"] .category-header {
    background: linear-gradient(135deg, #fab1a0, #e17055);
}

.category-header-title {
    flex: 1;
    text-align: center;
}

.category-add-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.15);
    color: white;
    font-size: 16px;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    line-height: 1;
    padding: 0;
    padding-bottom: 1px;
    backdrop-filter: blur(4px);
}

.category-add-btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.8);
    transform: translateY(-50%) scale(1.12);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.category-entries {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #fafbfc;
}

.category-entries::-webkit-scrollbar {
    width: 4px;
}

.category-entries::-webkit-scrollbar-track {
    background: transparent;
}

.category-entries::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.12);
    border-radius: 4px;
}

.category-entries::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.2);
}


/* ============================================
   Post-it Note Entries
   ============================================ */

.entry-item {
    border: none;
    border-radius: 6px;
    padding: 8px 10px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    transition: all var(--transition);
    cursor: default;
    position: relative;
    min-height: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08),
                0 2px 6px rgba(0,0,0,0.04);
    transform: rotate(-0.2deg);
}

.entry-item:nth-child(even) {
    transform: rotate(0.15deg);
}

.entry-item:nth-child(3n) {
    transform: rotate(-0.1deg);
}

.entry-item:nth-child(4n+1) {
    transform: rotate(0.25deg);
}

.entry-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.12),
                0 4px 16px rgba(0,0,0,0.06);
    transform: rotate(0deg) translateY(-1px);
    z-index: 1;
}

.entry-item.dragging {
    opacity: 0.35;
    box-shadow: none;
    transform: rotate(2deg) scale(0.98);
}

/* Post-it colors per category */
.category-panel[data-color="yellow"] .entry-item {
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
}
.category-panel[data-color="blue"] .entry-item {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}
.category-panel[data-color="green"] .entry-item {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}
.category-panel[data-color="pink"] .entry-item {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
}
.category-panel[data-color="orange"] .entry-item {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
}
.category-panel[data-color="lavender"] .entry-item {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
}
.category-panel[data-color="mint"] .entry-item {
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
}
.category-panel[data-color="peach"] .entry-item {
    background: linear-gradient(135deg, #fbe9e7 0%, #ffccbc 100%);
}

.entry-drag-handle {
    flex-shrink: 0;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 10px;
    height: 10px;
    border-radius: 50px;
    margin-top: 3px;
    transition: all 0.2s ease;
}

.entry-drag-handle .handle-pill {
    width: 10px;
    height: 10px;
    border-radius: 50px;
    transition: all 0.2s ease;
}

.entry-drag-handle .handle-grip {
    display: none;
    font-size: 12px;
    color: rgba(0,0,0,0.35);
    line-height: 1;
    cursor: grab;
}

.entry-item:hover .entry-drag-handle {
    width: 16px;
    height: 18px;
    border-radius: 4px;
    margin-top: 0;
}

.entry-item:hover .entry-drag-handle .handle-pill {
    display: none;
}

.entry-item:hover .entry-drag-handle .handle-grip {
    display: flex;
}

.entry-drag-handle:active .handle-grip {
    cursor: grabbing;
    color: rgba(0,0,0,0.5);
}

/* Pill colors per category */
.category-panel[data-color="yellow"] .handle-pill { background: #f0c929; }
.category-panel[data-color="blue"] .handle-pill { background: #64b5f6; }
.category-panel[data-color="green"] .handle-pill { background: #66bb6a; }
.category-panel[data-color="pink"] .handle-pill { background: #f06292; }
.category-panel[data-color="orange"] .handle-pill { background: #ffa726; }
.category-panel[data-color="lavender"] .handle-pill { background: #ab93e6; }
.category-panel[data-color="mint"] .handle-pill { background: #4dd0c9; }
.category-panel[data-color="peach"] .handle-pill { background: #f4845f; }

.entry-text {
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-width: 0;
    line-height: 1.35;
    white-space: pre-wrap;
    color: var(--text-body);
    font-weight: 450;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.entry-actions {
    display: flex;
    align-items: center;
    gap: 1px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity var(--transition);
}

.entry-item:hover .entry-actions {
    opacity: 1;
}

.entry-move-actions {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.entry-move-actions .btn-icon {
    padding: 1px 3px;
    font-size: 9px;
}

/* Inline add input */
.inline-add-container {
    padding: 4px 2px;
}

.inline-add-input {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid var(--accent);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    font-weight: 450;
    resize: none;
    overflow: hidden;
    min-height: 36px;
    line-height: 1.35;
    background: #fff;
    color: var(--text-dark);
    box-shadow: 0 0 0 3px var(--accent-glow), var(--shadow-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.inline-add-input:focus {
    outline: none;
    border-color: var(--accent-hover);
    box-shadow: 0 0 0 4px var(--accent-glow), var(--shadow-md);
}

.inline-add-input::placeholder {
    color: #b0b8c4;
    font-weight: 400;
}

.inline-add-hint {
    font-size: 9px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 4px;
    text-align: right;
    padding-right: 2px;
    letter-spacing: 0.2px;
    opacity: 0.7;
}

/* Entry editing */
.entry-edit-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.entry-edit-textarea {
    width: 100%;
    padding: 6px 8px;
    border: 2px solid var(--accent);
    border-radius: 6px;
    font-size: inherit;
    font-family: 'Inter', sans-serif;
    font-weight: 450;
    resize: none;
    overflow: hidden;
    min-height: 36px;
    line-height: 1.35;
    background: #fff;
    color: var(--text-dark);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.entry-edit-textarea:focus {
    outline: none;
    border-color: var(--accent-hover);
}

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

.entry-edit-actions select {
    font-size: 10px;
    font-family: 'Inter', sans-serif;
    padding: 3px 6px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.1);
    background: white;
    color: var(--text-body);
}

/* Entry just-moved animation */
@keyframes entryLand {
    0% {
        transform: scale(1.06);
        box-shadow: 0 0 0 3px var(--accent), 0 4px 20px rgba(74,158,255,0.3);
    }
    50% {
        box-shadow: 0 0 0 3px var(--accent), 0 4px 20px rgba(74,158,255,0.15);
    }
    100% {
        transform: rotate(-0.2deg);
        box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
    }
}

.entry-item.just-moved {
    animation: entryLand 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    z-index: 2;
}

/* Drop indicator */
.drop-indicator {
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #a29bfe);
    border-radius: 3px;
    margin: 2px 0;
    box-shadow: 0 0 8px var(--accent-glow);
}

/* ============================================
   Presentation Mode
   ============================================ */

body.presentation-mode #control-panel-zone {
    display: none;
}

body.presentation-mode #toolbar-hint {
    display: none;
}

body.presentation-mode #board-container {
    padding: 20px 24px;
}

body.presentation-mode #board-title {
    font-size: 36px;
    padding: 10px 0 18px;
}

body.presentation-mode .category-header {
    font-size: 15px;
    padding: 12px 16px;
}

body.presentation-mode .category-add-btn {
    display: none !important;
}

body.presentation-mode .entry-actions {
    display: none !important;
}

body.presentation-mode .entry-drag-handle {
    display: none !important;
}

body.presentation-mode .entry-item {
    padding: 9px 14px;
    cursor: default;
}

body.presentation-mode .entry-item:hover {
    transform: inherit;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
    z-index: auto;
}

body.presentation-mode .inline-add-container {
    display: none !important;
}

/* ============================================
   Fullscreen
   ============================================ */

body.fullscreen-mode #board-container {
    padding: 20px 24px;
}

/* ============================================
   Modal / Confirm Dialog
   ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal-box {
    background: white;
    border-radius: var(--radius-xl);
    padding: 28px;
    max-width: 380px;
    width: 90%;
    box-shadow: var(--shadow-xl);
}

.modal-box h3 {
    margin-bottom: 10px;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
}

.modal-box p {
    margin-bottom: 22px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.modal-actions .btn {
    padding: 8px 18px;
    border-radius: var(--radius);
    font-size: 13px;
}

/* ============================================
   Toast Notification
   ============================================ */

#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: rgba(15, 25, 40, 0.95);
    backdrop-filter: blur(12px);
    color: var(--text-light);
    padding: 12px 20px;
    border-radius: var(--radius-lg);
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 340px;
    border: 1px solid rgba(255,255,255,0.06);
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--accent); }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px) translateY(10px); }
    to { opacity: 1; transform: translateX(0) translateY(0); }
}

/* ============================================
   Hidden elements
   ============================================ */

#backup-file-input {
    display: none;
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    body {
        background: white !important;
        overflow: visible !important;
    }

    #control-panel-zone,
    #toolbar-hint,
    #toast-container {
        display: none !important;
    }

    #board-container {
        padding: 10px !important;
        overflow: visible !important;
    }

    #board-title {
        color: #1a1a2e !important;
        text-shadow: none !important;
        font-size: 22px !important;
    }

    #board-grid {
        overflow: visible !important;
    }

    .category-panel {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1.5px solid #ccc !important;
    }

    .category-header {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .category-add-btn {
        display: none !important;
    }

    .entry-actions,
    .entry-drag-handle {
        display: none !important;
    }

    .entry-item {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        box-shadow: none !important;
        transform: none !important;
    }

    .category-entries {
        overflow: visible !important;
        background: white !important;
    }

    .inline-add-container {
        display: none !important;
    }
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1100px) {
    #control-panel {
        padding: 8px 14px;
        gap: 6px;
    }

    #board-title {
        font-size: 24px;
    }

    .category-header {
        font-size: 12px;
        padding: 8px 10px;
    }

    #board-container {
        padding: 8px 12px 12px;
    }

    #board-grid {
        gap: 10px;
    }

    .board-column {
        gap: 10px;
    }
}
