* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 40px 20px;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #1a0b2e 0%, #2d1245 50%, #4a1942 100%);
    background-attachment: fixed;
    color: #fdf2f8;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: var(--bg-image, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.5;
}

.container {
    max-width: 600px;
    margin: auto;
    padding: 32px;
    background: rgba(45, 18, 69, 0.85);
    border: 1px solid #a855f7;
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(236, 72, 153, 0.25);
}

h1 {
    margin-top: 0;
    background: linear-gradient(90deg, #f472b6, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #f472b6; /* fallback */
}

form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

label {
    font-weight: bold;
    font-size: 14px;
    color: #f9a8d4;
}

input {
    padding: 12px;
    border: 1px solid #7e22ce;
    border-radius: 8px;
    background: #1a0b2e;
    color: #fdf2f8;
}

input::placeholder {
    color: #a78bba;
}

input:focus {
    outline: none;
    border-color: #ec4899;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.3);
}

button {
    margin-top: 12px;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(90deg, #ec4899, #a855f7);
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

button:hover {
    background: linear-gradient(90deg, #db2777, #9333ea);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(236, 72, 153, 0.4);
}

.output,
.error {
    margin-top: 28px;
    padding: 20px;
    border-radius: 10px;
}

.output {
    background: #1a0b2e;
    border: 1px solid #ec4899;
}

.output pre {
    white-space: pre-wrap;
    line-height: 1.8;
    color: #fbcfe8;
}

.error {
    background: #4c0d3a;
    border: 1px solid #f472b6;
    color: #fbcfe8;
}

@media (max-width: 500px) {
    body {
        padding: 20px 12px;
    }

    .container {
        padding: 22px;
    }
}

.nav-link {
    display: inline-block;
    margin-bottom: 16px;
    color: #f9a8d4;
    text-decoration: none;
    font-size: 14px;
}

.nav-link:hover {
    color: #c084fc;
    text-decoration: underline;
}

.nav-button {
    display: inline-block;
    margin-bottom: 16px;
    padding: 10px 16px;
    border-radius: 8px;
    background: linear-gradient(90deg, #ec4899, #a855f7);
    color: white;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
}

.nav-button:hover {
    background: linear-gradient(90deg, #db2777, #9333ea);
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.nav-bar .nav-button {
    margin-bottom: 0;
}

.container-wide {
    max-width: 96vw;
}

.table-wrap {
    overflow-x: auto;
    margin-top: 20px;
    border: 1px solid #7e22ce;
    border-radius: 10px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 10px 8px;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid rgba(168, 85, 247, 0.35);
}

.data-table th {
    background: #1a0b2e;
    color: #f9a8d4;
}

.data-table tbody tr:hover {
    background: rgba(236, 72, 153, 0.12);
}

/* ---------- Edit / delete buttons in the table ---------- */

/* ---------- Edit / delete buttons in the table ---------- */

.data-table td {
    vertical-align: middle;
}

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

/* The global form rule adds a top margin and column layout, so reset it here */
.data-table .actions-wrap form {
    display: block;
    margin: 0;
    gap: 0;
}

.data-table .action-btn {
    display: inline-block;
    margin: 0;
    padding: 5px 10px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(90deg, #ec4899, #a855f7);
    color: white;
    font-family: inherit;
    font-size: 12px;
    font-weight: bold;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.data-table .action-btn:hover {
    background: linear-gradient(90deg, #db2777, #9333ea);
    transform: none;
    box-shadow: none;
}

/* ---------- Add button above the table ---------- */
.table-toolbar {
    display: flex;
    justify-content: flex-start;
    margin-top: 20px;
}

.table-toolbar .nav-button {
    margin-bottom: 0;
}

.table-toolbar + .table-wrap {
    margin-top: 12px;
}

/* ---------- Public overview page ---------- */

.container-medium {
    max-width: 1100px;
}

.intro {
    margin: 0;
    color: #f9a8d4;
}

.tier-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 28px;
}

.tier-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: #1a0b2e;
    border: 1px solid #7e22ce;
    border-radius: 12px;
}

.tier-card:hover {
    border-color: #ec4899;
}

.tier-label {
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #f9a8d4;
}

.tier-card h2 {
    margin: 6px 0 10px;
    font-size: 20px;
}

.tier-card .tier-desc {
    margin: 0 0 14px;
    line-height: 1.5;
    color: #fbcfe8;
}

.tier-includes {
    margin: 0 0 18px;
    padding-left: 18px;
    line-height: 1.6;
    font-size: 14px;
    color: #fbcfe8;
}

.tier-card .tier-meta {
    margin: auto 0 4px;
    font-size: 13px;
    color: #a78bba;
}

.tier-card .tier-price {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: #fdf2f8;
}

.cta-wrap {
    margin-top: 28px;
    text-align: center;
}

.cta-wrap .nav-button {
    margin: 0;
    padding: 14px 32px;
    font-size: 16px;
}

@media (max-width: 900px) {
    .tier-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .tier-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Tier photos and list style ---------- */

.tier-photo {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin-bottom: 14px;
    border-radius: 8px;
}

.tier-card h2 {
    margin: 0 0 10px;
}

.tier-includes {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
    line-height: 1.7;
    font-size: 14px;
    color: #fbcfe8;
}

.tier-includes li::before {
    content: "♡ ";
    color: #f472b6;
}