/* ================================================================
   PIXEL NOTE — Dark Theme
   B&W Pixel ecosystem design system
   ================================================================ */

:root {
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --bg: #0a0a0a;
    --bg-card: #111111;
    --bg-elevated: #181818;
    --bg-hover: rgba(255, 255, 255, 0.04);
    --border: #1e1e1e;
    --border-hover: #333333;
    --accent: #ffffff;
    --accent-dim: rgba(255, 255, 255, 0.06);
    --text: #f0f0f0;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --red: #ef4444;
    --red-dim: rgba(239, 68, 68, 0.1);
    --green: #22c55e;
    --green-dim: rgba(34, 197, 94, 0.12);
    --yellow: #eab308;
    --radius: 12px;
    --radius-sm: 8px;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #555;
}

a {
    color: var(--accent);
    text-decoration: none;
}

/* ================================================================
   TOPBAR
   ================================================================ */

.pn-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 54px;
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.pn-topbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
}

.pn-topbar-brand img {
    width: 22px;
    height: 22px;
    opacity: 0.9;
}

.pn-topbar-brand span {
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
}

.pn-topbar-center {
    flex: 1;
    max-width: 420px;
    margin: 0 24px;
    position: relative;
}

.pn-search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.78rem;
    outline: none;
    transition: border-color 0.2s;
}

.pn-search-input::placeholder {
    color: var(--text-muted);
}
.pn-search-input:focus {
    border-color: var(--border-hover);
}

.pn-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
}

.pn-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pn-topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.pn-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.pn-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* ================================================================
   BUTTONS
   ================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 6px;
    font-family: var(--font);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    transition: all 0.15s;
    white-space: nowrap;
}

.btn:hover {
    border-color: var(--border-hover);
    color: var(--text);
    background: var(--bg-hover);
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

.btn-primary:hover {
    opacity: 0.9;
    color: #000;
    background: var(--accent);
}

.btn-danger {
    border-color: var(--red);
    color: var(--red);
}

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

.btn-ghost {
    border: none;
    padding: 6px 10px;
}

.btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ================================================================
   CARDS
   ================================================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s;
}

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

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 0.82rem;
    font-weight: 600;
}

.card-body {
    padding: 16px 18px;
}

/* ================================================================
   KPI CARDS
   ================================================================ */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.kpi {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    transition: border-color 0.2s;
}

.kpi:hover {
    border-color: var(--border-hover);
}

.kpi-label {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.kpi-value {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.kpi-sub {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ================================================================
   NOTE LIST ITEMS
   ================================================================ */

.note-item {
    display: block;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    color: var(--text);
    position: relative;
}

.note-item:hover {
    border-color: var(--border-hover);
    background: var(--bg-elevated);
}

.note-item.active {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.note-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.note-item-title {
    font-weight: 600;
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.note-item-date {
    font-size: 0.68rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.note-item-preview {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-item-category {
    display: inline-flex;
    padding: 2px 8px;
    background: var(--accent-dim);
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.note-item-pin {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.6rem;
    color: var(--yellow);
}

.note-item-actions {
    display: none;
    position: absolute;
    top: 10px;
    right: 10px;
    gap: 4px;
}

.note-item:hover .note-item-actions {
    display: flex;
}

/* ================================================================
   TEMPLATES
   ================================================================ */

.template-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.template-card {
    padding: 16px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.template-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-elevated);
    transform: translateY(-2px);
}

.template-card-icon {
    margin-bottom: 8px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.template-card-name {
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.template-card-desc {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* ================================================================
   SECTION TITLES
   ================================================================ */

.section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 14px;
}

.section-label svg {
    width: 18px;
    height: 18px;
}

/* ================================================================
   SIDEBAR (EDITOR)
   ================================================================ */

.pn-sidebar {
    width: 240px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
}

.pn-sidebar-section {
    padding: 14px 14px;
    border-bottom: 1px solid var(--border);
}

.pn-sidebar-label {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.pn-sidebar-note {
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.12s;
    margin-bottom: 3px;
}

.pn-sidebar-note:hover {
    background: var(--bg-hover);
}

.pn-sidebar-note.active {
    background: var(--accent-dim);
    border-left: 2px solid var(--accent);
}

.pn-sidebar-note-title {
    font-weight: 500;
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pn-sidebar-note-date {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 1px;
}

.pn-category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.78rem;
    color: var(--text-secondary);
    transition: all 0.12s;
}

.pn-category-item:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.pn-category-count {
    font-size: 0.65rem;
    padding: 1px 7px;
    background: var(--bg-elevated);
    border-radius: 4px;
    color: var(--text-muted);
}

/* ================================================================
   EDITOR AREA
   ================================================================ */

.pn-editor-wrap {
    flex: 6;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.pn-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.pn-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.12s;
}

.pn-toolbar-btn:hover {
    border-color: var(--border-hover);
    color: var(--text);
    background: var(--bg-hover);
}

.pn-toolbar-btn.active {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}

.pn-toolbar-btn.recording {
    background: var(--red-dim);
    border-color: var(--red);
    color: var(--red);
    animation: pulse-rec 1.5s ease infinite;
}

@keyframes pulse-rec {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.pn-toolbar-btn svg {
    width: 14px;
    height: 14px;
}

.pn-toolbar-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 2px;
}

.pn-toolbar-select {
    padding: 5px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.7rem;
    cursor: pointer;
    outline: none;
}

.pn-toolbar-select:focus {
    border-color: var(--border-hover);
}
.pn-toolbar-select option {
    background: var(--bg-card);
    color: var(--text);
}

.pn-editor-body {
    flex: 1;
    padding: 24px 28px;
    overflow-y: auto;
}

.pn-title-input {
    width: 100%;
    border: none;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    padding: 0;
    outline: none;
    background: transparent;
    color: var(--text);
    font-family: var(--font);
}

.pn-title-input::placeholder {
    color: #333;
}

.pn-timestamp {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.pn-timestamp svg {
    width: 14px;
    height: 14px;
    stroke: var(--text-muted);
}

.pn-textarea {
    width: 100%;
    min-height: 400px;
    border: none;
    font-size: 0.95rem;
    line-height: 1.8;
    outline: none;
    resize: none;
    font-family: var(--font);
    background: transparent;
    color: var(--text);
}

.pn-textarea::placeholder {
    color: #333;
}

/* Editor drag over */
.pn-editor-body.dragover {
    position: relative;
}

.pn-editor-body.dragover::before {
    content: 'Drop images here';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed var(--border-hover);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    z-index: 10;
    pointer-events: none;
}

/* Image preview */
.pn-image-card {
    margin: 16px 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-card);
    transition: border-color 0.2s;
}

.pn-image-card:hover {
    border-color: var(--border-hover);
}

.pn-image-header {
    padding: 8px 12px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 500;
}

.pn-image-card img {
    width: 100%;
    max-height: 360px;
    object-fit: contain;
    background: var(--bg);
}

.pn-ocr-block {
    padding: 10px 12px;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
}

.pn-ocr-label {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.pn-ocr-text {
    font-size: 0.78rem;
    line-height: 1.6;
    color: var(--text-secondary);
    padding: 8px;
    background: var(--bg);
    border-radius: 4px;
    white-space: pre-wrap;
}

/* ================================================================
   PI ASSISTANT (Column 3)
   ================================================================ */

.pn-pi-panel {
    flex: 4;
    min-width: 280px;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pn-pi-header {
    padding: 12px 16px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pn-pi-title {
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pn-pi-badge {
    padding: 2px 6px;
    background: var(--accent-dim);
    border-radius: 3px;
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.pn-pi-subtitle {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.pn-pi-actions {
    display: flex;
    gap: 6px;
}

.pn-pi-content {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
}

.pn-pi-section {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 10px;
}

.pn-pi-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pn-pi-section-text {
    font-size: 0.78rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.pn-pi-empty {
    text-align: center;
    padding: 40px 16px;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.pn-pi-empty svg {
    margin-bottom: 10px;
    opacity: 0.3;
}

/* ================================================================
   SEARCH MODAL
   ================================================================ */

.pn-search-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, 0.7);
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
}

.pn-search-modal.open {
    display: flex;
}

.pn-search-modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 90%;
    max-width: 640px;
    max-height: 70vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pn-search-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}

.pn-search-modal-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    outline: none;
}

.pn-search-modal-input::placeholder {
    color: var(--text-muted);
}

.pn-search-filters {
    display: flex;
    gap: 6px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.pn-filter-btn {
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.12s;
}

.pn-filter-btn:hover,
.pn-filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

.pn-search-results {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px;
}

.pn-search-result {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.12s;
    margin-bottom: 4px;
}

.pn-search-result:hover {
    background: var(--bg-hover);
}

.pn-search-result-title {
    font-weight: 600;
    font-size: 0.82rem;
    margin-bottom: 3px;
}

.pn-search-result-preview {
    font-size: 0.72rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pn-search-result-meta {
    font-size: 0.62rem;
    color: var(--text-muted);
    margin-top: 3px;
    display: flex;
    gap: 10px;
}

.pn-search-highlight {
    background: rgba(234, 179, 8, 0.25);
    padding: 0 2px;
    border-radius: 2px;
}

/* ================================================================
   LOGIN
   ================================================================ */

.pn-login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pn-login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 36px;
    width: 100%;
    max-width: 400px;
}

.pn-login-logo {
    text-align: center;
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.pn-login-logo img {
    width: 48px;
    height: 48px;
    opacity: 0.9;
}

.pn-login-logo h1 {
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.7);
}

.pn-login-logo p {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.pn-form-group {
    margin-bottom: 14px;
}

.pn-form-group label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pn-form-input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
}

.pn-form-input:focus {
    border-color: var(--accent);
}

.pn-form-input::placeholder {
    color: var(--text-muted);
}

.pn-login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    font-size: 0.68rem;
    color: var(--text-muted);
}

.pn-login-divider::before,
.pn-login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.pn-google-btn {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.15s;
}

.pn-google-btn:hover {
    border-color: var(--border-hover);
    background: var(--bg-hover);
}

/* ================================================================
   SAVE STATUS
   ================================================================ */

.pn-save-status {
    font-size: 0.68rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.pn-save-status.saved {
    color: var(--green);
}
.pn-save-status.saving {
    color: var(--yellow);
}

/* ================================================================
   TOAST
   ================================================================ */

.pn-toast {
    position: fixed;
    top: 70px;
    right: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 18px;
    font-size: 0.78rem;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideInRight 0.3s ease;
}

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

/* ================================================================
   SECTION ORGANIZER PANEL
   ================================================================ */

.pn-organizer {
    position: fixed;
    top: 0;
    right: -380px;
    width: 380px;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}

.pn-organizer.open {
    right: 0;
}

.pn-organizer-header {
    padding: 14px 18px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pn-organizer-header h3 {
    font-size: 0.9rem;
    font-weight: 700;
}

.pn-organizer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 1024px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .template-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .pn-pi-panel {
        flex: 4;
        min-width: 240px;
    }
}

@media (max-width: 768px) {
    .pn-sidebar {
        display: none;
    }
    .pn-pi-panel {
        display: none;
    }
    .pn-topbar-center {
        display: none;
    }
    .template-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    .template-grid {
        grid-template-columns: 1fr;
    }
}
