@font-face {
    font-family: 'Aller';
    src: url('/assets/fonts/Aller-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

body, body * {
    font-family: 'Aller', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 300;
}

:root {
    --nr-header: #4a4a4a;
    --nr-accent: #d1cc00;
    --nr-bg: #fafafa;
    --nr-header-height: 64px;
}

[x-cloak] { display: none !important; }

/* ── Cards ─────────────────────────────────────────────── */
.slide-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    cursor: pointer;
    transition: box-shadow 0.15s ease;
}
.slide-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
}

.card-elevated {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* ── Buttons (NetRom Space / Angular Material MDC style) ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    height: 36px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: normal;
    text-transform: none;
    transition: background-color 0.2s ease, filter 0.2s ease;
    text-decoration: none;
    cursor: pointer;
    border: none;
    white-space: nowrap;
    vertical-align: middle;
}

.btn-primary {
    background-color: #d1cc00 !important;
    color: #000000 !important;
}
.btn-primary:hover { filter: brightness(0.92); }

.btn-secondary {
    background-color: transparent !important;
    color: #4a4a4a !important;
    border: 1px solid rgba(74,74,74,0.4) !important;
}
.btn-secondary:hover { background-color: rgba(74,74,74,0.06) !important; }

.btn-secondary-dark {
    background-color: transparent !important;
    color: white !important;
    border: 1px solid rgba(255,255,255,0.4) !important;
}
.btn-secondary-dark:hover { background-color: rgba(255,255,255,0.1) !important; }

.btn-danger {
    background-color: #f04c3e !important;
    color: white !important;
}
.btn-danger:hover { filter: brightness(0.92); }

.btn-success {
    background-color: rgba(209, 204, 0, 0.25) !important;
    color: #4a4a4a !important;
    cursor: default;
}

.btn-sm {
    font-size: 0.875rem;
    padding: 0.375rem 0.875rem;
}

/* ── Icon buttons (mat-icon-button) ────────────────────── */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease;
    padding: 0;
    flex-shrink: 0;
}
.icon-btn .material-icons { font-size: 20px; line-height: 1; }

.icon-btn-primary { color: #d1cc00 !important; }
.icon-btn-primary:hover { background-color: rgba(209,204,0,0.12) !important; }

.icon-btn-default { color: #4a4a4a !important; }
.icon-btn-default:hover { background-color: rgba(74,74,74,0.08) !important; }

.icon-btn-warn { color: #f04c3e !important; }
.icon-btn-warn:hover { background-color: rgba(240,76,62,0.12) !important; }

/* ── Form inputs ────────────────────────────────────────── */
.input {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    outline: none;
}
.input:focus {
    border-color: #d1cc00;
    box-shadow: 0 0 0 3px rgba(209, 204, 0, 0.25);
}

/* ── Page layout ────────────────────────────────────────── */
.page-content {
    height: calc(100vh - var(--nr-header-height));
    overflow-y: auto;
    background-color: var(--nr-bg);
}

.page-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ── NetRom utility classes ─────────────────────────────── */
.bg-nr-header    { background-color: var(--nr-header); }
.bg-nr-bg        { background-color: var(--nr-bg); }
.bg-nr-presenter { background-color: #1a1a1a; }
.text-nr-header  { color: var(--nr-header); }
.text-nr-muted   { color: rgba(74, 74, 74, 0.6); }

.nr-header-bar     { height: var(--nr-header-height); }
.nr-logo-sm        { height: 40px; width: auto; border-radius: 4px; }
.nr-logo-md        { height: 48px; width: auto; border-radius: 4px; }
.nr-logo-vote      { height: 38px; width: auto; border-radius: 3px; }
.nr-logo-presenter { height: 34px; width: auto; border-radius: 3px; }
.nr-app-name       { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.5px; }
.nr-app-name-sm    { font-size: 1.1rem; font-weight: 700; }
.nr-app-name-large { font-size: 1.75rem; font-weight: 700; }
.nr-presenter-bar  {
    background-color: rgba(26,26,26,0.85);
    backdrop-filter: blur(8px);
    height: 56px;
    padding: 0 1rem;
}

.phone-frame {
    width: 350px;
    height: 650px;
    border: 6px solid #1f2937;
    border-radius: 36px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    background: #000;
}

.phone-content {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background: white;
}

.phone-content iframe {
    width: 150%;
    height: 150%;
    border: none;
}

.desktop-frame {
    flex: 1;
    height: 650px;
    border: 6px solid #374151;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    background: #1f2937;
    min-width: 900px;
    max-width: 1400px;
}

.desktop-content {
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.desktop-content iframe {
    width: 200%;
    height: 200%;
    transform: scale(0.5);
    transform-origin: top left;
    border: none;
}

.preview-container {
    display: flex;
    gap: 3rem;
    padding: 2rem;
    background: #f3f4f6;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
}

.preview-labels {
    display: flex;
    gap: 3rem;
    margin: 0 auto 1rem;
}

.label-desktop {
    flex: 1;
    text-align: center;
    min-width: 900px;
    max-width: 1400px;
}

.label-phone {
    width: 350px;
    text-align: center;
}

/* ── Home presentations grid ───────────────────────────── */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.25rem;
    background-color: #f7f7f7;
    border: 1px solid #ececec;
    border-radius: 0.5rem;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 10rem;
}

/* The name search takes the slack so the selects keep their natural width. */
.filter-field-grow {
    flex: 1 1 14rem;
}

.filter-field label {
    font-size: 0.75rem;
    font-weight: 400;
    color: #6b7280;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

/* Text inputs and selects render at different intrinsic heights, which leaves the
   filter row visibly ragged; pin them to a common height so the bar sits on one line. */
.filter-bar .input,
.filter-bar .btn {
    height: 2.5rem;
    box-sizing: border-box;
}

.filter-bar select.input {
    background-color: white;
}

.input-compact {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    font-size: 0.875rem;
    width: auto;
}

/* Narrow viewports scroll the table sideways rather than squashing the columns. */
.table-scroll {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.data-table th {
    padding: 0.625rem 0.75rem;
    border-bottom: 2px solid #e5e7eb;
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    white-space: nowrap;
}

.data-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background-color: #fafafa;
}

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

.sort-link {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.sort-link:hover {
    color: var(--nr-header);
}

.sort-link-active {
    color: var(--nr-header);
    font-weight: 400;
}

.sort-icon {
    font-size: 16px !important;
    opacity: 0.35;
}

.sort-link-active .sort-icon {
    opacity: 1;
    color: var(--nr-accent);
}

.pagination-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    background-color: white;
    color: var(--nr-header);
    font-size: 0.875rem;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.page-link:hover {
    background-color: #f3f4f6;
}

.page-link .material-icons {
    font-size: 18px;
}

.page-link-active {
    background-color: var(--nr-accent);
    border-color: var(--nr-accent);
    font-weight: 400;
}

.page-link-active:hover {
    background-color: var(--nr-accent);
}

.page-link-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.page-ellipsis {
    padding: 0 0.25rem;
    color: #9ca3af;
}

.empty-state {
    padding: 3rem 1rem;
    text-align: center;
}

/* ── Audience pickers (groups + collaborators) ─────────── */
.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.5rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.1875rem 0.5rem 0.1875rem 0.625rem;
    background-color: rgba(209, 204, 0, 0.18);
    border: 1px solid rgba(209, 204, 0, 0.5);
    border-radius: 999px;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.chip-remove {
    border: 0;
    background: none;
    padding: 0;
    color: #6b7280;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.chip-remove:hover { color: #b91c1c; }

/* Anchor for the dropdown panel, and the element that owns click-outside. */
.picker {
    position: relative;
}

/* The panel overlays the form rather than pushing it, so the fields below do not
   jump as results come and go. */
.picker-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 20;
    max-height: 14rem;
    overflow-y: auto;
    margin-top: 0.25rem;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.picker-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 0;
    background: none;
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
}

.picker-option:hover { background-color: #f3f4f6; }

.picker-meta {
    display: block;
    color: #9ca3af;
    font-size: 0.75rem;
}

.picker-check {
    font-size: 18px !important;
    color: var(--nr-accent);
}

.picker-empty {
    padding: 0.625rem 0.75rem;
    color: #9ca3af;
    font-size: 0.8125rem;
}

/* Chips and pickers inside the narrower edit modal */
.modal-audience .picker-panel { max-height: 11rem; }
