@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;600;700;800&display=swap');

:root {
    --bg-deep-1: #03111f;
    --bg-deep-2: #06243c;
    --bg-deep-3: #0a3d5c;
    --bloom-cyan: rgba(72, 198, 255, 0.16);
    --bloom-aqua: rgba(46, 128, 173, 0.22);
    --bloom-ice: rgba(181, 232, 255, 0.08);
}

body {
    font-family: 'Nunito Sans', sans-serif;
    background:
        radial-gradient(circle at 18% 16%, var(--bloom-cyan) 0%, rgba(72, 198, 255, 0) 28%),
        radial-gradient(circle at 82% 12%, var(--bloom-aqua) 0%, rgba(46, 128, 173, 0) 30%),
        radial-gradient(circle at 50% 78%, var(--bloom-ice) 0%, rgba(181, 232, 255, 0) 34%),
        linear-gradient(180deg, var(--bg-deep-1) 0%, var(--bg-deep-2) 48%, var(--bg-deep-3) 100%);
    margin: 0;
    padding: 24px;
    color: #000e3a;
    min-height: 100vh;
    box-sizing: border-box;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
}

body.modal-open {
    overflow: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 28% 30%, rgba(133, 221, 255, 0.10) 0%, rgba(133, 221, 255, 0) 24%),
        radial-gradient(circle at 72% 58%, rgba(23, 108, 153, 0.16) 0%, rgba(23, 108, 153, 0) 26%);
    mix-blend-mode: screen;
    opacity: 0.9;
    z-index: 0;
}

* {
    font-family: inherit;
}

.site-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 auto 20px;
    max-width: 900px;
}

.site-header img {
    width: 54px;
    height: auto;
    display: block;
}

.site-header-title {
    margin: 0;
    color: #f2f7ff;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.3px;
    text-align: left;
}

h1 {
    text-align: center;
    color: #004d99;
}

h4 {
    font-style: italic;
    color: gray;
    font-size: 0.8em;
    margin-top: 3px;
    font-weight: 500;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(244, 249, 255, 0.94) 100%);
    padding: 20px;
    border-radius: 14px;
    border: 1px solid rgba(153, 204, 230, 0.28);
    box-shadow: 0 28px 60px rgba(1, 10, 22, 0.38);
    backdrop-filter: blur(6px);
}

.tab {
    overflow: hidden;
    border-bottom: 2px solid #0c5f8e;
    background: linear-gradient(180deg, #e8f2fb 0%, #dceaf7 100%);
    border-radius: 10px 10px 0 0;
    display: flex;
    flex-wrap: wrap;
}

.tab button {
    background-color: inherit;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 16px;
    transition: 0.3s;
    font-size: 15px;
    font-weight: bold;
    color: #555;
}

.tab button:hover {
    background-color: rgba(12, 95, 142, 0.12);
}

.tab button.active {
    background: linear-gradient(180deg, #0f5e8d 0%, #0a496f 100%);
    color: white;
}

.tabcontent {
    display: none;
    padding: 20px 0;
    animation: fadeEffect 1s;
}

@keyframes fadeEffect {
    from { opacity: 0; }
    to { opacity: 1; }
}

label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    color: #004d99;
}

.warning-label {
    color: #ffffff;
    background-color: #bf0000;
    padding: 5px;
    border-radius: 5px;
    margin-top: 15px;
}

textarea,
input[type="text"],
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
}

textarea {
    resize: none;
    overflow: hidden;
}

.auto-resize-textarea {
    resize: none;
    overflow: hidden;
    min-height: 38px;
}

.tropical-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.tropical-card {
    border: 1px solid #d7e1ee;
    border-radius: 8px;
    padding: 14px;
    background-color: #f8fbff;
}

.tropical-card > h3 {
    margin: 0 0 2px;
    color: #004d99;
    font-size: 17px;
    line-height: 1.2;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 2px;
    flex-wrap: nowrap;
}

.card-header h3 {
    margin: 0;
    color: #004d99;
    font-size: 17px;
    line-height: 1.2;
    min-width: 0;
    flex: 1 1 auto;
}

.card-header .time-select {
    width: 78px;
    min-width: 78px;
    margin: 0;
    padding: 8px 6px;
    font-weight: 700;
    text-align: center;
    flex: 0 0 auto;
}

.tropical-card img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 0 10px;
    border-radius: 6px;
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.tropical-image-link {
    display: block;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.tropical-image-link:hover img {
    transform: scale(1.03);
    box-shadow: 0 10px 22px rgba(0, 44, 95, 0.24);
    filter: brightness(1.03);
}

.med-full-box {
    width: 100%;
    max-width: 100%;
    margin-top: 16px;
    box-sizing: border-box;
    overflow: hidden;
}

.editable-title-input {
    width: 100%;
    margin-bottom: 10px;
    font-weight: 700;
    color: #004d99;
    background: #fff;
}

.image-upload-label {
    display: inline-block;
    margin-bottom: 10px;
    font-weight: 700;
    color: #004d99;
}

.upload-preview {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 0;
    cursor: pointer;
    min-height: 180px;
    object-fit: cover;
    border: 1px dashed #9bb3cc;
    background: #eef4fb;
}

.upload-preview-wrap {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    margin: 0 0 10px;
    cursor: pointer;
}

.upload-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 16px;
    background: rgba(0, 0, 0, 0);
    opacity: 0;
    transition: background 0.22s ease;
    pointer-events: none;
}

.upload-preview-wrap:hover .upload-overlay {
    background: rgba(0, 0, 0, 0.45);
    opacity: 1;
}

.ship-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.ship-row select {
    flex: 1;
    margin-bottom: 0;
}

.ship-row input {
    flex: 3;
    margin-bottom: 0;
}

.btn-add,
.btn-remove {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.btn-add {
    background-color: #28a745;
    color: white;
    margin-top: 5px;
}

.btn-add:hover {
    background-color: #218838;
}

.btn-remove {
    background-color: #dc3545;
    color: white;
}

.btn-remove:hover {
    background-color: #c82333;
}

.btn-submit {
    display: block;
    width: 100%;
    background-color: #004d99;
    color: white;
    padding: 15px;
    font-size: 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 30px;
}

.btn-submit:hover {
    background-color: #003366;
}

.btn-secondary {
    background: #eef4fb;
    color: #0f4c75;
    border: 1px solid #bdd2e6;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #deebf8;
}

.save-status {
    margin-top: 14px;
    font-size: 14px;
    color: #35516b;
    text-align: right;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(3, 17, 31, 0.58);
    backdrop-filter: blur(5px);
}

.modal-overlay[hidden] {
    display: none !important;
}

.modal-dialog {
    width: min(560px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
    border: 1px solid rgba(153, 204, 230, 0.42);
    border-radius: 16px;
    box-shadow: 0 28px 60px rgba(1, 10, 22, 0.32);
    padding: 22px;
}

.modal-header,
.modal-footer,
.modal-actions-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.modal-header {
    margin-bottom: 10px;
}

.modal-header h2 {
    margin: 0;
    color: #0f5e8d;
    font-size: 24px;
    line-height: 1.1;
}

.modal-close {
    border: none;
    background: transparent;
    color: #557189;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.modal-copy {
    margin: 0 0 16px;
    color: #35516b;
}

.modal-actions-top {
    justify-content: flex-start;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.section-checklist {
    display: grid;
    gap: 10px;
}

.section-checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #d7e1ee;
    border-radius: 10px;
    background: #f8fbff;
    color: #10233b;
    font-weight: 600;
}

.section-checklist-item input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #0f5e8d;
}

.modal-footer {
    justify-content: flex-end;
    margin-top: 18px;
    flex-wrap: wrap;
}

.modal-submit {
    width: auto;
    min-width: 160px;
    margin-top: 0;
}

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

    .modal-dialog {
        padding: 18px;
    }

    .modal-header h2 {
        font-size: 21px;
    }
}
