﻿* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 48px 16px;
    background: linear-gradient(160deg, #16213e 0%, #1f2f5c 55%, #3d1520 100%);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
}

table.main {
    width: 100%;
    max-width: 960px;
    margin: 0 auto 32px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.site-title {
    padding: 36px 24px 8px;
}

.site-title-ar,
.site-title-en {
    margin: 0;
    line-height: 1.4;
}

.site-title-ar {
    direction: rtl;
    font-size: 30px;
    font-weight: 700;
    color: #16213e;
}

.site-title-en {
    margin-top: 8px;
    font-size: 28px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #b00020;
}

.msg-ar,
.msg-en {
    padding: 6px 32px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.8;
}

.msg-ar {
    direction: rtl;
    color: #b00020;
}

.msg-en {
    color: #4a4a4a;
}

.main a {
    color: #b00020;
    font-weight: 700;
    text-decoration: none;
}

.main a:hover,
.main a:focus {
    color: #87001a;
    text-decoration: underline;
}

.cta {
    padding-top: 24px;
}

.cta a {
    display: inline-block;
    margin: 6px 0;
    padding: 14px 52px;
    background: #b00020;
    color: #ffffff;
    font-size: 18px;
    letter-spacing: 0.5px;
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(176, 0, 32, 0.35);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.cta a:hover,
.cta a:focus {
    background: #87001a;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
}

hr.divider {
    width: 80%;
    margin: 10px auto;
    border: none;
    border-top: 2px solid #ececec;
}

/* ---------- Registration page (reg/index.asp) ---------- */

.card {
    width: 100%;
    max-width: 960px;
    margin: 0 auto 32px;
    padding: 36px 40px 44px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.banner-wrap {
    width: 100%;
    max-width: 960px;
    margin: -28px auto 28px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.banner-wrap img {
    display: block;
    width: 100%;
    height: auto;
}

.title-en,
.title-ar {
    margin: 0;
    text-align: center;
    line-height: 1.4;
}

.title-en {
    font-size: 26px;
    font-weight: 700;
    color: #16213e;
}

.title-ar {
    margin-top: 8px;
    font-size: 22px;
    font-weight: 700;
    color: #b00020;
}

.intro {
    margin-top: 28px;
    text-align: center;
    font-size: 15px;
    color: #4a4a4a;
    line-height: 1.9;
}

.intro p {
    margin: 4px 0;
}

.notice {
    margin-top: 20px;
    padding: 10px 18px;
    background: #6699ff;
    border-radius: 8px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #000000;
}

.error-msg {
    margin-top: 16px;
    padding: 10px 18px;
    background: #cc0000;
    border-radius: 8px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
}

.card form {
    margin-top: 28px;
}

.field {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 480px) 1fr;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.lbl-en {
    justify-self: start;
    font-size: 14px;
    font-weight: 600;
    color: #b00020;
}

.lbl-ar {
    justify-self: end;
    font-size: 15px;
    font-weight: 600;
    color: #b00020;
}

.input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.req {
    color: #cc0000;
    font-weight: 700;
}

.card input[type="text"] {
    width: 100%;
    padding: 9px 12px;
    font-family: inherit;
    font-size: 15px;
    color: #16213e;
    border: 1px solid #c5cad6;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card input[type="text"]:focus {
    border-color: #6699ff;
    box-shadow: 0 0 0 3px rgba(102, 153, 255, 0.25);
}

.card input[type="text"]:disabled {
    background: #f2f4f8;
    color: #5a6070;
    font-weight: 700;
    cursor: not-allowed;
}

.card select {
    padding: 8px 10px;
    font-family: inherit;
    font-size: 14.5px;
    color: #16213e;
    border: 1px solid #c5cad6;
    border-radius: 8px;
    background: #ffffff;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card select:focus {
    border-color: #6699ff;
    box-shadow: 0 0 0 3px rgba(102, 153, 255, 0.25);
}

.phone-wrap {
    flex-wrap: wrap;
}

.phone-wrap select {
    flex: 0 0 auto;
    min-width: 110px;
}

.field-captcha {
    align-items: start;
}

.captcha-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-row img[id="imgCaptcha"] {
    border-radius: 6px;
    border: 1px solid #c5cad6;
}

.captcha-hint {
    font-size: 13.5px;
    font-weight: 600;
    color: #b00020;
    line-height: 1.8;
}

.captcha-box input[type="text"] {
    width: 180px;
}

.actions {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 480px) 1fr;
    gap: 12px;
    margin-top: 8px;
}

.actions input[type="submit"] {
    grid-column: 2;
    justify-self: center;
    padding: 12px 60px;
    background: #b00020;
    color: #ffffff;
    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(176, 0, 32, 0.35);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.actions input[type="submit"]:hover,
.actions input[type="submit"]:focus {
    background: #87001a;
    transform: translateY(-2px);
}

/* ---------- Message & print pages (msg.asp, preprint.asp) ---------- */

.msg-body {
    margin-top: 28px;
    text-align: center;
}

.msg-error {
    font-size: 16px;
    font-weight: 700;
    color: #d40000;
    line-height: 1.9;
}

.msg-info {
    font-size: 15.5px;
    font-weight: 600;
    color: #16213e;
    line-height: 1.9;
}

.help-line {
    margin-top: 24px;
    font-size: 14px;
    font-weight: 600;
    color: #4a4a4a;
}

.important-msg {
    margin-top: 28px;
    padding: 14px 20px;
    background: #fff4e5;
    border: 1px solid #f5c26b;
    border-inline-start: 5px solid #e68900;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #7a4a00;
    line-height: 1.9;
}

.important-msg::before {
    content: "!";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    vertical-align: middle;
    margin-inline-end: 12px;
    width: 24px;
    height: 24px;
    background: #e68900;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    border-radius: 50%;
}

.important-msg a {
    color: #b00020;
    text-decoration: underline;
}

.important-msg a:hover,
.important-msg a:focus {
    color: #87001a;
}

span.important-msg {
    display: inline-block;
    text-align: center;
    min-width: 80%;
}

.done-note {
    margin-top: 18px;
    text-align: center;
    font-size: 19px;
    font-weight: 700;
    color: #16213e;
}

.imp-ar,
.imp-en {
    display: block;
    margin: 0;
}

.imp-ar {
    direction: rtl;
    font-size: 18px;
    font-weight: 700;
    color: #7a4a00;
    line-height: 1.7;
}

.imp-en {
    font-size: 14px;
    font-weight: 600;
    color: #9c6a10;
    margin-top: 6px;
    line-height: 1.6;
}

.help-line a,
.card .intro a {
    color: #b00020;
    font-weight: 700;
    text-decoration: none;
}

.help-line a:hover,
.card .intro a:hover {
    color: #87001a;
    text-decoration: underline;
}

.actions-center {
    margin-top: 20px;
    text-align: center;
}

.btn-pill {
    display: inline-block;
    padding: 12px 60px;
    background: #b00020;
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(176, 0, 32, 0.35);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-pill:hover,
.btn-pill:focus {
    background: #87001a;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
}

.buy-ticket {
    border-top: 2px solid #ececec;
    padding-top: 28px;
}

.tailors {
    width: 100%;
    margin-top: 28px;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 10px;
    font-size: 15px;
}

.tailors th {
    background: #16213e;
    color: #ffffff;
    font-weight: 700;
}

.tailors th,
.tailors td {
    padding: 12px 14px;
    text-align: center;
}

.tailors tbody tr:nth-child(even) {
    background: #eef1f7;
}

.tailors tbody tr:nth-child(odd) {
    background: #f8f9fc;
}

.tailors td a {
    color: #b00020;
    font-weight: 700;
    text-decoration: none;
}

.tailors td a:hover {
    color: #87001a;
    text-decoration: underline;
}

.notes {
    margin-top: 28px;
    padding: 18px 22px;
    background: #f8f9fc;
    border-inline-start: 4px solid #b00020;
    border-radius: 8px;
    font-size: 14.5px;
    color: #3c4048;
    line-height: 2;
}

.notes p {
    margin: 0;
}

.notes-title {
    color: #b00020 !important;
    margin-bottom: 8px !important;
}

.notes .hl {
    color: #cc0000;
    font-weight: 700;
}

.msg-center {
    text-align: center;
}

/* ---------- Print page (print.asp) ---------- */

.intro.warning p {
    color: #d40000;
    font-weight: 600;
}

.details {
    margin-top: 28px;
    border: 1px solid #e0e4ec;
    border-radius: 12px;
    overflow: hidden;
}

.details-header {
    background: #16213e;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 12px 20px;
}

.detail-row {
    display: grid;
    grid-template-columns: 190px 1fr;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid #eef0f5;
}

.detail-row:nth-child(odd) {
    background: #f8f9fc;
}

.detail-row .lbl-en {
    flex: none;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8a5560;
}

.detail-value {
    font-size: 15.5px;
    font-weight: 700;
    color: #16213e;
    word-break: break-word;
}

@media print {
    @page {
        margin: 14mm;
    }

    body {
        background: #ffffff;
        padding: 0;
        display: block;
    }

    .card {
        max-width: none;
        width: auto;
        margin: 0;
        padding: 0;
        box-shadow: none;
        border-radius: 0;
    }

    .actions-center,
    .btn-pill,
    .banner-wrap,
    .important-msg::before {
        display: none !important;
    }

    .title-en {
        color: #000000;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .details-header,
    .tailors th {
        background: #16213e !important;
        color: #ffffff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .detail-row:nth-child(odd),
    .tailors tbody tr:nth-child(even) {
        background: #f2f4f8 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .intro.warning p,
    .msg-error,
    .notes .hl,
    .detail-value {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ---------- Payment pages (BuyTickets.asp, paystatus.asp) ---------- */

.attention-title {
    font-size: 17px;
    font-weight: 700;
    color: #b00020;
    margin-bottom: 8px !important;
}

.tickets-value {
    line-height: 2;
}

.ticket-count {
    color: #2a4db8;
}

.ticket-count.paid {
    color: #b00020;
}

.status-banner {
    margin-top: 28px;
    padding: 18px 22px;
    border-radius: 10px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.status-banner.success {
    background: #1e7e34;
    border: 2px solid #166027;
    box-shadow: 0 8px 20px rgba(30, 126, 52, 0.45);
}

.status-banner.fail {
    background: #cc3300;
    box-shadow: 0 6px 16px rgba(204, 51, 0, 0.35);
}

@media print {
    .status-banner.success {
        background: #1e7e34 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ---------- Admin panel pages (mngr) ---------- */

.admin-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

.exit-link {
    padding: 7px 26px;
    background: #ffffff;
    border: 1px solid #e0e4ec;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    color: #b00020 !important;
    text-decoration: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.exit-link:hover,
.exit-link:focus {
    background: #f6f7fa;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

@media (max-width: 720px) {
    .detail-row {
        grid-template-columns: 1fr;
        gap: 2px;
        padding: 10px 16px;
    }

    .site-title {
        padding: 24px 16px 4px;
    }

    .site-title-ar {
        font-size: 21px;
    }

    .site-title-en {
        font-size: 15px;
        letter-spacing: 1px;
    }

    .msg-ar,
    .msg-en {
        padding: 6px 20px;
    }

    .title-en {
        font-size: 21px;
    }

    .title-ar {
        font-size: 19px;
    }

    .field,
    .actions {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .lbl-ar {
        justify-self: start;
        order: 3;
    }

    .field-captcha .lbl-ar,
    .captcha-row .lbl-ar {
        order: 0;
    }

    .captcha-row .lbl-ar {
        margin-inline-start: auto;
    }

    .card {
        padding: 28px 20px 34px;
        margin-bottom: 24px;
    }

    .banner-wrap {
        margin: -20px auto 20px;
        border-radius: 12px;
    }
}
