/* Booklist order form — gaya PULO MAS Booklist AY 2026-2027 */

body.public-app {
    background: #eef2f6 !important;
}

.public-main {
    max-width: 980px;
    padding: 16px 18px 24px;
}

.public-header {
    background: #ffffff;
    color: #0f172a;
    border-bottom: 1px solid #dbe2ea;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    padding: 10px 18px;
}

.public-header .public-brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid #dbe2ea;
    background: #fff;
}

.public-header .public-brand h1 {
    color: #111827;
    margin: 0;
    font-size: 19px;
}

.public-header .public-brand p {
    color: #6b7280;
}

.public-header .public-login-btn {
    background: #f8fafc;
    color: #111827;
    border: 1px solid #dbe2ea;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 14px;
}

.public-header .public-lang-switch {
    color: #6b7280;
}

.public-header .public-lang-switch a.active {
    color: #2563eb;
}

.ticket-dashboard {
    display: grid;
    gap: 16px;
}

.ticket-hero-card,
.ticket-check-card,
.ticket-order-panel,
.catalog-panel {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #dbe2ea;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.ticket-hero-card {
    position: relative;
    overflow: hidden;
    padding: 0;
    min-height: 340px;
}

.ticket-hero-track {
    position: relative;
    min-height: 340px;
}

.ticket-hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s ease;
}

.ticket-hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.ticket-hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ticket-hero-fallback {
    height: 340px;
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
    color: #e5e7eb;
    display: grid;
    place-content: center;
    text-align: center;
    gap: 8px;
    padding: 24px;
}

.ticket-hero-caption {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    background: rgba(15, 23, 42, 0.55);
    color: #fff;
    border-radius: 12px;
    padding: 10px 12px;
    backdrop-filter: blur(2px);
}

.ticket-hero-caption h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.ticket-hero-caption p {
    margin: 0;
    font-size: 13px;
    color: #d1d5db;
}

.ticket-hero-dots {
    position: absolute;
    right: 16px;
    bottom: 12px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.hero-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.hero-dot.active {
    background: #ffffff;
}

.ticket-check-card {
    background: linear-gradient(135deg, #0e5a74, #084d65);
    color: #ffffff;
    padding: 18px 20px;
    display: grid;
    grid-template-columns: 1fr 2.4fr;
    gap: 18px;
    align-items: center;
}

.ticket-check-text h2 {
    margin: 0 0 4px;
    font-size: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ticket-check-text p {
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.5;
}

.ticket-check-text h2::before {
    content: "BKS";
    font-size: 16px;
    font-weight: 700;
}

.ticket-check-action {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
}

.ticket-check-action input {
    margin: 0;
    border: 0;
    border-radius: 999px;
    padding: 18px 24px;
    min-height: 64px;
    font-size: 19px;
    background: #ffffff;
    color: #0f172a;
}

.ticket-check-action button {
    margin: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 0;
    display: grid;
    place-items: center;
    background: #facc15;
    color: #0f172a;
    font-size: 0;
    position: relative;
}

.ticket-check-action button::before {
    content: "GO";
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}

.ticket-order-panel {
    padding: 20px;
}

.ticket-order-panel .panel-title {
    margin: 0 0 6px;
    font-size: 34px;
}

.ticket-order-panel .panel-subtitle {
    margin: 0 0 14px;
    color: #6b7280;
}

.ticket-form-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 12px;
}

.ticket-form-grid label {
    display: block;
    margin-bottom: 4px;
}

.ticket-form-grid select {
    margin: 0;
    background: #fff;
}

.ticket-order-note {
    margin-top: 12px;
    margin-bottom: 10px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

.ticket-lookup-result {
    grid-column: 1 / -1;
    margin-top: 8px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(15, 23, 42, 0.28);
    border-radius: 12px;
    padding: 10px;
    display: grid;
    gap: 8px;
}

.ticket-lookup-result.empty {
    color: #e5e7eb;
    font-size: 14px;
}

.ticket-lookup-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 10px;
}

.ticket-lookup-item small {
    color: rgba(255, 255, 255, 0.9);
}

.lookup-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.lookup-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: 8px 10px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.38);
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.booklist-form-header {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #111827;
}

.booklist-form-header h2 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.02em;
}

.booklist-form-header p {
    margin: 0;
    color: var(--pub-muted);
    font-size: 13px;
}

.booklist-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    align-items: center;
}

.booklist-toolbar button {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid var(--pub-border);
    background: #f8fafc;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.booklist-toolbar button.primary {
    background: var(--pub-accent);
    color: #fff;
    border-color: transparent;
}

.table-scroll {
    overflow-x: auto;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
}

.booklist-table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
    font-size: 13px;
}

.booklist-table th,
.booklist-table td {
    border: 1px solid #94a3b8;
    padding: 8px 10px;
    vertical-align: middle;
}

.booklist-table thead th {
    background: #f1f5f9;
    font-weight: 700;
    text-align: center;
    font-size: 12px;
    line-height: 1.35;
}

.booklist-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.booklist-table tbody tr.row-selected {
    background: #eff6ff;
}

.booklist-table .col-no { width: 42px; text-align: center; }
.booklist-table .col-isbn { width: 120px; text-align: center; font-size: 11px; }
.booklist-table .col-price { width: 90px; text-align: right; white-space: nowrap; }
.booklist-table .col-order { width: 70px; text-align: center; }
.booklist-table .col-check { width: 72px; text-align: center; }

.booklist-table .qty-input {
    width: 48px;
    padding: 4px 6px;
    text-align: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
}

.booklist-table .order-check,
.booklist-table .staff-check,
.booklist-table .parent-check {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--pub-accent);
}

.booklist-table .staff-check,
.booklist-table .parent-check {
    cursor: default;
    opacity: 0.45;
}

.booklist-table tfoot td {
    font-weight: 700;
    background: #f8fafc;
}

.package-agreement {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 12px;
    padding: 12px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
}

.package-agreement input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Printable order proof page */
.booklist-print-page {
    margin: 0;
    padding: 24px;
    font-family: Arial, Helvetica, sans-serif;
    color: #111827;
    background: #e5e7eb;
}

.booklist-sheet {
    max-width: 980px;
    margin: 0 auto;
    background: #fff;
    padding: 28px 32px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.print-toolbar {
    max-width: 980px;
    margin: 0 auto 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.print-toolbar button,
.print-toolbar a {
    padding: 10px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #111827;
    cursor: pointer;
}

.print-toolbar button {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.booklist-header {
    text-align: center;
    margin-bottom: 20px;
}

.booklist-school {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
}

.booklist-header h1 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.booklist-meta {
    margin-bottom: 16px;
    font-size: 14px;
}

.meta-row {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.meta-label {
    min-width: 110px;
    font-weight: 600;
}

.meta-value.underline {
    border-bottom: 1px solid #111827;
    flex: 1;
    min-width: 200px;
}

.booklist-sheet .booklist-table {
    min-width: 0;
    font-size: 11px;
}

.booklist-sheet .booklist-table th,
.booklist-sheet .booklist-table td {
    padding: 6px 8px;
}

.row-ordered {
    font-weight: 600;
}

.row-not-ordered {
    color: #6b7280;
}

.check-mark {
    color: #059669;
    font-weight: 700;
}

.empty-check {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 1px solid #374151;
    vertical-align: middle;
}

.booklist-signatures {
    margin-top: 24px;
    font-size: 13px;
}

.sign-date {
    margin: 0 0 16px;
}

.sign-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.sign-line {
    border-bottom: 1px solid #111827;
    height: 48px;
    margin-bottom: 6px;
}

.sign-box p {
    margin: 0;
}

.booklist-notes {
    margin-top: 20px;
    font-size: 12px;
    line-height: 1.6;
}

.booklist-notes ol {
    margin: 8px 0 0;
    padding-left: 20px;
}

.booklist-footer-meta {
    margin-top: 16px;
    font-size: 12px;
    color: #64748b;
}

@media print {
    .no-print {
        display: none !important;
    }

    .booklist-print-page {
        padding: 0;
        background: #fff;
    }

    .booklist-sheet {
        box-shadow: none;
        padding: 0;
        max-width: none;
    }
}

@media (max-width: 1000px) {
    .ticket-check-card {
        grid-template-columns: 1fr;
    }

    .ticket-check-text h2,
    .ticket-order-panel .panel-title {
        font-size: 26px;
    }

    .ticket-check-text h2::before {
        font-size: 14px;
    }

    .ticket-form-grid {
        grid-template-columns: 1fr;
    }

    .sign-grid {
        grid-template-columns: 1fr;
    }
}
