
/* =========================================
   CAPTAIN'S QUARTERS — DASHBOARD
========================================= */

.captain-dashboard {
    margin-bottom: 25px;
    padding: 22px;
    background: var(--white);
    border: 1px solid rgba(180, 51, 31, 0.4);
    border-radius: 8px;
}

.captain-dashboard[hidden] {
    display: none;
}

.captain-dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(180, 51, 31, 0.2);
}

.captain-dashboard-header h3 {
    margin: 0;
    color: var(--red);
    font-family: var(--font-heading);
    font-size: 17px;
}

.captain-dashboard-header p {
    margin: 6px 0 0;
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 12px;
}

#captain-logout {
    padding: 8px 12px;
    background: transparent;
    color: var(--red);
    border: 1px solid rgba(180, 51, 31, 0.35);
    border-radius: 5px;
    font-family: var(--font-heading);
    font-size: 9px;
    cursor: pointer;
}

#captain-logout:hover {
    background: var(--red);
    color: var(--white);
}

.captain-dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-top: 18px;
}

.captain-admin-section {
    padding: 15px;
    background: #F1F2ED;
    border-radius: 6px;
}

.captain-admin-section h4 {
    margin: 0;
    color: var(--red);
    font-family: var(--font-heading);
    font-size: 15px;
}

.captain-admin-section p {
    margin: 0 0 0;
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 12px;
    line-height: 1.6;
}

.captain-post-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.captain-post-form label {
    font-family: var(--font-heading);
    font-size: 11px;
    color: var(--red);
    letter-spacing: 1px;
}

.captain-post-form label span {
    color: var(--muted);
    font-family: var(--font-body);
    letter-spacing: 0;
}

.captain-post-form textarea,
.captain-post-form input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid rgba(180, 51, 31, 0.3);
    border-radius: 6px;
    background: var(--white);
    color: var(--black);
    font-family: var(--font-body);
    font-size: 12px;
}

.captain-post-form textarea {
    resize: vertical;
    min-height: 110px;
    margin-top: 15px;
}

.captain-post-form button {
    align-self: flex-start;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background: var(--red);
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 11px;
    cursor: pointer;
}

.captain-post-form button:hover {
    filter: brightness(1.15);
}

#captain-post-status {
    font-size: 11px;
    color: var(--muted);
}

/* CAPTAIN'S ENTRIES — RIGHT */
.captain-entry .message-author::before {
    content: "✦";
    color: var(--red);
    margin-right: 6px;
}

.captain-entry {
    align-self: flex-end !important;
    background: #E8D9D0 !important;
    color: var(--black) !important;
    border-left: 3px solid var(--red) !important;
}

.captain-entry .message-author {
    color: var(--red) !important;
}

@media (max-width: 767px) {
    .captain-dashboard {
        padding: 15px;
    }

    .captain-dashboard-header h3 {
        font-size: 14px;
    }
}


/* =========================================================
   CAPTAIN'S QUARTERS — ADMIN NAVIGATION
========================================================= */

/* ADMIN MENU */

#captain-admin-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#captain-admin-menu > h4 {
    margin: 0;
    color: var(--red);
    font-family: var(--font-heading);
    font-size: 15px;
}

#captain-admin-menu > p {
    margin: 0 0 10px;
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 12px;
    line-height: 1.6;
}

/* CARD GRID */

.captain-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

/* NAVIGATION CARDS */

.captain-admin-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    min-width: 0;
    min-height: 155px;
    padding: 18px;

    background: var(--white);
    border: 1px solid rgba(180, 51, 31, 0.25);
    border-radius: 6px;

    text-align: left;
    cursor: pointer;

    transition: 0.25s ease;
}

.captain-admin-card > i {
    margin-bottom: 15px;
    color: var(--red);
    font-size: 21px;
}

.captain-admin-card h4 {
    margin: 0 0 6px;
    color: var(--red);
    font-family: var(--font-heading);
    font-size: 14px;
}

.captain-admin-card p {
    margin: 0 0 15px;
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 11px;
    line-height: 1.6;
}

.captain-admin-card span {
    margin-top: auto;
    color: var(--red);
    font-family: var(--font-heading);
    font-size: 9px;
    letter-spacing: 1px;
}

/* HOVER */

.captain-admin-card:hover {
    background: #F1F2ED;
    border-color: var(--red);
    transform: translateY(-3px);
}

.captain-admin-card:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 3px;
}

/* =========================================================
   ADMIN PANELS
========================================================= */

#captain-blog-panel,
#captain-guestbook-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#captain-blog-panel[hidden],
#captain-guestbook-panel[hidden],
#captain-admin-menu[hidden] {
    display: none;
}

/* BACK BUTTON */

.captain-back {
    align-self: flex-start;

    padding: 7px 11px;

    background: transparent;
    border: 1px solid rgba(180, 51, 31, 0.3);
    border-radius: 5px;

    color: var(--red);
    font-family: poppins;
    font-size: 12px;
    font-weight: 400;

    cursor: pointer;
    transition: 0.2s ease;
}

.captain-back:hover {
    background: var(--red);
    color: var(--white);
}

/* PANEL TITLES */

#captain-blog-panel > h4,
#captain-guestbook-panel > h4 {
    margin: 0;
    color: var(--red);
    font-family: var(--font-heading);
    font-size: 16px;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 600px) {

    .captain-admin-grid {
        grid-template-columns: 1fr;
    }

    .captain-admin-card {
        min-height: 130px;
    }

}




/* =========================================================
   CAPTAIN'S BLOG EDITOR — WRITING DESK
========================================================= */

#captain-blog-editor {
    width: 100%;
    color: var(--text);
    font-family: var(--font-body);
}

#captain-blog-editor [hidden] {
    display: none !important;
}


/* =========================================================
   1. WRITING DESK HEADER
========================================================= */

.blog-editor-main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: 25px 0;
}

.blog-editor-main-header h3 {
    margin: 0 0 5px;
    font-family: var(--font-heading);
    color: var(--red);
}

.blog-editor-main-header p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

/* NEW ENTRY BUTTON */

#blog-new-post {
    padding: 10px 16px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 11px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#blog-new-post:hover {
    background: var(--accent-dark, #7D3028);
    border-color: var(--accent-dark, #7D3028);
    transform: translateY(-2px);
}

#blog-new-post:active {
    transform: translateY(0);
}


/* =========================================================
   2. LOAD EXISTING ENTRY
========================================================= */

.blog-load-entry {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 20px;
    padding: 15px;
    background: transparent;
    border: 1px solid var(--border);
}

.blog-load-entry label {
    color: var(--muted);
    font-family: var(--font-heading);
    font-size: 12px;
    letter-spacing: 1px;
    font-weight: 700;
    text-transform: uppercase;
}


/* =========================================================
   3. EDITOR SECTIONS
========================================================= */

.blog-editor-section {
    margin-bottom: 22px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid var(--border);
}

.blog-editor-section h4 {
    margin: 0 0 8px;
    font-family: var(--font-heading);
    font-size: 15px;
}

.blog-editor-section > p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 11px;
}

.blog-editor-section label {
    display: block;
    margin: 16px 0 6px;
    color: var(--muted);
    font-family: var(--font-heading);
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
}


/* =========================================================
   4. INPUTS & TEXT AREAS
========================================================= */

.blog-editor-section input,
.blog-editor-section textarea,
.blog-load-entry select {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;

    background: transparent;
    color: #292520;

    border: 1px solid #A99B87;
    border-radius: 3px;

    font-family: var(--font-body);
    font-size: 12px;

    outline: none;
    transition: border-color 0.2s ease,
                background 0.2s ease;
}

.blog-editor-section input:focus,
.blog-editor-section textarea:focus,
.blog-load-entry select:focus {
    background: #EAE2D5;
    border-color: var(--accent);
}

.blog-editor-section input::placeholder,
.blog-editor-section textarea::placeholder {
    color: #817668;
    opacity: 1;
}

.blog-editor-section textarea {
    resize: vertical;
}

.blog-load-entry select {
    cursor: pointer;
    background: var(--red);
    color: var(--white);
}


#blog-existing-post:focus,
#blog-existing-post:active {
    background-color: transparent;
    border-color: var(--accent);
    color: var(--red);
    outline: none;
}


/* =========================================================
   5. CONTENT BLOCKS
========================================================= */

#blog-block-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 18px 0;
}

.blog-block-empty {
    padding: 30px 15px;
    border: 1px dashed var(--border);
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.blog-content-block {
    padding: 15px;
    background: #EAE2D5;
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
}

.blog-content-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.blog-content-block-header span {
    color: var(--accent);
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.blog-block-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.blog-block-controls button {
    padding: 5px 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    font-size: 10px;
    cursor: pointer;
}

.blog-block-controls button:hover {
    background: var(--accent);
    color: #fff;
}


/* =========================================================
   6. ADD CONTENT BLOCK BUTTONS
========================================================= */

.blog-add-block {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.blog-add-block button {
    padding: 9px 12px;
    border: 1px dashed var(--accent);
    background: transparent;
    color: var(--accent);
    font-family: var(--font-heading);
    font-size: 10px;
    cursor: pointer;
    transition: 0.2s ease;
}

.blog-add-block button:hover {
    background: var(--accent);
    color: #fff;
    border-style: solid;
}


/* BLOCK FIELD LABELS */

.blog-block-field label {
    display: block;
    margin-bottom: 7px;

    color: var(--black);
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}


.blog-gallery-item {
    padding: 15px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.2);
}

.blog-gallery-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.blog-gallery-item-header span {
    color: var(--red);
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
}

.blog-gallery-item [data-action="gallery-add"] {
    margin-top: 12px;
}


/* =========================================================
   7. PUBLISHING FOOTER
========================================================= */

.blog-editor-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

#blog-editor-message {
    flex: 1 1 100%;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.blog-editor-footer button {
    padding: 10px 16px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 11px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.2s ease;
}

.blog-editor-footer button:hover {
    background: var(--accent-dark, #7D3028);
}

/* SAVE DRAFT */

.blog-editor-footer #blog-save-draft {
    background: transparent;
    color: var(--accent);
}

.blog-editor-footer #blog-save-draft:hover {
    background: var(--accent);
    color: #fff;
}


/* =========================================================
   8. MOBILE RESPONSIVENESS
========================================================= */

@media (max-width: 600px) {

    .blog-editor-main-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .blog-editor-section {
        padding: 14px;
    }

    .blog-editor-footer {
        justify-content: stretch;
    }

    .blog-editor-footer button {
        flex: 1;
    }

    .blog-add-block button {
        flex: 1 1 auto;
    }

    .blog-block-controls {
        justify-content: flex-end;
    }

}