/* app.css - Notion Premium Design System */

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

/* Color Variables */
:root {
    --canvas: #ffffff;
    --canvas-soft: #f6f5f4;
    --surface: #ffffff;
    --primary: #0075de;
    --primary-active: #005bab;
    --secondary: #213183;
    --on-primary: #ffffff;
    --ink: #1a1a1a;
    --ink-secondary: #31302e;
    --ink-muted: #615d59;
    --ink-faint: #a39e98;
    --hairline: #e6e6e6;
    
    /* Sticker Accent Palette */
    --accent-sky: #e3f2fd;
    --accent-sky-text: #0d47a1;
    --accent-purple: #f3e5f5;
    --accent-purple-text: #4a148c;
    --accent-pink: #fce4ec;
    --accent-pink-text: #880e4f;
    --accent-orange: #fff3e0;
    --accent-orange-text: #e65100;
    --accent-teal: #e0f2f1;
    --accent-teal-text: #004d40;
    --accent-green: #e8f5e9;
    --accent-green-text: #1b5e20;
    --accent-brown: #efebe9;
    --accent-brown-text: #4e342e;

    /* Shadow Scale */
    --shadow-0: none;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.02), 0 2px 4px rgba(0, 0, 0, 0.02), 0 4px 8px rgba(0, 0, 0, 0.02);
    --shadow-2: 0 4px 6px rgba(0, 0, 0, 0.03), 0 10px 20px rgba(0, 0, 0, 0.04), 0 20px 35px rgba(0, 0, 0, 0.06);

    /* Fonts */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;
}

/* Dark Mode Variables */
body.dark-mode {
    --canvas: #191919;
    --canvas-soft: #202020;
    --surface: #252525;
    --primary: #2eaadc;
    --primary-active: #1e8bb7;
    --secondary: #121e4a;
    --on-primary: #191919;
    --ink: #f7f7f7;
    --ink-secondary: #e3e3e2;
    --ink-muted: #9e9c99;
    --ink-faint: #6e6b67;
    --hairline: #333333;

    /* Sticker Accent Palette (Dark) */
    --accent-sky: #0d47a1;
    --accent-sky-text: #e3f2fd;
    --accent-purple: #4a148c;
    --accent-purple-text: #f3e5f5;
    --accent-pink: #880e4f;
    --accent-pink-text: #fce4ec;
    --accent-orange: #793400;
    --accent-orange-text: #ffe0b2;
    --accent-teal: #004d40;
    --accent-teal-text: #e0f2f1;
    --accent-green: #1b5e20;
    --accent-green-text: #e8f5e9;
    --accent-brown: #3e2723;
    --accent-brown-text: #efebe9;

    --shadow-1: 0 1px 3px rgba(0, 0, 0, 0.2), 0 4px 6px rgba(0, 0, 0, 0.2);
    --shadow-2: 0 4px 10px rgba(0, 0, 0, 0.3), 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Reset & Base Setup */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--canvas);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.5;
    overflow: hidden;
    transition: background-color 0.2s, color 0.2s;
}

/* Layout Framework */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* Sidebar Styling */
.sidebar {
    width: 240px;
    min-width: 240px;
    background-color: var(--canvas-soft);
    border-right: 1px solid var(--hairline);
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 10;
    transition: margin-left 0.25s ease, width 0.25s ease;
    overflow: hidden;
}

.sidebar.collapsed {
    margin-left: -240px;
}

.sidebar-header {
    padding: 16px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.workspace-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--ink);
}

.workspace-icon {
    width: 20px;
    height: 20px;
    background-color: var(--primary);
    color: var(--on-primary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.sidebar-toggle-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--ink-muted);
    padding: 4px;
    border-radius: 4px;
}

.sidebar-toggle-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

body.dark-mode .sidebar-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 8px 10px;
}

.menu-section-title {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--ink-faint);
    padding: 8px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--ink-secondary);
    font-size: 14px;
    text-decoration: none;
    user-select: none;
    transition: background-color 0.15s;
    margin-bottom: 2px;
}

.menu-item:hover, .menu-item.active {
    background-color: rgba(0, 0, 0, 0.04);
    color: var(--ink);
}

body.dark-mode .menu-item:hover, body.dark-mode .menu-item.active {
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--ink);
}

.menu-item.active {
    font-weight: 500;
}

.menu-item-icon {
    font-size: 16px;
    color: var(--ink-muted);
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--hairline);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ink-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.user-profile:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.user-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: var(--accent-orange-text);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
}

/* Floating Sidebar Toggle Button when Sidebar is collapsed */
.floating-sidebar-toggle {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 9;
    background: var(--surface);
    border: 1px solid var(--hairline);
    box-shadow: var(--shadow-1);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--ink-muted);
}

.floating-sidebar-toggle:hover {
    background-color: var(--canvas-soft);
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
    background-color: var(--canvas);
}

.main-header {
    padding: 12px 24px;
    border-bottom: 1px solid var(--hairline);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    min-height: 52px;
}

.main-title-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 16px; /* Space for collapsed toggle */
}

.main-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
}

.main-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Notion-style buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--hairline);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-secondary);
    cursor: pointer;
    transition: background-color 0.15s;
    user-select: none;
}

.btn:hover {
    background-color: rgba(0, 0, 0, 0.03);
    color: var(--ink);
}

body.dark-mode .btn:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--on-primary);
}

.btn-primary:hover {
    background-color: var(--primary-active);
    color: var(--on-primary);
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
}

.btn-icon {
    padding: 6px;
    border-radius: 6px;
    border: none;
}

.btn-icon:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

body.dark-mode .btn-icon:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Database Screen Layout */
.db-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 24px 40px;
}

/* Database Title & Banner */
.db-header-row {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.db-title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.db-emoji {
    font-size: 28px;
}

.db-title-input {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--ink);
    border: none;
    background: transparent;
    outline: none;
    letter-spacing: -0.5px;
    padding: 2px 4px;
    border-radius: 4px;
}

.db-title-input:focus {
    background-color: var(--canvas-soft);
}

.db-lock-indicator {
    font-size: 13px;
    color: var(--ink-faint);
    background-color: var(--canvas-soft);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Database Views Bar */
.db-views-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--hairline);
    margin-bottom: 16px;
}

.views-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
}

.view-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 8px;
    font-size: 14px;
    color: var(--ink-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    user-select: none;
}

.view-tab:hover {
    color: var(--ink);
    background-color: rgba(0, 0, 0, 0.02);
}

body.dark-mode .view-tab:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.view-tab.active {
    color: var(--ink);
    border-bottom-color: var(--ink);
    font-weight: 500;
}

.add-view-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 8px 8px;
    font-size: 14px;
    color: var(--ink-faint);
    cursor: pointer;
}

.add-view-tab:hover {
    color: var(--ink-muted);
}

/* View Toolbar (Filters, Sorts, Search) */
.view-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 12px;
}

.toolbar-left, .toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Table View Styling */
.table-container {
    flex: 1;
    overflow: auto;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    background-color: var(--surface);
}

.notion-table {
    border-collapse: collapse;
    width: 100%;
    text-align: left;
    font-size: 14px;
    table-layout: fixed;
}

.notion-table th, .notion-table td {
    border-right: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    padding: 8px 10px;
    height: 38px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
}

.notion-table th:last-child, .notion-table td:last-child {
    border-right: none;
}

.notion-table tr:last-child td {
    border-bottom: none;
}

.notion-table th {
    background-color: var(--canvas-soft);
    color: var(--ink-muted);
    font-weight: 500;
    font-size: 12px;
    text-transform: capitalize;
    user-select: none;
    position: sticky;
    top: 0;
    z-index: 2;
}

.notion-table th .th-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.notion-table th .prop-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.notion-table th:hover .column-menu-btn {
    opacity: 1;
}

.column-menu-btn {
    opacity: 0;
    cursor: pointer;
    font-size: 12px;
    color: var(--ink-faint);
    transition: opacity 0.15s;
    background: transparent;
    border: none;
}

.column-menu-btn:hover {
    color: var(--ink-muted);
}

/* Table Cell Interactive Editing */
.cell-edit-input {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    padding: 0;
}

.cell-checkbox {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

/* Cell Select & Multi-select pills */
.select-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    background-color: var(--accent-sky);
    color: var(--accent-sky-text);
}

.multi-select-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* Column resizer */
.col-resizer {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    cursor: col-resize;
    z-index: 10;
}

.col-resizer:hover {
    background-color: var(--primary);
}

/* Add Row Button at the bottom of the table */
.add-row-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    color: var(--ink-faint);
    cursor: pointer;
    font-size: 14px;
    border-top: 1px solid var(--hairline);
    user-select: none;
}

.add-row-btn:hover {
    background-color: var(--canvas-soft);
    color: var(--ink-muted);
}

/* Kanban Board View */
.board-container {
    flex: 1;
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    align-items: flex-start;
}

.board-column {
    flex: 1;
    min-width: 260px;
    max-width: 320px;
    background-color: var(--canvas-soft);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    max-height: 100%;
}

.board-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
}

.board-column-title-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.board-column-count {
    color: var(--ink-faint);
    font-weight: 400;
}

.board-cards-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 100px;
}

.board-card {
    background-color: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 6px;
    padding: 12px;
    cursor: grab;
    box-shadow: var(--shadow-1);
    transition: transform 0.15s, box-shadow 0.15s;
    user-select: none;
}

.board-card:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.04);
}

.board-card-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--ink);
}

.board-card-property {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--ink-muted);
    margin-bottom: 4px;
}

.board-card-property-label {
    color: var(--ink-faint);
    width: 70px;
    flex-shrink: 0;
}

/* Drag over highlights */
.board-column.drag-over {
    background-color: rgba(0, 117, 222, 0.05);
    border: 2px dashed var(--primary);
}

/* Gallery View Styling */
.gallery-container {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    overflow-y: auto;
}

.gallery-card {
    background-color: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-1);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s;
}

.gallery-card:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.gallery-card-preview {
    height: 120px;
    background-color: var(--canvas-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-faint);
    overflow: hidden;
    position: relative;
}

.gallery-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-card-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gallery-card-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--ink);
}

/* List View Styling */
.list-container {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--hairline);
}

.list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--hairline);
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.15s;
}

.list-row:hover {
    background-color: var(--canvas-soft);
}

.list-row-left {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.list-row-properties {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Calendar View Styling */
.calendar-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    background-color: var(--surface);
    overflow: hidden;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: var(--canvas-soft);
    border-bottom: 1px solid var(--hairline);
}

.calendar-month-title {
    font-weight: 600;
    font-size: 16px;
}

.calendar-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: minmax(80px, 1fr);
}

.calendar-day-header {
    background-color: var(--canvas-soft);
    color: var(--ink-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
    padding: 6px;
    border-bottom: 1px solid var(--hairline);
    border-right: 1px solid var(--hairline);
}

.calendar-day-header:last-child {
    border-right: none;
}

.calendar-cell {
    border-right: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    position: relative;
}

.calendar-cell:nth-child(7n) {
    border-right: none;
}

.calendar-cell.other-month {
    background-color: rgba(0, 0, 0, 0.02);
}

body.dark-mode .calendar-cell.other-month {
    background-color: rgba(255, 255, 255, 0.02);
}

.calendar-cell.today {
    background-color: rgba(0, 117, 222, 0.03);
}

.calendar-cell.today .day-number {
    background-color: var(--primary);
    color: var(--on-primary);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.day-number {
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-secondary);
    margin-bottom: 2px;
}

.calendar-card {
    background-color: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: grab;
    box-shadow: var(--shadow-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-card:hover {
    border-color: var(--ink-muted);
}

/* Modals & Popovers (Floating Panels) */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeIn 0.2s ease-out;
}

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

.popover-panel {
    background-color: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    box-shadow: var(--shadow-2);
    padding: 24px;
    width: 480px;
    max-width: 90vw;
    animation: slideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { transform: translateY(10px); }
    to { transform: translateY(0); }
}

.popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.popover-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--hairline);
    background-color: var(--canvas-soft);
    color: var(--ink);
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}

.form-input:focus {
    border-color: var(--primary);
    background-color: var(--surface);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 24px;
}

/* Detail Drawer (Record Sidebar Editor) */
.detail-drawer {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 500px;
    background-color: var(--surface);
    border-left: 1px solid var(--hairline);
    box-shadow: var(--shadow-2);
    z-index: 50;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.detail-drawer.open {
    transform: translateX(0);
}

.detail-drawer-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--hairline);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.detail-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px;
}

/* Record details properties layout */
.record-props-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    row-gap: 12px;
    column-gap: 8px;
    margin-bottom: 24px;
}

.record-prop-name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-faint);
    font-size: 14px;
    align-self: center;
}

.record-prop-value {
    align-self: center;
}

/* Discussion / Comments Section inside detail sidebar */
.comments-section {
    border-top: 1px solid var(--hairline);
    padding-top: 24px;
    margin-top: 24px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.comment-card {
    background-color: var(--canvas-soft);
    border-radius: 6px;
    padding: 10px 12px;
    position: relative;
}

.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 4px;
}

.comment-author {
    font-weight: 600;
    color: var(--ink-secondary);
}

.comment-date {
    color: var(--ink-faint);
}

.comment-body {
    font-size: 13.5px;
    color: var(--ink);
    word-break: break-word;
}

.comment-delete-btn {
    position: absolute;
    right: 8px;
    bottom: 8px;
    background: transparent;
    border: none;
    font-size: 11px;
    color: var(--ink-faint);
    cursor: pointer;
}

.comment-delete-btn:hover {
    color: var(--accent-pink-text);
}

.comment-input-wrapper {
    display: flex;
    gap: 8px;
}

.comment-textarea {
    flex: 1;
    min-height: 36px;
    max-height: 120px;
    resize: vertical;
    border: 1px solid var(--hairline);
    background-color: var(--canvas-soft);
    color: var(--ink);
    border-radius: 6px;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 13.5px;
    outline: none;
}

.comment-textarea:focus {
    border-color: var(--primary);
    background-color: var(--surface);
}

/* Dropdown / Popover Picker menu */
.dropdown-menu {
    position: absolute;
    background-color: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 8px;
    box-shadow: var(--shadow-2);
    min-width: 180px;
    z-index: 1000;
    padding: 4px 0;
    display: none;
}

.dropdown-item {
    padding: 8px 12px;
    font-size: 13.5px;
    color: var(--ink-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.dropdown-item:hover {
    background-color: var(--canvas-soft);
    color: var(--ink);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--hairline);
    margin: 4px 0;
}

/* Auth Page layout */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
    background-color: var(--canvas-soft);
}

.auth-card {
    background-color: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    box-shadow: var(--shadow-2);
    padding: 40px;
    width: 400px;
    display: flex;
    flex-direction: column;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
}

.auth-logo-icon {
    width: 32px;
    height: 32px;
    background-color: var(--primary);
    color: var(--on-primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}

.auth-logo-text {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
}

.auth-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 13.5px;
    color: var(--ink-muted);
    text-align: center;
    margin-bottom: 24px;
}

.auth-error {
    background-color: var(--accent-pink);
    color: var(--accent-pink-text);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
    border: 1px solid rgba(136, 14, 79, 0.1);
}

/* Admin Panel / Users page */
.admin-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px 40px;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.admin-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    background-color: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 8px;
    overflow: hidden;
}

.users-table th, .users-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--hairline);
}

.users-table th {
    background-color: var(--canvas-soft);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.users-table tr:last-child td {
    border-bottom: none;
}

.badge-role {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-role.admin {
    background-color: var(--accent-orange);
    color: var(--accent-orange-text);
}

.badge-role.user {
    background-color: var(--accent-sky);
    color: var(--accent-sky-text);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 8px;
    padding: 12px 20px;
    box-shadow: var(--shadow-2);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInLeft 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInLeft {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.error {
    border-left: 4px solid var(--accent-pink-text);
}

.toast.success {
    border-left: 4px solid var(--accent-green-text);
}

.toast-msg {
    font-size: 13.5px;
    font-weight: 500;
}

/* Multi-select filter inputs */
.filter-group-panel {
    border: 1px solid var(--hairline);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    background-color: var(--canvas-soft);
}

.filter-rule-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.filter-rule-row:last-child {
    margin-bottom: 0;
}

/* Relation Picker Popover */
.relation-item-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background-color: var(--canvas-soft);
    border: 1px solid var(--hairline);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 4px;
    margin-bottom: 4px;
}

.relation-item-remove {
    cursor: pointer;
    font-weight: bold;
    color: var(--ink-faint);
}

.relation-item-remove:hover {
    color: var(--accent-pink-text);
}

/* Inline Mentions @ Styling */
.mention-chip {
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
}

.mention-chip:hover {
    text-decoration: underline;
}
