* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: linear-gradient(135deg, #ffe6f1 0%, #ffe6f1 50%, #e6f4ff 50%, #e6f4ff 100%);
    color: #333;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

.topbar {
    width: 100%;
    padding: 16px 28px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 90px;
    width: auto;
    display: block;
}

.topbar > div:last-child {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.topbar a {
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.45);
    transition: 0.2s ease;
}

.topbar a:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 30px auto 70px;
}

.page-header {
    margin-bottom: 22px;
}

.page-header h1 {
    margin: 0;
    font-size: 34px;
    color: #2d2d2d;
}

.page-header p {
    margin: 8px 0 0;
    opacity: 0.78;
}

.card {
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 26px;
    padding: 26px;
    margin-bottom: 24px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(12px);
}

.card.soft {
    background: rgba(255, 255, 255, 0.45);
}

.card h2 {
    margin: 0 0 18px;
    color: #2d2d2d;
}

.card h3 {
    margin: 0 0 12px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-grid .full {
    grid-column: 1 / -1;
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 7px;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    font-family: inherit;
    font-size: 15px;
    outline: none;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(255, 117, 164, 0.7);
    box-shadow: 0 0 0 4px rgba(255, 117, 164, 0.12);
}

small {
    color: #666;
}

.actions,
.quick-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 18px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    background: rgba(255, 255, 255, 0.82);
    color: #333;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}

.btn:hover {
    transform: translateY(-1px);
    background: #fff;
}

.btn.primary {
    background: linear-gradient(135deg, #ff85b3, #8fcfff);
    color: #fff;
}

.btn.danger {
    background: #ff5c77;
    color: #fff;
}

.btn.small {
    padding: 8px 12px;
    font-size: 13px;
}

.flash {
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 18px;
    font-weight: 600;
}

.flash.success {
    background: rgba(90, 200, 120, 0.2);
    border: 1px solid rgba(90, 200, 120, 0.45);
}

.flash.error {
    background: rgba(255, 80, 100, 0.18);
    border: 1px solid rgba(255, 80, 100, 0.45);
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

th,
td {
    text-align: left;
    padding: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    vertical-align: top;
}

th {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.72;
}

td input,
td select,
td textarea {
    min-width: 140px;
}

.badge {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge.success {
    background: rgba(60, 190, 110, 0.16);
    color: #16733b;
}

.badge.muted {
    background: rgba(0, 0, 0, 0.08);
    color: #555;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 15px;
}

.info-grid div {
    background: rgba(255, 255, 255, 0.45);
    border-radius: 18px;
    padding: 16px;
}

.info-grid p {
    margin: 8px 0 0;
}

.hint {
    opacity: 0.8;
    font-size: 14px;
}

/* Login pages */

.login-box {
    max-width: 460px;
    margin: 60px auto;
}

.login-box h1,
.login-box h2 {
    text-align: center;
}

.login-box .btn {
    width: 100%;
}

/* Portal gift/payment editor */

.gift-editor {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.gift-edit-card {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 20px;
    padding: 18px;
}

.check-title {
    display: flex;
    gap: 10px;
    align-items: center;
    font-weight: 700;
    margin-bottom: 12px;
}

.check-title input {
    width: auto;
}

.gift-fields {
    display: none;
    margin-top: 10px;
}

.gift-fields label {
    margin-top: 10px;
}

/* Partners admin */

.partner-logo-small {
    max-width: 80px;
    max-height: 60px;
    object-fit: contain;
    display: block;
    margin-bottom: 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
    padding: 6px;
}

.partner-logo-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    min-height: 48px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.06);
    color: #666;
    font-size: 12px;
    padding: 8px;
    margin-bottom: 8px;
}

.partner-logo-placeholder.big {
    width: 110px;
    height: 80px;
    margin: 0 auto 12px;
}

.partner-approval-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.partner-approval-card {
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 22px;
    padding: 18px;
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 18px;
    align-items: start;
}

.partner-approval-logo img {
    max-width: 110px;
    max-height: 90px;
    object-fit: contain;
    display: block;
    margin: auto;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    padding: 8px;
}

.partner-approval-content h3 {
    margin: 0 0 8px;
}

/* Public invitation page */

.invitation-body {
    background: linear-gradient(135deg, #ffe6f1 0%, #ffe6f1 50%, #e6f4ff 50%, #e6f4ff 100%);
    min-height: 100vh;
}

.invitation-shell {
    width: min(900px, calc(100% - 24px));
    margin: 0 auto;
    padding: 26px 0 70px;
    position: relative;
}

.corner-logo {
    text-align: center;
    margin-bottom: 14px;
}

.corner-logo img {
    height: 95px;
    width: auto;
}

.invite-hero {
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 34px;
    padding: 54px 26px;
    text-align: center;
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(14px);
}

.invite-hero .small-title,
.partners-footer .small-title {
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 13px;
    font-weight: 800;
    opacity: 0.7;
    margin: 0 0 12px;
    text-align: center;
}

.invite-hero h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(42px, 8vw, 82px);
    line-height: 1.05;
    margin: 0;
    color: #2c2c2c;
}

.invite-hero h1 span {
    color: #ff7eb3;
}

.date-line {
    font-size: 20px;
    font-weight: 700;
    margin: 18px 0 0;
}

.welcome-line {
    max-width: 680px;
    margin: 18px auto 0;
    font-size: 18px;
    line-height: 1.7;
}

.invite-section {
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 28px;
    padding: 26px;
    margin-top: 22px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.07);
    backdrop-filter: blur(12px);
}

.invite-section h2 {
    text-align: center;
    margin: 0 0 18px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 32px;
}

.video-frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    background: #000;
}

.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.invitation-image {
    width: 100%;
    display: block;
    border-radius: 24px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.10);
}

.quote-section {
    text-align: center;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    line-height: 1.7;
}

.journey-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.journey-card {
    background: rgba(255, 255, 255, 0.68);
    border-radius: 22px;
    padding: 20px;
    text-align: center;
}

.journey-card h3 {
    margin: 0 0 10px;
    color: #333;
}

.journey-card p {
    margin: 7px 0;
}

.rsvp-section form {
    max-width: 520px;
    margin: 0 auto;
}

.rsvp-section label {
    margin-top: 14px;
}

.rsvp-section .btn {
    width: 100%;
    margin-top: 18px;
}

/* Public invitation gift/payment section */

.gift-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.gift-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 22px;
    padding: 18px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
}

.gift-card h3 {
    margin-top: 0;
}

.gift-card p {
    line-height: 1.6;
}

.copy-btn {
    border: 0;
    padding: 7px 14px;
    border-radius: 999px;
    margin-left: 8px;
    cursor: pointer;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.copy-btn:hover {
    background: #fff;
}

/* Public partners footer */

.partners-footer {
    background: rgba(255, 255, 255, 0.56);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 28px;
    padding: 26px;
    margin-top: 22px;
    text-align: center;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.07);
    backdrop-filter: blur(12px);
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.partner-card {
    background: rgba(255, 255, 255, 0.72);
    border-radius: 22px;
    padding: 18px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.05);
}

.partner-card img {
    max-width: 120px;
    max-height: 85px;
    object-fit: contain;
    display: block;
    margin: 0 auto 12px;
    border-radius: 14px;
}

.partner-card h3 {
    margin: 0 0 8px;
}

.partner-category {
    font-weight: 700;
    opacity: 0.72;
}

/* Responsive */

@media (max-width: 900px) {
    .topbar {
        flex-direction: column;
        align-items: center;
        padding: 14px;
    }

    .topbar > div:last-child {
        justify-content: center;
    }

    .logo img {
        height: 70px;
    }

    .corner-logo img {
        height: 75px;
    }

    .form-grid,
    .info-grid,
    .gift-editor,
    .gift-list,
    .journey-grid,
    .partner-approval-grid,
    .partners-grid {
        grid-template-columns: 1fr;
    }

    .partner-approval-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .container {
        width: min(100% - 22px, 1180px);
        margin-top: 18px;
    }

    .card,
    .invite-section,
    .partners-footer {
        padding: 20px;
        border-radius: 22px;
    }

    table {
        min-width: 900px;
    }
}

@media (max-width: 520px) {
    .topbar a {
        padding: 8px 10px;
        font-size: 13px;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .invite-hero {
        padding: 42px 18px;
    }

    .welcome-line {
        font-size: 16px;
    }

    .invite-section h2 {
        font-size: 26px;
    }

    .copy-btn {
        display: inline-flex;
        margin-left: 0;
        margin-top: 8px;
    }
}

/* Phase 4 - Public Demo Page */

.demo-body {
    background: linear-gradient(135deg, #ffe6f1 0%, #ffe6f1 50%, #e6f4ff 50%, #e6f4ff 100%);
    min-height: 100vh;
}

.demo-shell {
    width: min(1100px, calc(100% - 24px));
    margin: 0 auto;
    padding: 28px 0 80px;
}

.demo-header {
    text-align: center;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 36px;
    padding: 44px 26px;
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(14px);
}

.demo-header h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.05;
    margin: 8px 0 12px;
}

.demo-subtitle {
    max-width: 760px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.7;
}

.demo-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.demo-section {
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 30px;
    padding: 30px;
    margin-top: 24px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.07);
    backdrop-filter: blur(12px);
}

.demo-section h2 {
    text-align: center;
    margin: 0 0 18px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 34px;
}

.demo-center-text {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 22px;
    line-height: 1.7;
}

.demo-feature-grid,
.template-demo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.demo-feature-card,
.template-demo-card {
    background: rgba(255, 255, 255, 0.72);
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.05);
}

.demo-feature-card h3,
.template-demo-card h3 {
    margin-top: 0;
}

.template-demo-card {
    position: relative;
}

.template-price {
    position: absolute;
    top: 18px;
    right: 18px;
    background: linear-gradient(135deg, #ff85b3, #8fcfff);
    color: #fff;
    font-weight: 800;
    border-radius: 999px;
    padding: 8px 13px;
}

.template-demo-card ul {
    padding-left: 20px;
    line-height: 1.8;
}

.demo-video-placeholder {
    min-height: 330px;
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(255,133,179,0.28), rgba(143,207,255,0.28)),
        rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.7);
}

.demo-video-placeholder h3 {
    font-size: 28px;
    margin-bottom: 8px;
}

.demo-invitation-preview {
    width: min(900px, 100%);
    margin: 0 auto;
}

.demo-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.demo-photo-card {
    min-height: 220px;
    border-radius: 24px;
    display: flex;
    align-items: end;
    justify-content: center;
    padding: 18px;
    color: #fff;
    font-weight: 800;
    box-shadow: 0 14px 32px rgba(0,0,0,0.10);
}

.demo-photo-card span {
    background: rgba(0,0,0,0.25);
    padding: 8px 14px;
    border-radius: 999px;
}

.photo-one {
    background: linear-gradient(135deg, #ff9cc3, #ffd2e4);
}

.photo-two {
    background: linear-gradient(135deg, #8fcfff, #d7f0ff);
}

.photo-three {
    background: linear-gradient(135deg, #d7b7ff, #ffe2f0);
}

.demo-partner-logo {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff85b3, #8fcfff);
    color: #fff;
    font-size: 34px;
    font-weight: 900;
}

.script-box {
    max-width: 760px;
    margin: 0 auto;
    background: rgba(255,255,255,0.72);
    border-radius: 24px;
    padding: 22px;
    line-height: 1.8;
}

@media (max-width: 900px) {
    .demo-feature-grid,
    .template-demo-grid,
    .demo-photo-grid {
        grid-template-columns: 1fr;
    }

    .demo-section {
        padding: 22px;
    }
}

/* Guest management / RSVP portal */

.badge.danger {
    background: rgba(255, 92, 119, 0.18);
    color: #b4233f;
}

td input[readonly] {
    background: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    min-width: 280px;
    margin-bottom: 8px;
}

/* WhatsApp sending options */

.whatsapp-option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 16px;
}

.whatsapp-option-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 22px;
    padding: 18px;
    cursor: pointer;
}

.whatsapp-option-card input {
    width: auto;
    margin-top: 5px;
}

.whatsapp-option-card span {
    display: grid;
    gap: 6px;
}

.whatsapp-option-card em {
    display: inline-flex;
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    font-style: normal;
    font-size: 12px;
    font-weight: 800;
}

.disabled-option {
    opacity: 0.65;
}

.whatsapp-status-box {
    margin-top: 18px;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 18px;
    padding: 14px 16px;
}

.whatsapp-status-box span {
    font-weight: 800;
    color: #b4233f;
}

.whatsapp-btn {
    background: rgba(37, 211, 102, 0.18);
}

.disabled-wa {
    opacity: 0.65;
    cursor: not-allowed;
}

@media (max-width: 900px) {
    .whatsapp-option-grid {
        grid-template-columns: 1fr;
    }
}