@font-face {
    font-family: 'Inter Tight';
    src: url('/assets/fonts/InterTight-VariableFont_wght.woff2') format('woff2');
    font-weight: 100 900;
}

:root {
    --bg: #f3f5f8;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e5e7eb;
    --blue: #2563eb;
    --blue-hover: #1d4ed8;
    --soft-blue: #eff6ff;
    --yellow: #fff3cc;
    --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter Tight', sans-serif;
}

/* Top header like media portal */

.topbar {
    min-height: 88px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 18px 32px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-logo {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.brand-small {
    font-size: 14px;
    color: var(--muted);
    line-height: 1;
}

.brand h1 {
    margin: 2px 0 0;
    font-size: 34px;
    line-height: 1;
    font-weight: 700;
}

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

.search-box {
    width: 320px;
    max-width: 40vw;
    border: 1px solid #cfd8e3;
    border-radius: 10px;
    padding: 13px 15px;
    font-family: inherit;
    font-size: 15px;
    background: #fff;
}

.search-box:focus {
    outline: none;
    border-color: #bcd1ff;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.08);
}

.admin-pill {
    color: var(--blue);
    font-weight: 700;
    text-decoration: none;
}

/* Main page */

.page-wrap {
    padding: 24px 32px 40px;
}

.toolbar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid transparent;
    border-radius: 9px;

    background: var(--blue);
    color: #fff;

    padding: 13px 18px;

    font-weight: 700;
    font-size: 15px;
    text-decoration: none;

    cursor: pointer;
}

.button:hover {
    background: var(--blue-hover);
}

.muted-button {
    background: #fff;
    color: var(--muted);
    border-color: #cfd8e3;
}

/* Notice panel */

.notice-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 18px;
    box-shadow: var(--shadow);
}

.notice-banner {
    border: 2px dashed #bfd2ff;
    border-radius: 14px;
    min-height: 66px;
    padding: 18px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    text-align: center;
    color: var(--text);
}

.notice-banner strong {
    font-weight: bolder;
}

.notice-banner span {
    color: var(--muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 16px;
}

.stat-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    background: #fff;
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 4px;
}

.stat-card strong {
    display: block;
    font-size: 18px;
}

/* Content panel */

.content-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    box-shadow: var(--shadow);
}

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

.panel-header h2 {
    margin: 0;
    font-size: 20px;
}

.home-link {
    color: var(--blue);
    font-weight: 600;
    text-decoration: none;
}

.empty-text {
    color: var(--muted);
}

/* Newsletter list table */

.newsletter-table {
    width: 100%;
}

.newsletter-table-head,
.newsletter-row {
    display: grid;
    grid-template-columns: 1fr 180px 160px;
    align-items: center;
    gap: 18px;
}

.newsletter-table-head {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
}

.newsletter-row {
    padding: 16px 10px;
    border-bottom: 1px solid #eef2f7;
    color: inherit;
    text-decoration: none;
}

.newsletter-row:hover {
    background: #f8fbff;
}

.newsletter-name {
    display: flex;
    align-items: center;
    gap: 14px;
}

.newsletter-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #fbceb1;
    color: #ea580c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 850;
}
.newsletter-icon.signed {
    background: #dcfce7;
    color: #16a34a;
}
.newsletter-name strong {
    display: block;
    font-size: 16px;
}

.newsletter-name span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 14px;
}

.row-action {
    color: var(--blue);
    font-weight: 700;
}

/* Mobile */

@media (max-width: 800px) {
    .topbar {
        padding: 18px;
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-actions {
        width: 100%;
    }

    .search-box {
        width: 100%;
        max-width: none;
    }

    .page-wrap {
        padding: 18px;
    }

    .notice-banner {
        flex-direction: column;
        align-items: center;
    }

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

    .newsletter-table-head {
        display: none;
    }

    .newsletter-row {
        grid-template-columns: 1fr;
        gap: 8px;
        border: 1px solid var(--border);
        border-radius: 14px;
        margin-bottom: 10px;
    }
}
/* =========================================
ACKNOWLEDGEMENT PAGE
========================================= */

.ack-layout {

    display: grid;

    grid-template-columns: 1fr 420px;

    gap: 18px;

    align-items: start;
}

.pdf-frame {

    width: 100%;

    height: 845px;

    border: 1px solid #e5e7eb;

    border-radius: 14px;

    background: #fff;
}

.signature-box {

    border: 1px dashed #94a3b8;

    border-radius: 14px;

    background: #fff;

    width: 100%;

    height: 190px;

    touch-action: none;
}

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

.form-row label {

    display: block;

    font-weight: 700;

    margin-bottom: 7px;
}
.form-row input[type="text"] {
    width: 100%;
	padding: 13px 14px;
    border: 1px solid #cfd8e3;
    border-radius: 10px;
    font-family: inherit;
    font-size: 16px;
}
.read-only-field {

    padding: 13px 14px;

    border: 1px solid #e5e7eb;

    border-radius: 10px;

    background: #f8fafc;

    font-weight: 700;
}

.small-note {

    color: #64748b;

    font-size: 14px;

    line-height: 1.45;
}

.button-row {

    display: flex;

    gap: 10px;

    flex-wrap: wrap;
}

.secondary-button {

    background: #fff;

    color: #2563eb;

    border: 1px solid #cfd8e3;
}

@media (max-width: 1000px) {

    .ack-layout {
        grid-template-columns: 1fr;
    }

    .pdf-frame {
        height: 560px;
    }
}
.acknowledge-confirm-text {
    font-size: 13px;
    line-height: 1.45;
    font-weight: 600;
}
/* =========================================
MOBILE FIXES - PORTAL / ACKNOWLEDGE PAGE
========================================= */

@media (max-width: 800px) {

    body {
        overflow-x: hidden;
    }

    .topbar {
        min-height: auto;
        padding: 14px 16px;
        gap: 12px;
    }

    .brand-logo {
        width: 44px;
        height: 44px;
    }

    .brand h1 {
        font-size: 26px;
    }

    .brand-small {
        font-size: 13px;
    }

    .topbar-actions {
        flex-wrap: wrap;
        gap: 10px;
    }

    .page-wrap {
        padding: 14px;
    }

    .content-panel,
    .notice-panel {
        padding: 16px;
        border-radius: 14px;
    }

    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .panel-header h2 {
        font-size: 20px;
    }

    .ack-layout {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .pdf-frame {
        height: 420px;
        border-radius: 12px;
    }

    .signature-box {
        height: 150px;
    }

    .form-row {
        margin-bottom: 14px;
    }

    .form-row input[type="text"],
    .read-only-field {
        font-size: 15px;
        padding: 12px 13px;
    }

    .small-note {
        font-size: 13px;
    }

    .form-row label.acknowledge-confirm-text,
    .acknowledge-confirm-text {
        font-size: 12px;
        line-height: 1.35;
        font-weight: 600;
    }

    .button-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .button,
    .secondary-button {
        width: 100%;
        min-height: 44px;
        text-align: center;
    }

    .newsletter-table-head {
        display: none;
    }

    .newsletter-row {
        grid-template-columns: 1fr;
        padding: 14px;
    }
}

@media (max-width: 420px) {

    .brand h1 {
        font-size: 23px;
    }

    .pdf-frame {
        height: 360px;
    }

    .signature-box {
        height: 135px;
    }
}
/* =========================================
RESPONSIVE PDF VIEWER
========================================= */

.pdf-viewer-mobile {
    display: none;
}

.pdf-viewer-desktop {
    display: block;
}

@media (max-width: 900px) {

    .pdf-viewer-desktop {
        display: none;
    }

    .pdf-viewer-mobile {
        display: block;
    }
}

.pdf-open-card {

    border: 1px dashed #bfd2ff;

    border-radius: 14px;

    background: #f8fbff;

    padding: 18px;
}

.pdf-open-card p {

    margin: 0 0 14px;

    color: #64748b;

    line-height: 1.5;
}
/* =========================================
FINAL MOBILE + STATUS ICON FIXES - PORTAL
========================================= */

.newsletter-icon {
    background: #ffedd5;
    color: #ea580c;
}

.newsletter-icon.signed {
    background: #dcfce7;
    color: #16a34a;
}

@media (max-width: 800px) {

    .newsletter-icon {
        width: 38px;
        height: 38px;
        border-radius: 11px;
        font-size: 12px;
        flex: 0 0 38px;
    }

    .newsletter-name {
        align-items: flex-start;
    }

    .newsletter-name strong {
        font-size: 15px;
    }

    .newsletter-name span {
        font-size: 13px;
    }

    .newsletter-row {
        grid-template-columns: 1fr;
        align-items: flex-start;
        gap: 10px;
    }

    .row-action {
        display: inline-flex;
        margin-top: 4px;
    }

    .ack-layout {
        grid-template-columns: 1fr !important;
    }

    .pdf-viewer-desktop {
        display: none !important;
    }

    .pdf-viewer-mobile {
        display: block !important;
    }

    .pdf-open-card {
        padding: 16px;
        border-radius: 14px;
    }

    .signature-box {
        height: 150px;
    }

    .form-row label.acknowledge-confirm-text {
        font-size: 12px;
        line-height: 1.35;
    }
}
/* =========================================
NEWSLETTER INTRO / PDF BOXES
========================================= */

.intro-card {
    margin-bottom: 20px;
}

.pdf-preview-card {
    margin-bottom: 24px;
}

.pdf-preview-content {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;
}

.pdf-preview-content h2 {
    margin-bottom: 6px;
}

.pdf-preview-content p {
    margin: 0;
    color: #64748b;
}

@media (max-width: 700px) {

    .pdf-preview-content {

        flex-direction: column;

        align-items: flex-start;
    }

    .pdf-preview-content .button {
        width: 100%;
        text-align: center;
    }
}