* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: #f2f4f7;
    color: #1f2937;
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 32px;
    width: 100%;
    max-width: 420px;
}

.card h1 {
    font-size: 1.3rem;
    margin: 0 0 6px;
}

.card p.subtitle {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0 0 24px;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    margin-top: 16px;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

textarea {
    resize: vertical;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.g-recaptcha {
    margin-top: 18px;
}

button {
    margin-top: 22px;
    width: 100%;
    padding: 12px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

button:hover { background: #1d4ed8; }

.notice {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
}

.notice.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.notice.info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.result-icon {
    font-size: 2.2rem;
    margin-bottom: 8px;
}

a.back-link {
    display: inline-block;
    margin-top: 20px;
    color: #2563eb;
    text-decoration: none;
    font-size: 0.9rem;
}

/* ---- Admin panel ---- */

body.admin {
    display: block;
    align-items: unset;
    justify-content: unset;
    padding: 0;
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 14px 24px;
}

.admin-nav-brand {
    font-weight: 700;
    margin-right: 8px;
}

.admin-nav a {
    color: #4b5563;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.admin-nav a:hover,
.admin-nav a.active {
    color: #2563eb;
}

.admin-nav-spacer {
    flex: 1;
}

.admin-nav-user {
    color: #6b7280;
    font-size: 0.85rem;
}

.admin-nav-logout {
    margin: 0;
}

.admin-nav-logout button {
    margin: 0;
    width: auto;
    padding: 6px 14px;
    font-size: 0.85rem;
    background: #f3f4f6;
    color: #374151;
}

.admin-nav-logout button:hover {
    background: #e5e7eb;
}

.admin-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}

.admin-main h1 {
    margin-top: 0;
}

.admin-hint {
    color: #6b7280;
    font-size: 0.85rem;
}

.admin-form {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.admin-form h3 {
    margin-top: 0;
}

.admin-form button {
    width: auto;
    padding: 10px 20px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px 20px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
}

.stat-label {
    color: #6b7280;
    font-size: 0.82rem;
    margin-top: 4px;
}

.admin-search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.admin-search input[type="text"] {
    max-width: 440px;
}

.admin-search button {
    margin: 0;
    width: auto;
    padding: 10px 18px;
}

.admin-search a {
    color: #6b7280;
    font-size: 0.85rem;
    text-decoration: none;
}

.admin-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.admin-row-actions form {
    display: inline;
}

.admin-row-actions button {
    margin: 0;
    width: auto;
    padding: 3px 8px;
    font-size: 0.75rem;
    background: #f3f4f6;
    color: #374151;
}

.admin-row-actions button:hover {
    background: #e5e7eb;
}

.admin-row-actions button.btn-warning {
    background: #fff7ed;
    color: #9a3412;
}

.admin-row-actions button.btn-warning:hover {
    background: #ffedd5;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: default;
}

.status-badge.badge-active {
    background: #dcfce7;
    color: #166534;
}

.status-badge.badge-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.badge-unknown {
    background: #f3f4f6;
    color: #6b7280;
}

.admin-table-wrap {
    overflow-x: auto;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 10px 16px;
    border-bottom: 1px solid #f3f4f6;
    white-space: nowrap;
}

.admin-table th {
    color: #6b7280;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
}

.admin-pagination {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    font-size: 0.88rem;
}

.admin-pagination a {
    color: #2563eb;
    text-decoration: none;
}

/* ==========================================================
   Homepage / landing page (index.php only - scoped under
   body.landing so send_credentials.php's result page,
   admin/login.php, and bootstrap_admin.php keep today's plain
   centered-card layout from the base body/.card rules above)
   ========================================================== */

body.landing {
    display: block;
    align-items: unset;
    justify-content: unset;
    padding: 0;
    background: #f8fafc;
}

.landing-form-inner,
.landing-faq-inner,
.landing-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
}

/* ---- Hero & steps: pre-composed banner images (user-supplied) ----
   These two sections are single full-width graphics with their own text
   and illustrations already baked in, not built from HTML text + CSS -
   see CLAUDE.md for why (and why the alt text below spells out the image's
   content for screen readers, since the visible text isn't real text). */

.landing-hero,
.landing-steps {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

.landing-hero img,
.landing-steps img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
}

/* Two versions of the hero/steps banner: a wide desktop pair
   (hero.jpg + steps.jpg) and a single tall mobile-optimized graphic
   (mobile.jpg) combining both - only one is shown at a time. */
.landing-mobile-only { display: none; }

@media (max-width: 768px) {
    .landing-desktop-only { display: none; }
    .landing-mobile-only { display: block; }
}

/* ---- Form + "before you start" ---- */

.landing-form-section {
    padding: 0 24px 40px;
}

.landing-form-inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 20px;
    align-items: start;
}

.landing-form-card,
.landing-info-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 28px;
}

.landing-form-card form button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.landing-info-card {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.landing-info-card h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-size: 1rem;
}

.landing-info-card .info-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: #2563eb;
}

.landing-info-card > p {
    font-size: 0.88rem;
    color: #374151;
    margin: 0 0 14px;
}

.checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checklist li {
    position: relative;
    padding-left: 26px;
    font-size: 0.85rem;
    color: #374151;
    line-height: 1.4;
}

.checklist li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    font-size: 0.7rem;
    line-height: 18px;
    text-align: center;
}

/* ---- FAQ cards ---- */

.landing-faq {
    padding: 0 24px 40px;
}

.landing-faq-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.faq-card {
    border-radius: 12px;
    padding: 22px;
    border: 1px solid transparent;
}

.faq-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 10px;
}

.faq-card h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.faq-card p {
    font-size: 0.85rem;
    line-height: 1.55;
    color: #374151;
    margin: 0 0 10px;
}

.faq-highlight {
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
    padding: 10px 12px;
    font-weight: 600;
    font-size: 0.82rem !important;
}

.faq-purple { background: #f5f3ff; border-color: #ddd6fe; }
.faq-purple .faq-icon { color: #7c3aed; }
.faq-purple h3 { color: #5b21b6; }

.faq-green { background: #f0fdf4; border-color: #bbf7d0; }
.faq-green .faq-icon { color: #16a34a; }
.faq-green h3 { color: #166534; }

.faq-orange { background: #fff7ed; border-color: #fed7aa; }
.faq-orange .faq-icon { color: #ea580c; }
.faq-orange h3 { color: #9a3412; }

/* ---- Footer help bar ---- */

.landing-footer {
    background: #eef2ff;
    border-top: 1px solid #e0e7ff;
    padding: 24px;
}

.landing-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.landing-footer-text {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #374151;
}

.landing-footer-text svg {
    width: 24px;
    height: 24px;
    color: #2563eb;
    flex-shrink: 0;
}

.landing-footer-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
}

.landing-footer-btn:hover {
    background: #1d4ed8;
}

.landing-footer-btn svg {
    width: 16px;
    height: 16px;
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
    .landing-form-inner,
    .landing-faq-inner {
        grid-template-columns: 1fr;
    }
}
