body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f3f5f8;
    color: #222;
}

.top-header {
    background: #1f3f5f;
    color: #fff;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-header a {
    color: #fff;
}

.top-header-title {
    font-size: 18px;
    font-weight: bold;
}

.main-nav {
    background: #ffffff;
    border-bottom: 1px solid #d5dce5;
    padding: 10px 24px;
}

.main-nav a {
    display: inline-block;
    margin-right: 18px;
    color: #1f3f5f;
    text-decoration: none;
    font-weight: bold;
}

.main-nav a:hover {
    text-decoration: underline;
}

.content {
    max-width: 1200px;
    margin: 24px auto;
    background: #ffffff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.footer {
    text-align: center;
    padding: 20px;
    color: #777;
}

.cards {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.card {
    background: #f8fafc;
    border: 1px solid #dce3ea;
    border-radius: 8px;
    padding: 18px;
    width: 280px;
}

.card h2 {
    margin-top: 0;
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-box {
    width: 360px;
    background: #ffffff;
    padding: 28px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

.login-box h1 {
    margin-top: 0;
    text-align: center;
}

.login-box h2 {
    font-size: 18px;
    text-align: center;
    font-weight: normal;
    margin-bottom: 24px;
}

.form-row {
    margin-bottom: 16px;
}

.form-row label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
}

.form-row input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px;
    border: 1px solid #ccd4dd;
    border-radius: 4px;
}

button {
    background: #1f3f5f;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background: #2d557a;
}

.error-message {
    background: #ffe5e5;
    color: #8a0000;
    border: 1px solid #f0b7b7;
    padding: 10px;
    margin-bottom: 16px;
    border-radius: 4px;
}

.action-panel {
    margin: 18px 0;
}

.button-link {
    display: inline-block;
    background: #1f3f5f;
    color: #fff;
    padding: 9px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
}

.button-link:hover {
    background: #2d557a;
    text-decoration: none;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 18px;
    background: #fff;
}

.data-table th,
.data-table td {
    border: 1px solid #dce3ea;
    padding: 9px 10px;
    text-align: left;
    vertical-align: top;
}

.data-table th {
    background: #f0f4f8;
    color: #1f3f5f;
}

.data-table tr:nth-child(even) {
    background: #fafafa;
}

.success-message {
    background: #e7f7e9;
    color: #1f5f2a;
    border: 1px solid #b9dfbf;
    padding: 14px;
    margin-bottom: 18px;
    border-radius: 4px;
}

.summary-line {
    margin: 12px 0 18px 0;
    padding: 10px 12px;
    background: #f0f4f8;
    border: 1px solid #dce3ea;
    border-radius: 4px;
}

.filter-form {
    margin: 18px 0;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #dce3ea;
    border-radius: 6px;
}

.form-row-inline {
    display: inline-block;
    margin-right: 14px;
    margin-bottom: 10px;
    vertical-align: top;
}

.form-row-inline label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-row-inline input,
.form-row-inline select {
    padding: 8px;
    border: 1px solid #ccd4dd;
    border-radius: 4px;
    min-width: 220px;
}

.button-link.secondary {
    background: #6d7c89;
}

.button-link.secondary:hover {
    background: #586775;
}

.status-label {
    display: inline-block;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 12px;
    background: #e8edf2;
    color: #263645;
}

.status-new {
    background: #e8edf2;
}

.status-checked {
    background: #e7f7e9;
    color: #1f5f2a;
}

.status-incomplete {
    background: #fff4d6;
    color: #765400;
}

.status-duplicate_suspected {
    background: #ffe5e5;
    color: #8a0000;
}

.status-cancelled {
    background: #eeeeee;
    color: #777777;
}

.note {
    color: #777;
    font-size: 13px;
}

.big-number {
    font-size: 32px;
    font-weight: bold;
    margin: 8px 0;
    color: #1f3f5f;
}

.section-box {
    margin: 24px 0;
    padding: 18px;
    border: 1px solid #dce3ea;
    border-radius: 8px;
    background: #f8fafc;
}

.section-box h2 {
    margin-top: 0;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.details-table th,
.details-table td {
    border: 1px solid #dce3ea;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}

.details-table th {
    width: 220px;
    background: #f0f4f8;
    color: #1f3f5f;
}

.conflicts-table th,
.conflicts-table td {
    font-size: 13px;
}

.conflict-value {
    max-width: 260px;
    word-break: break-word;
}

.actions-cell {
    min-width: 220px;
}

.inline-action-form {
    display: block;
    margin-bottom: 6px;
}

.inline-action-form button,
.link-abstract-box button {
    width: 100%;
    margin-bottom: 4px;
    font-size: 12px;
    padding: 6px 8px;
}

.danger-button {
    background: #8a2f2f;
}

.danger-button:hover {
    background: #a33a3a;
}

.link-abstract-box {
    margin-top: 10px;
    padding: 8px;
    border: 1px solid #dce3ea;
    border-radius: 4px;
    background: #f8fafc;
}

.link-abstract-box label {
    display: block;
    font-weight: bold;
    margin-bottom: 4px;
}

.link-abstract-box input {
    width: 100%;
    box-sizing: border-box;
    padding: 6px;
    margin-bottom: 6px;
    border: 1px solid #ccd4dd;
    border-radius: 4px;
}

.raw-details {
    margin-top: 8px;
    font-size: 12px;
}

.raw-details pre {
    max-width: 300px;
    max-height: 180px;
    overflow: auto;
    background: #f4f4f4;
    padding: 8px;
    border: 1px solid #ddd;
}

.help-box {
    margin: 14px 0 20px 0;
    padding: 12px 14px;
    border: 1px solid #dce3ea;
    border-radius: 6px;
    background: #f8fafc;
}

.help-box summary {
    cursor: pointer;
    font-weight: bold;
    color: #1f3f5f;
}

.help-content {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.45;
}

.help-content code {
    background: #eef2f6;
    padding: 2px 4px;
    border-radius: 3px;
}

.raw-preview {
    margin-top: 8px;
    padding: 8px;
    background: #fff;
    border: 1px solid #dce3ea;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.35;
}

.raw-preview div {
    margin-bottom: 4px;
}

.link-abstract-box small {
    display: block;
    margin: 4px 0 6px 0;
    color: #666;
    font-size: 11px;
    line-height: 1.3;
}

.duplicate-box {
    background: #fff8e5;
    border-color: #e0c16a;
}

.status-merged_duplicate {
    background: #eeeeee;
    color: #777777;
}

.status-merged_duplicate {
    background: #eeeeee;
    color: #777777;
}

.edit-form {
    margin-top: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 14px 18px;
    margin-bottom: 18px;
}

.form-row-wide {
    grid-column: 1 / -1;
}

.form-row textarea,
.form-row select,
.form-row input[type="date"],
.form-row input[type="email"],
.form-row input[type="number"],
.form-row input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
    border: 1px solid #ccd4dd;
    border-radius: 4px;
    font-family: Arial, sans-serif;
}

.inline-details {
    margin-top: 16px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #dce3ea;
    border-radius: 6px;
}

.inline-details summary {
    cursor: pointer;
    font-weight: bold;
    color: #1f3f5f;
}

.small-form {
    margin-top: 14px;
}

.checkin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
    margin-bottom: 16px;
    align-items: start;
}

.checkin-grid .form-row {
    margin-bottom: 0;
}

.checkin-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 24px;
    grid-column: 1 / -1;
    padding: 8px 0 2px 0;
}

.checkin-checkboxes label {
    font-weight: normal;
    white-space: nowrap;
}

.checkin-comment {
    grid-column: 1 / -1;
}

.checkin-time-box {
    padding: 9px 10px;
    background: #eef2f6;
    border: 1px solid #dce3ea;
    border-radius: 4px;
    min-height: 20px;
}

.checkin-quick-actions {
    margin: 0 0 16px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.checkin-inline-form {
    display: inline-block;
    margin: 0;
}

.quick-listener-box {
    margin-top: 16px;
    padding: 14px;
    background: #fff8e5;
    border: 1px solid #e0c16a;
    border-radius: 8px;
}

.quick-listener-box h3 {
    margin-top: 0;
}

@media (max-width: 800px) {
    .checkin-grid {
        grid-template-columns: 1fr;
    }

    .checkin-checkboxes,
    .checkin-comment {
        grid-column: 1;
    }
}

@media (max-width: 800px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.inline-delete-form {
    display: inline-block;
    margin: 0;
}

.small-danger-button {
    background: #8a2f2f;
    color: #fff;
    border: none;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.small-danger-button:hover {
    background: #a33a3a;
}

.public-page,
.invitation-page {
    background: #eef2f6;
}

.public-container {
    max-width: 1000px;
    margin: 30px auto;
    background: #ffffff;
    padding: 28px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.public-container h1 {
    margin-top: 0;
    color: #1f3f5f;
}

.public-warning {
    padding: 12px 14px;
    background: #fff8e5;
    border: 1px solid #e0c16a;
    border-radius: 6px;
    margin: 18px 0;
    line-height: 1.45;
}

.status-warning {
    color: #8a5a00;
    font-weight: bold;
}
@page {
    size: A4;
    margin: 0;
}

.invitation-page {
    margin: 0;
    padding: 0;
    background: #eef2f6;
}

.invitation-a4 {
    width: 210mm;
    min-height: 297mm;
    margin: 20px auto;
    padding: 22mm 20mm 16mm 20mm;
    box-sizing: border-box;
    background: #ffffff;
    color: #000000;
    font-family: "Times New Roman", Times, serif;
    font-size: 12pt;
    line-height: 1.32;
    box-shadow: 0 2px 14px rgba(0,0,0,0.18);

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.letter-main {
    flex: 1 1 auto;
}

.letter-top-space {
    height: 30mm;
}

.letter-heading {
    text-align: center;
    font-size: 13.5pt;
    font-weight: bold;
    margin: 0 0 14mm 0;
    letter-spacing: 0.2px;
}

.letter-paragraph {
    margin: 0 0 5.5mm 0;
    text-align: left;
}

.letter-signature {
    margin-top: 10mm;
}

.letter-signature p {
    margin: 0;
}

.letter-footer {
    flex: 0 0 auto;
    font-size: 10.5pt;
    line-height: 1.25;
    margin-top: 12mm;
    text-align: center;
}

.letter-footer p {
    margin: 0 0 2.5mm 0;
}

.print-panel {
    margin-top: 8mm;
    text-align: center;
}

.print-panel button {
    font-family: Arial, sans-serif;
    font-size: 14px;
    padding: 8px 16px;
}

@media print {
    html,
    body {
        width: 210mm;
        height: 297mm;
        background: #ffffff;
    }

    .invitation-page {
        background: #ffffff;
    }

    .invitation-a4 {
        width: 210mm;
        min-height: 297mm;
        margin: 0;
        padding: 22mm 20mm 16mm 20mm;
        box-shadow: none;
        page-break-after: avoid;
    }

    .print-panel {
        display: none;
    }
}

.letter-logo-block {
    text-align: center;
    margin-bottom: 10mm;
}

.letter-logo {
    max-width: 42mm;
    max-height: 28mm;
    height: auto;
}

.signature-image {
    display: block;
    max-width: 48mm;
    max-height: 18mm;
    height: auto;
    margin: 0 0 2mm 0;
}

.lookup-container {
    max-width: 650px;
}

.lookup-form {
    margin-top: 20px;
}

.lookup-form .form-row {
    margin-bottom: 16px;
}

.lookup-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
}

.lookup-form input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #ccd4dd;
    border-radius: 4px;
    font-size: 15px;
}

.lookup-note {
    margin-top: 18px;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.checkbox-row {
    padding-top: 24px;
}

.checkbox-row label {
    font-weight: normal;
}

.review-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 14px;
    margin: 18px 0 24px 0;
}

.review-summary-card {
    background: #ffffff;
    border: 1px solid #dce3ea;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.review-summary-card.critical {
    border-color: #b84242;
    background: #fff5f5;
}

.review-summary-card.warning {
    border-color: #d1a230;
    background: #fff8e5;
}

.review-summary-number {
    font-size: 30px;
    font-weight: bold;
    color: #1f3f5f;
}

.review-summary-label {
    margin-top: 6px;
    color: #555;
}

.review-task-list {
    display: grid;
    gap: 12px;
}

.review-task {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid #dce3ea;
    border-radius: 8px;
    background: #ffffff;
    text-decoration: none;
    color: inherit;
}

.review-task:hover {
    background: #f5f8fb;
}

.review-task.critical {
    border-left: 5px solid #b84242;
}

.review-task.warning {
    border-left: 5px solid #d1a230;
}

.review-task-count {
    font-size: 28px;
    font-weight: bold;
    color: #1f3f5f;
    text-align: center;
}

.review-task-body strong {
    display: block;
    margin-bottom: 4px;
}

.review-task-body span {
    color: #666;
    font-size: 14px;
}

.review-card {
    background: #ffffff;
    border: 1px solid #dce3ea;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.review-priority-high {
    border-left: 6px solid #b84242;
}

.review-priority-medium {
    border-left: 6px solid #d1a230;
}

.review-priority-low {
    border-left: 6px solid #6a9c5a;
}

.review-card-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #e5ebf0;
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.review-score {
    text-align: right;
    min-width: 130px;
}

.review-title-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.review-title-box {
    background: #f8fafc;
    border: 1px solid #e1e7ed;
    border-radius: 6px;
    padding: 12px;
}

.review-title-box h3 {
    margin-top: 0;
    font-size: 15px;
    color: #1f3f5f;
}

.review-title-box p {
    margin-bottom: 0;
}

.review-keywords {
    margin-top: 10px;
    color: #666;
    font-size: 13px;
}

.review-actions {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 900px) {
    .review-summary-grid {
        grid-template-columns: 1fr 1fr;
    }

    .review-title-grid {
        grid-template-columns: 1fr;
    }

    .review-card-header {
        display: block;
    }

    .review-score {
        text-align: left;
        margin-top: 8px;
    }
}

.inline-search-input {
    min-width: 260px;
    padding: 6px 8px;
    border: 1px solid #ccd4dd;
    border-radius: 4px;
}

.compact-admin-form {
    margin: 0;
}

.mini-form-line {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}

.mini-form-line label {
    font-size: 12px;
    color: #555;
}

.mini-form-line input,
.mini-form-line select,
.compact-admin-form input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 5px 7px;
    border: 1px solid #ccd4dd;
    border-radius: 4px;
}

.chair-session-card {
    margin: 18px 0;
    padding: 14px;
    border: 1px solid #dce3ea;
    border-radius: 8px;
    background: #ffffff;
}

.chair-session-card h3 {
    margin-top: 0;
    color: #173b5c;
}

.public-program-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.public-program-table th,
.public-program-table td {
    border: 1px solid #dce3ea;
    padding: 8px 10px;
    vertical-align: top;
}

.public-program-table th {
    background: #f0f4f8;
    text-align: left;
}

.public-note {
    color: #666;
    font-style: italic;
}
.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-toggle {
    display: inline-block;
    padding: 8px 10px;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
}

.nav-dropdown-toggle:hover {
    text-decoration: underline;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #ffffff;
    border: 1px solid #d8d8d8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    z-index: 1000;
}

.nav-dropdown-menu a {
    display: block;
    padding: 9px 12px;
    color: #1f2937;
    text-decoration: none;
    white-space: nowrap;
}

.nav-dropdown-menu a:hover {
    background: #f2f4f7;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    display: block;
}
.participant-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.participant-section-header h2 {
    margin: 0;
}

.participant-program-link {
    display: inline-block;
    padding: 7px 12px;
    border: 1px solid #1d3557;
    border-radius: 8px;
    background: #fff;
    color: #1d3557;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.participant-program-link:hover {
    background: #1d3557;
    color: #fff;
}

@media (max-width: 720px) {
    .participant-section-header {
        align-items: flex-start;
        flex-direction: column;
    }
}
