
/*
 * NavalGaming Main Stylesheet
 * Referenced in: inc/classes/pageconstruction.php (line 9)
 * Version: V12
 */

/* ===================================================================
   TABLE OF CONTENTS
   ===================================================================

   This stylesheet is currently undergoing reorganization to improve
   maintainability and navigation. See CSS_REORGANIZATION_PROJECT.md
   for the complete implementation plan.

   CURRENT STRUCTURE (Section markers added in Phase 1):

   1. RESET & BASE STYLES ..................... Line 90
      - CSS Reset
      - Box sizing
      - Base element styles

   2. TYPOGRAPHY & TEXT ....................... Line 118
      - Font families
      - Text utilities (.center, .bold-text, .smalltext)
      - Text colors and sizes

   3. LAYOUT & CONTAINERS ..................... Line 162
      - Body and main wrappers
      - Grid systems
      - Flexbox layouts
      - Spacing utilities

   4. BUTTONS & ACTIONS ....................... Line 188 (CONSOLIDATED ✅)
      - 4.1 Base Button Styles
      - 4.2 Standard Card Button System (PRIMARY)
      - 4.3 Server Toggle Buttons
      - 4.4 Page-Specific Buttons (create-operation, admin-link, declare-winner, server-btn, admin-btn)
      - 4.5 Specialized Buttons (ship-select, roster-control, watchlist)

   5. FORMS & INPUTS .......................... Line 642 (CONSOLIDATED ✅)
      - 5.1 Base Form Element Styles (input, textarea, select, form)
      - 5.2 Form Container Styles (pageform, smallform, roster, bidform)
      - 5.3 Search Forms (search-form, searchform)
      - 5.4 Operations Forms (operations-form-*)
      - 5.5 Ship Selection Forms (ship-form-*, inline-ship-selection-form)
      - 5.6 Utility Classes for Forms

   6. CARD COMPONENT SYSTEM ................... Line 1121 (CONSOLIDATED ✅)
      - Base Card Styles (.standard-card)
      - Themed Card Variants (parchment, blue, red)
      - Card-specific utilities and modifiers

   7. NAVIGATION & MENUS ...................... Line 2073 (NEW ✅)
      7.1 Main Navigation (#navbar, .navlinks) .. Line 2077
      7.2 Footer Navigation (#footer, .footer_*) . Line 2118

   8. PAGE-SPECIFIC COMPONENTS ................ Line 2176 (CONSOLIDATED ✅)
      8.1 Operations System ................... Line 2183
      8.2 Trading System ...................... Line 2475
      8.3 NAAPI Admin Interface ............... Line 2515
      8.4 Wardroom / Member Cards ............. Line 2883
      8.5 Scuttlebutt/Forums .................. Line 2926
      8.6 Profile/Dossier ..................... Line 3660

   9. UTILITY CLASSES ......................... Line 3983 (CONSOLIDATED ✅)
      9.1 Empty State Utilities ............... Line 3986
      9.2 Validation & Error States ........... Line 4021

  10. MEDIA QUERIES ........................... Line 4038 (CONSOLIDATED ✅)
      10.1 Small Devices (max-width: 600px) ... Line 4041
      10.2 Tablets/Larger Phones (768px) ...... Line 4075

   ===================================================================
   REORGANIZATION STATUS:
   - Phase 0: Preparation ✅ Complete
   - Phase 1: Section Markers ✅ Complete
   - Phase 2: Consolidate Buttons ✅ Complete (All button styles now in Section 4)
   - Phase 3: Consolidate Forms ✅ Complete (All form styles now in Section 5)
   - Phase 4: Consolidate Cards ✅ Complete (All card styles now in Section 6)
   - Phase 5: Consolidate Page-Specific ✅ Complete (All 6 subsections now in Section 8)
   - Phase 6: Consolidate Media Queries ✅ Complete (All media queries now in Section 10)
   - Phase 7: Extract Utility Classes ✅ Complete (All utility classes now in Section 9)
   Next: Phase 8 (Final Cleanup) → Phase 9 (Deploy)
   ================================================================ */

/* ===================================================================
   1. RESET & BASE STYLES
   ================================================================ */

* {box-sizing: border-box;}

/* reset styles test */
/* CSS Reset - Note: 'button' is intentionally excluded to preserve button gradient backgrounds */
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var, b, u, i, center,
dl, dt, dd, ol, ul, li, fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td, form {
	margin: 0; padding: 0;  border: 0; outline: 0; font-size: 100%;
	vertical-align: baseline; background: transparent;
}
body { line-height: 1; }

ol, ul {margin-left: 20px; }

blockquote, q { quotes: none; }
blockquote:before, blockquote:after, q:before, q:after { content: ''; }
:focus { outline: 0; }
ins { text-decoration: none; }
del { text-decoration: line-through; }
table { border-collapse: collapse; border-spacing: 0; }
td {vertical-align: top; padding: 5px;}
/* textarea moved to Section 5: FORMS & INPUTS */

/* ===================================================================
   2. TYPOGRAPHY & TEXT
   ================================================================ */

body {
    font-family: Georgia, serif;
    font-size: 16px;
    line-height: inherit;
    font-weight: 400;
    color: #ffffff;
    /* background-color: #ffffff; */
    background-color: #e1ebf0;
    background-image: url(../images/compass-background.jpg);
    background-size: cover;
}

p {
    margin: 1em 0;
    text-align: left;
}

a {
    text-decoration: none;
    cursor: pointer;
    color: #0277bd;
}

a:hover {
    text-decoration: underline;
}

h2 {
    font-size: 24px;
}

h4 {
    font-weight: bold;
}

ol li {
    padding: 10px;
    margin-left: 35px;
}

/* ===================================================================
   3. LAYOUT & CONTAINERS
   ================================================================ */

/* ===== 3.1 PAGE STRUCTURE ===== */

/* Main Body Wrapper - Site-wide container */
#bodyWrap {
    max-width: 800px;
    margin: 0 auto;
    background-color: #1a365d;
    position: relative;
}

/* Banner - Alert/notification banner at top */
#banner {
    background-color: red;
    color: white;
    text-align: center;
    width: 100%;
    font-weight: bold;
    padding: 5px 0;
}

/* END SECTION 3.1: PAGE STRUCTURE */

/* ===== 3.2 HEADER LAYOUT ===== */

/* Header Container - Logo and user info area */
#bodyTop {
    width: 100%;
    min-height: 80px;
    padding: 10px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

/* Logo Container */
#logo {
    display: inline-block;
    padding: 10px 20px;
}

#logo img {
    height: 100px;
    width: auto;
    display: block;
}

/* Header Right - User info and login/logout */
#header-right {
    padding: 10px 20px;
    color: #e6d9c0;
    text-align: right;
    font-size: 18px;
}

#header-right a {
    color: #e6d9c0;
    text-decoration: none;
    font-weight: 500;
}

#header-right a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* END SECTION 3.2: HEADER LAYOUT */

/* END SECTION 3: LAYOUT & CONTAINERS */

/* ===================================================================
   4. BUTTONS & ACTIONS
   ================================================================ */

/* ===== 4.1 BASE BUTTON STYLES ===== */

button {
    cursor: pointer;
    background-color: #0288d1;
    color: #fff;
    padding: 12px;
    border-radius: 20px;
    margin: 5px;
}

button.textlink {
    background:none!important;
    color: #0277bd;
    border:none;
    padding:0!important;
    font: inherit;
    /*border is optional*/
    border-bottom:none;
    cursor: pointer;
    opacity: 1;
    text-shadow: 0 0 0 0;
    background-color: none;
    width: 100%;
    border-radius: none;
    margin: none;
}

/* ===== 4.2 STANDARD CARD BUTTON SYSTEM (PRIMARY SITE-WIDE STANDARD) ===== */

/* ==========================================
   STANDARD CARD BUTTON SYSTEM
   Use these classes for all buttons in .standard-card-footer
   ========================================== */

/* Base button styles - shared by all button types */
.card-btn-primary,
.card-btn-success,
.card-btn-danger,
.card-btn-secondary,
.card-btn-small,
.card-btn-discord {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 4px;
    text-align: center;
    width: auto;
    white-space: nowrap; /* Prevent text wrapping */
}

/* PRIMARY - Main action button (Navy) */
.card-btn-primary {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3a5f 100%);
    box-shadow: 0 2px 4px rgba(44, 90, 160, 0.2);
}

.card-btn-primary:hover {
    background: linear-gradient(135deg, #3d6bb0 0%, #2c5aa0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(44, 90, 160, 0.3);
}

/* SUCCESS - Positive actions (Green: Join, Confirm, Save) */
.card-btn-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.card-btn-success:hover {
    background: linear-gradient(135deg, #34c759 0%, #28a745 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

/* DANGER - Destructive actions (Red: Delete, Remove, Exit) */
.card-btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

.card-btn-danger:hover {
    background: linear-gradient(135deg, #e4606d 0%, #dc3545 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* SECONDARY - Alternative actions (Gray: Cancel, Back) */
.card-btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.2);
}

.card-btn-secondary:hover {
    background: linear-gradient(135deg, #7d8791 0%, #6c757d 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

/* SMALL - Compact tertiary actions */
.card-btn-small {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    padding: 6px 12px;
    font-size: 13px;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.2);
}

.card-btn-small:hover {
    background: linear-gradient(135deg, #7d8791 0%, #6c757d 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(108, 117, 125, 0.3);
}

/* DISCORD - Discord integration button */
.card-btn-discord {
    background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%);
    box-shadow: 0 2px 4px rgba(88, 101, 242, 0.2);
}

.card-btn-discord:hover {
    background: linear-gradient(135deg, #6b78f4 0%, #5865F2 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(88, 101, 242, 0.3);
}

/* Button active/pressed state */
.card-btn-primary:active,
.card-btn-success:active,
.card-btn-danger:active,
.card-btn-secondary:active,
.card-btn-small:active,
.card-btn-discord:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Button text color is already set in base card button styles (line ~283) */
/* No override needed now that wildcard selectors exclude buttons */

/* Watchlist Button Color Overrides */
.card-btn-small.watchlist-add {
    background-color: #28a745;
    border-color: #28a745;
    transition: all 0.2s ease;
}

.card-btn-small.watchlist-add:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.card-btn-small.watchlist-delete {
    background-color: #dc3545;
    border-color: #dc3545;
    transition: all 0.2s ease;
}

.card-btn-small.watchlist-delete:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* ===== 4.3 SERVER TOGGLE BUTTONS ===== */

.server-toggle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
    padding: 20px;
}

.server-toggle-group {
    display: flex;
    gap: 15px;
}

.server-toggle-btn {
    display: block;
    width: 150px;
    height: 60px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.4s ease;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid #999;
    /* Default state: unselected - grayed out */
    filter: grayscale(70%);
    opacity: 0.6;
}

.server-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    text-decoration: none;
    filter: grayscale(40%);
    opacity: 0.8;
}

.server-toggle-btn.active {
    /* Active state: full color, sharp, prominent border */
    filter: grayscale(0%);
    opacity: 1;
    border-color: #1e3a5f;
    border-width: 3px;
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.4);
    transform: scale(1.02);
}

.server-toggle-btn.active:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 16px rgba(30, 58, 95, 0.5);
    filter: grayscale(0%);
    opacity: 1;
}

.main-btn {
    background-image: url('/images/main-server.png');
}

.peace-btn {
    background-image: url('/images/peace-server.png');
}

/* Small Server Toggle Buttons (for placement under titles) */
.server-toggle-container-small {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 2px 0 15px 0;
    padding: 8px;
    background: transparent;
}

.server-toggle-btn-small {
    display: block;
    width: 100px;
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.4s ease;
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid #999;
    /* Default state: unselected - grayed out */
    filter: grayscale(70%);
    opacity: 0.6;
}

.server-toggle-btn-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    text-decoration: none;
    filter: grayscale(40%);
    opacity: 0.8;
}

.server-toggle-btn-small.active {
    /* Active state: full color, sharp, prominent border */
    filter: grayscale(0%);
    opacity: 1;
    border-color: #1e3a5f;
    border-width: 2px;
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.4);
    transform: scale(1.02);
}

.server-toggle-btn-small.active:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 3px 10px rgba(30, 58, 95, 0.5);
    filter: grayscale(0%);
    opacity: 1;
}

/* ===== 4.4 PAGE-SPECIFIC BUTTONS ===== */

/* NAAPI Admin Server Selector Button */
.server-btn {
    background: #6c757d;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.server-btn:hover {
    background: #545b62;
    transform: translateY(-1px);
}

.server-btn.active {
    background: #007bff;
    box-shadow: 0 2px 4px rgba(0,123,255,0.3);
}

/* Create Operation Button */
.create-operation-btn {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3a5f 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.create-operation-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Admin Link Button */
.admin-link-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 11px;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font-style: italic;
    display: inline;
}

.admin-link-btn:hover {
    color: #666;
}

/* Declare Winner Button */
.declare-winner-btn {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.declare-winner-btn:hover {
    transform: translateY(-2px);
}

/* Admin Button (text link style) */
.admin-btn {
    color: #dc3545;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
}

.admin-btn:hover {
    text-decoration: underline;
}

/* ===== 4.5 SPECIALIZED BUTTONS ===== */

/* Ship Selection Modal Buttons */
/* Ship selection buttons now use standard card button classes (.card-btn-primary, .card-btn-secondary) */
/* Old specialized styles removed - see Section 4.2 for standard card button system */

/* Roster Control Buttons */
.roster-control-btn {
    display: inline-flex;
    align-items: center;
    padding: 2px;
}

.roster-control-btn img {
    vertical-align: middle;
}

/* END SECTION 4: BUTTONS & ACTIONS */

img {
    max-width: 100%;
    height: auto;
}

/* ===================================================================
   5. FORMS & INPUTS (CONSOLIDATED IN PHASE 3)
   ================================================================ */

/* ===== 5.1 BASE FORM ELEMENT STYLES ===== */

/* Text Inputs */
input[type=text], input[type=password] {
    width: 80%;
    padding: 10px;
    margin-bottom: 20px;
}

input[type=number] {
    width: 100px;
    padding: 10px;
}

input.smallinput {
    width: 25%;
    padding: 5px;
    margin-bottom: 20px;
}

/* Textarea */
textarea {
    font-size: 18px;
    width: 80%;
    height: 100px;
}

/* Select Dropdowns */
select {
	width: 80%;
	padding: 10px;
	margin-bottom: 20px;
}

select.smallinput {
    width: 25%;
    padding: 5px;
    margin-bottom: 20px;
}

/* Base Form Element */
form {
    text-align: center;
}

/* ===== 5.2 FORM CONTAINER STYLES ===== */

/* Main Page Form (.pageform) - Used on 28 files site-wide */
.pageform {
    width: 80%;
    background-color: #f1f3ce;
    border: 4px solid #f62a00;
    padding: 10px;
    margin: auto;
    text-align: center;
    color: #000;
}

.pageform button {
    width: 200px;
}

.pageform select {
    width: 200px;
}

.pageform input[type=text] {
    width: 200px;
}

.pageform #art img {
    height: 50px;
}

/* Small Form (.smallform) - Compact form layout */
.smallform button {
    width: 200px;
}

.smallform select {
    width: 200px;
}

.smallform input[type=text] {
    width: 200px;
}

.smallform input[type=password] {
    width: 200px;
}

/* Roster Form - Used in operations and member management */
.roster {
    width: 90%;
    background-color: #f1f3ce;
    border: 1px solid black;
    padding: 10px;
    margin: auto;
    text-align: left;
    color: #000;
}

.roster img {
    height: 25px;
    width: 25px;
}

.roster textarea {
    height: 200px;
    width: 100%;
}

/* Bid Form - Used in prize/giveaway system */
.bidform {
    text-align: left;
    padding: 20px;
}

.bidform_options {
    text-align: left;
    margin-top: 20px;
}

/* ===== 5.3 SEARCH FORMS ===== */

/* Modern Search Form - Flexbox layout */
.search-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.search-form input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.search-form button {
    padding: 8px 16px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.search-form button:hover {
    background: #0056b3;
}

/* Legacy Search Form - Float-based layout */
form.searchform {
    float: left;
    text-align: left;
    width: 100%;
}

form.searchform button {
    width: 100px;
}

form.searchform input {
    width: 100px;
}

/* ===== 5.4 OPERATIONS FORMS ===== */

.operations-form-container {
    max-width: 600px;
    margin: 0 auto;
}

.operations-form-card {
    background: linear-gradient(to right, #e6d9c0 0%, #d4c4a8 30%, #c8b896 70%, #d0c2a6 100%) !important;
    border: 2px solid #8b6f3f !important;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(101, 67, 33, 0.25) !important;
    color: #2c1810;
}

.operations-form-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c1810;
    font-size: 20px;
    border-bottom: 2px solid #8b6f3f;
    padding-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
}

.operations-form-card #art img {
    height: 24px;
    width: auto;
}

.operations-form-field {
    margin-bottom: 15px;
}

.operations-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c1810;
}

.operations-form-field input[type="text"],
.operations-form-field select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #8b6f3f;
    border-radius: 4px;
    background-color: #f8f4e6;
    color: #2c1810;
    font-size: 14px;
    box-sizing: border-box;
}

.operations-form-field input[type="text"]:focus,
.operations-form-field select:focus {
    outline: none;
    border-color: #654321;
    box-shadow: 0 0 4px rgba(101, 67, 33, 0.3);
}

.operations-form-field .form-help {
    font-size: 12px;
    color: #6b5b42;
    margin-top: 4px;
    font-style: italic;
}

.operations-form-button {
    background: linear-gradient(135deg, #8b6f3f 0%, #654321 100%);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    width: 100%;
    margin-top: 10px;
}

.operations-form-button:hover {
    background: linear-gradient(135deg, #654321 0%, #4a3018 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(101, 67, 33, 0.3);
}

/* ===== 5.5 SHIP SELECTION FORMS ===== */

.ship-form-field {
    margin-bottom: 20px;
}

.ship-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c1810;
}

/* Inline Ship Selection Form */
.inline-ship-selection-form {
    margin: 12px 0 0 0;
    padding: 16px;
    background: linear-gradient(135deg, #f8f5f1 0%, #f0ebe3 50%, #e8e1d6 100%);
    border: 2px solid #d4c4a8;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
        padding: 0 16px;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
        padding: 16px;
    }
}

.ship-selection-content {
    max-width: 100%;
}

.inline-ship-selection-form .ship-autocomplete-container {
    position: relative;
    margin-bottom: 16px;
}

.inline-ship-selection-form input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #c8b896;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.inline-ship-selection-form input[type="text"]:focus {
    outline: none;
    border-color: #8b7355;
    box-shadow: 0 0 6px rgba(139, 115, 85, 0.3);
}

.inline-ship-selection-form .ship-autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #c8b896;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 150px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.inline-ship-selection-form .ship-autocomplete-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0ebe3;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.inline-ship-selection-form .ship-autocomplete-item:hover,
.inline-ship-selection-form .ship-autocomplete-item.highlighted {
    background-color: #f8f5f1;
    color: #3c2415;
}

.inline-ship-selection-form .ship-autocomplete-item:last-child {
    border-bottom: none;
}

.inline-ship-selection-form .ship-autocomplete-item.loading,
.inline-ship-selection-form .ship-autocomplete-item.no-results,
.inline-ship-selection-form .ship-autocomplete-item.error {
    color: #666;
    font-style: italic;
    cursor: default;
}

.inline-ship-selection-form .ship-autocomplete-item.error {
    color: #dc3545;
}

/* Ship Form Buttons - now using standard card button classes (.card-btn-primary, .card-btn-secondary) */
.ship-form-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: nowrap;
}

/* Integration with member cards */
.member-card-wrapper .inline-ship-selection-form {
    margin-left: 0;
    margin-right: 0;
}

/* ===== 5.6 UTILITY CLASSES FOR FORMS ===== */

/* Quickstart images in forms */
.quickstart {
    float: right;
    margin: 10px;
    width: 40%;
    border: 2px solid #8b7355;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.quickstart:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.standard-card-body:has(.quickstart) {
    min-height: 200px;
}

.standard-card-body .quickstart {
    margin-bottom: 15px;
}

.standard-card-body:has(.quickstart)::after {
    content: "";
    display: table;
    clear: both;
}

/* Featured Video Card Styling */
.standard-card-header h4:contains("🎥 Featured Video") {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5aa0 100%);
    color: white !important;
    padding: 10px 15px;
    border-radius: 6px;
    text-align: center;
}

/* YouTube iframe responsive styling */
.standard-card-body iframe {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ===================================================================
   6. CARD COMPONENT SYSTEM (CONSOLIDATED IN PHASE 4)
   ================================================================ */

/* =====  6.1 BASE CARD STYLES & LAYOUTS ===== */

/* Standard Cards Grid Layout (formerly Trading Cards) */
.standard-cards-grid, .trading-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Standard Cards Stack Layout (vertical stacking) */
.standard-cards-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.trading-search-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* Standard Card Base Styles */
/* Base Standard Card Style */
.standard-card,
.trading-search-card,
.trading-opportunity-card {
    background: linear-gradient(135deg, #e6d9c0 0%, #d4c4a8 100%);
    border: 2px solid #8b7355;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: visible;
}

.standard-card:hover,
.trading-search-card:hover,
.trading-opportunity-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Standard Card Headers */
.standard-card-header, .trading-card-header {
    padding: 15px 20px;
    background: rgba(30, 58, 95, 0.1);
    border-bottom: 1px solid rgba(139, 115, 85, 0.3);
}

.standard-card-header, .trading-card-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e3a5f;
}

/* Standard Card Bodies */
.standard-card-body, .trading-card-body {
    padding: 20px;
}

.search-hint {
    margin: 15px 0 0 0;
    font-size: 13px;
    color: #6b5b42;
    font-style: italic;
    line-height: 1.4;
}

/* Trading Details */
.trading-detail {
    margin-bottom: 12px;
    font-size: 14px;
}

.detail-label {
    font-weight: 600;
    color: #1e3a5f;
    margin-right: 8px;
}

.price-value {
    color: #28a745;
    font-weight: 700;
    font-size: 16px;
}

/* Standard Card Footers */
.standard-card-footer, .trading-card-footer {
    padding: 15px 20px;
    background: rgba(30, 58, 95, 0.05);
    border-top: 1px solid rgba(139, 115, 85, 0.2);
    text-align: center;
}

/* Forms inside card footers should display inline */
.standard-card-footer form,
.trading-card-footer form {
    display: inline-block;
    margin: 0;
}

/* Ensure buttons inside forms maintain standard styling */
.standard-card-footer form button,
.trading-card-footer form button {
    margin: 0 4px;
}

/* Card Button System moved to Section 4: BUTTONS & ACTIONS */

/* END 6.1: BASE CARD STYLES & LAYOUTS */

/* ===== 6.2 THEMED CARD VARIANTS ===== */

/* Standard Parchment Card - Document style with warm cream/beige gradient */
.standard-parchment-card {
    background: linear-gradient(to right, #e6d9c0 0%, #d4c4a8 30%, #c8b896 70%, #d0c2a6 100%) !important;
    border: 2px solid #8b6f3f !important;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 15px;
    box-shadow: 0 4px 8px rgba(101, 67, 33, 0.25) !important;
}

.standard-parchment-card h2 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #2c1810;
    font-size: 20px;
    border-bottom: 2px solid #8b6f3f;
    padding-bottom: 6px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.standard-parchment-card h3,
.standard-parchment-card h4 {
    color: #495057 !important;
}

/* Standard Blue Card - Deep navy blue for profile/naval content */
.standard-blue-card {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5aa0 50%, #1e3a5f 100%) !important;
    border: 2px solid #4a90e2 !important;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.standard-blue-card h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #ffffff;
    font-size: 22px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    border-bottom: 2px solid #4a90e2;
    padding-bottom: 8px;
}

.standard-blue-card h3,
.standard-blue-card h4 {
    color: #ffffff !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

/* Standard Red Card - Red theme for admin controls and alerts */
.standard-red-card {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 50%, #dc3545 100%) !important;
    border: 2px solid #bd2130 !important;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    color: #ffffff;
}

.standard-red-card h2,
.standard-red-card h3 {
    margin-top: 0;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.standard-red-card h3 {
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 6px;
}

.standard-red-card h4 {
    color: #495057 !important;
}

.shellback-certificate {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(to right, #f4f1e8 0%, #e8ddc7 50%, #f0ead6 100%) !important;
    border: 2px solid #c4a574 !important;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(101, 67, 33, 0.15) !important;
}

/* ===== 6.3 MEMBER CARDS ===== */

.member-cards-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.member-card {
    background: linear-gradient(to right, #e6d9c0 0%, #d4c4a8 30%, #c8b896 70%, #d0c2a6 100%) !important;
    border: 2px solid #8b6f3f !important;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 4px 8px rgba(101, 67, 33, 0.25) !important;
    transition: all 0.3s ease;
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    min-height: 60px;
}

.member-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 8px 16px rgba(101, 67, 33, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    border-color: #a68b5b;
}

.member-card.on-leave {
    background: linear-gradient(145deg, #f0ede6 0%, #ddd6c1 50%, #e6dfc8 100%) !important;
    border-color: #998866 !important;
    opacity: 0.85;
}

.member-card.on-leave:before {
    content: "ON LEAVE";
    position: absolute;
    top: 8px;
    right: 8px;
    background: #6c757d;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
}

.member-card.citizen {
    border-left: 4px solid #28a745;
}

.member-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.member-card-insignia {
    flex-shrink: 0;
}

.member-card-insignia img {
    height: 36px;
    width: auto;
}

.member-card-info {
    flex: 1;
    min-width: 0;
}

.member-card-name {
    font-size: 18px;
    font-weight: bold;
    color: #212529;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-card-name a {
    color: #007bff;
    text-decoration: none;
}

.member-card-name a:hover {
    text-decoration: underline;
}

.member-card-rank {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 2px 0 0 0;
}

.member-card-body {
    margin-left: 12px;
    flex: 1;
}

.member-card-details {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
}

.member-card-detail {
    display: flex;
    align-items: center;
    gap: 4px;
}

.member-card-ribbons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    margin-left: auto;
    padding-left: 12px;
}

.member-card-ribbons img {
    height: 36px;
    border-radius: 2px;
}

/* Rank-specific styling */
.member-card.rank-0 { border-left: 4px solid #28a745; } /* Citizen - Green */
.member-card.rank-1 { border-left: 4px solid #17a2b8; } /* Midshipman - Cyan */
.member-card.rank-2 { border-left: 4px solid #007bff; } /* Ensign - Blue */
.member-card.rank-3 { border-left: 4px solid #6610f2; } /* Lieutenant - Indigo */
.member-card.rank-4 { border-left: 4px solid #6f42c1; } /* Lt Commander - Purple */
.member-card.rank-5 { border-left: 4px solid #e83e8c; } /* Commander - Pink */
.member-card.rank-6 { border-left: 4px solid #dc3545; } /* Captain - Red */
.member-card.rank-7 { border-left: 4px solid #fd7e14; } /* Commodore - Orange */
.member-card.rank-8 { border-left: 4px solid #ffc107; } /* Rear Admiral - Yellow */
.member-card.rank-9 { border-left: 4px solid #20c997; } /* Vice Admiral - Teal */
.member-card.rank-10 { border-left: 4px solid #198754; } /* Admiral - Dark Green */

/* Member Card Wrapper with Commander Controls */
.member-card-wrapper {
    margin-bottom: 10px;
}

/* ===== 6.4 DOSSIER CARDS ===== */

.dossier-profile-card {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5aa0 50%, #1e3a5f 100%) !important;
    border: 2px solid #4a90e2 !important;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    display: flex;
    align-items: center;
    gap: 20px;
}

.dossier-profile-header {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
}

.dossier-profile-insignia {
    flex-shrink: 0;
}

.dossier-profile-insignia img {
    height: 80px;
    width: auto;
}

.dossier-profile-info h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.dossier-profile-nation img {
    height: 40px;
    margin-top: 8px;
}

.dossier-medals-card {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5aa0 50%, #1e3a5f 100%) !important;
    border: 2px solid #4a90e2 !important;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.dossier-medals-card h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #ffffff;
    font-size: 22px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    border-bottom: 2px solid #4a90e2;
    padding-bottom: 8px;
}

.dossier-medals-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.dossier-medals-grid img {
    height: 80px;
    border-radius: 4px;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dossier-medals-grid img:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.dossier-medals-grid a {
    position: relative;
    display: inline-block;
}

.shellback-medal {
    position: relative;
    display: inline-block;
}

.dossier-section-card {
    background: linear-gradient(to right, #e6d9c0 0%, #d4c4a8 30%, #c8b896 70%, #d0c2a6 100%) !important;
    border: 2px solid #8b6f3f !important;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 15px;
    box-shadow: 0 4px 8px rgba(101, 67, 33, 0.25) !important;
}

.dossier-section-card h2 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #2c1810;
    font-size: 20px;
    border-bottom: 2px solid #8b6f3f;
    padding-bottom: 6px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.dossier-operation-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(139, 111, 63, 0.3);
}

.dossier-operation-item:last-child {
    border-bottom: none;
}

.dossier-operation-item a {
    color: #654321;
    text-decoration: none;
    font-weight: 500;
}

.dossier-operation-item a:hover {
    text-decoration: underline;
    color: #4a3018;
}

.dossier-admin-card {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 50%, #dc3545 100%) !important;
    border: 2px solid #bd2130 !important;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    color: #ffffff;
}

.dossier-admin-card h2,
.dossier-admin-card h3 {
    margin-top: 0;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.dossier-admin-card h3 {
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 6px;
}

/* ===== 6.5 WELCOME PAGE CARDS ===== */

.welcome-hero-card {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5aa0 100%);
    border: 2px solid #4a90e2;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.welcome-hero-card .hero-images {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 20px;
}

.welcome-hero-card .hero-image-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 400px;
}

.welcome-hero-card img {
    width: 100%;
    height: auto;
    max-width: 400px;
    border-radius: 8px;
    transition: transform 0.3s ease;
    margin-bottom: 0;
}

.welcome-hero-card img:hover {
    transform: scale(1.02);
}

.welcome-hero-card .cta-button,
.welcome-hero-card .cta-button-secondary {
    width: 200px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: white;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-transform: uppercase;
    text-decoration: none;
    box-sizing: border-box;
    letter-spacing: 1px;
}

.welcome-hero-card .cta-button {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.welcome-hero-card .cta-button-secondary {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.welcome-hero-card .cta-button-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(23, 162, 184, 0.4);
}

.welcome-hero-card .hero-content {
    margin-top: 20px;
}

.welcome-hero-card .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

.welcome-mission-card {
    background: linear-gradient(135deg, #e6d9c0 0%, #d4c4a8 100%);
    border: 2px solid #8b7355;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.welcome-mission-card h2 {
    margin: 0 0 15px 0;
    color: #2c1810;
    font-size: 26px;
    text-align: center;
    border-bottom: 3px solid #8b7355;
    padding-bottom: 10px;
}

.welcome-mission-card .mission-statement {
    font-size: 18px;
    line-height: 1.6;
    color: #2c1810;
    text-align: center;
    font-weight: 500;
    margin: 0;
}

.welcome-video-card {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border: 2px solid #ddd;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.welcome-video-card h2 {
    margin: 0 0 20px 0;
    color: #1e3a5f;
    font-size: 22px;
}

.welcome-video-card .video-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
}

.welcome-video-card iframe {
    max-width: 100%;
    border-radius: 8px;
}

/* ===== 6.6 NAAPI ADMIN CARDS ===== */

.server-status-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #6c757d;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    color: #212529 !important;
}

.server-status-card * {
    color: #212529 !important;
}

.server-status-card.main-server {
    border-color: #007bff;
    background: linear-gradient(135deg, #e7f3ff 0%, #cce7ff 100%);
}

.server-status-card.peace-server {
    border-color: #28a745;
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
}

.port-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    color: #212529 !important;
}

.port-card * {
    color: #212529 !important;
}

.item-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
}

.itemtype-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    text-align: center;
}

.item-list-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
}

/* ===== 6.7 TRADING COMPONENTS (Autocomplete, Search, Watchlist) ===== */

/* Search Input Styles */
.port-search-container,
.item-search-container {
    position: relative;
    width: 100%;
}

#port-search-input,
#item-search-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #d4c4a8;
    border-radius: 8px;
    font-size: 16px;
    background-color: #faf8f5;
    color: #654321;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

#port-search-input:focus,
#item-search-input:focus {
    outline: none;
    border-color: #8b6f3f;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(139, 111, 63, 0.15);
}

/* Item Autocomplete Dropdown */
.item-autocomplete-container {
    position: relative;
}

.item-autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #faf8f5;
    border: 2px solid #d4c4a8;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 99999;
    box-shadow: 0 4px 8px rgba(101, 67, 33, 0.25);
}

.item-autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(139, 111, 63, 0.2);
    color: #654321;
    transition: background-color 0.2s ease;
}

.item-autocomplete-item:last-child {
    border-bottom: none;
}

.item-autocomplete-item:hover,
.item-autocomplete-item.highlighted {
    background-color: #8b6f3f;
    color: #ffffff;
}

.item-autocomplete-loading,
.item-autocomplete-no-results {
    padding: 12px 16px;
    color: #6b5b42;
    font-style: italic;
    text-align: center;
}

/* Watchlist Items */
.watchlist-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(139, 115, 85, 0.2);
}

.watchlist-item:last-child {
    border-bottom: none;
}

.watchlist-link {
    color: #2c5aa0;
    text-decoration: none;
    font-weight: 500;
    flex: 1;
}

.watchlist-link:hover {
    text-decoration: underline;
    color: #1e3a5f;
}

.watchlist-remove {
    font-size: 11px !important;
    color: #dc3545 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: rgba(220, 53, 69, 0.1);
    transition: background-color 0.2s ease;
}

.watchlist-remove:hover {
    background-color: rgba(220, 53, 69, 0.2) !important;
    text-decoration: none !important;
}



/* Trading Footer */
.trading-footer {
    text-align: center;
    padding: 30px 0 20px 0;
    margin-top: 30px;
    border-top: 1px solid rgba(139, 115, 85, 0.3);
}

.data-update-info {
    color: #6c757d;
    font-size: 13px;
    margin: 0 0 15px 0;
}

.admin-controls {
    margin-top: 15px;
}

/* .admin-btn moved to Section 4: BUTTONS & ACTIONS */

/* Card Type Specific Styles */
.port-search-card {
    border-color: #28a745;
}

.item-search-card {
    border-color: #17a2b8;
}

.trading-opportunity-card {
    border-color: #ffc107;
}


/* Section Headers */
.trading-search-section h3,
.trading-featured-section h3,
.trading-watchlist-section h3,
.trading-watchlist-section h2 {
    color: #ffffff;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 20px 0;
    text-align: center;
}


/* Cartel Page - Consumables List */
.consumables-list {
    margin-top: 15px;
}

.consumable-list-item {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
}

.consumable-list-item:last-child {
    border-bottom: none;
}

.consumable-list-item .item-name {
    font-weight: 600;
    color: #495057;
}

.item-price {
    color: #212529;
    font-weight: 500;
}

/* Fix white text in standard cards */
.standard-card * {
    color: #212529 !important;
}

.standard-card .btn-small {
    color: #ffffff !important;
}

/* Market Item Type Styles */
.itemtype-header {
    cursor: pointer;
    font-weight: bold;
}

.itemtype-content {
    margin-left: 20px;
    display: none;
}

/* Market Table Grid Styles */
.market-grid-header {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr;
    gap: 10px;
    font-weight: bold;
    padding: 5px 0;
    border-bottom: 1px solid #8B4513;
    margin-bottom: 5px;
}

.market-grid-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr;
    gap: 10px;
    padding: 3px 0;
    border-bottom: 1px solid #DEB887;
}

/* Trading Item Section Styles */
.itemtype-section {
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin: 15px 0 10px 0;
}

/* Market Links Hover Effects */
.market-grid-row a:hover,
.trading-detail a:hover {
    text-decoration: underline;
}

/* Watchlist Button Colors moved to Section 4: BUTTONS & ACTIONS */

/* END SECTION 6: CARD COMPONENT SYSTEM */

/* ===================================================================
   7. NAVIGATION & MENUS
   ================================================================ */

/* ===== 7.1 MAIN NAVIGATION ===== */

/* Main Navigation Bar - Top navigation for site sections */
#navbar {
    padding: 15px 0;
    text-align: center;
}

/* Navigation Links Container */
.navlinks {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Navigation Link Styling */
.navlinks a {
    color: red;
    text-decoration: none;
    padding: 8px 5px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    display: inline-block;
}

.navlinks a:hover {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    transform: scale(1.15) translateY(-2px);
}

/* Navigation Separator */
.navlinks a + a::before {
    content: " | ";
    color: white;
    margin: 0 5px;
}

/* Navigation Time Display */
.navbar-time {
    color: #b8d4f1;
    font-size: 13px;
    padding: 5px 0;
    text-align: center;
    margin-top: 5px;
}

/* Sub-Navigation Bar - Page-specific secondary navigation */
.page-sub-nav {
    padding: 10px 0;
    text-align: center;
    margin-bottom: 15px;
}

.page-sub-nav a {
    color: red;
    text-decoration: none;
    padding: 6px 4px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: inline-block;
}

.page-sub-nav a:hover {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    transform: scale(1.15) translateY(-2px);
}

/* Sub-Navigation Separator */
.page-sub-nav a + a::before {
    content: " | ";
    color: white;
    margin: 0 5px;
}

/* END SECTION 7.1: MAIN NAVIGATION */

/* ===== 7.2 FOOTER NAVIGATION ===== */

/* Footer Container - Site-wide footer with navigation and info */
#footer {
    width: 100%;
    margin: 0 auto;
    margin-top: 10px;
    background-color: #384b59;
    padding: 30px 0;
    color: #fff;
    font-size: 15px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.35);
    text-align: left;
}

/* Footer Menu - Horizontal navigation in footer */
#footerMenu {
    border-bottom: 1px solid rgba(255,255,255,.25);
    width: 370px;
    margin-bottom: 10px;
    margin-left: auto;
    margin-right: auto;
}

#footerMenu li {
    list-style: none;
    float: left;
    padding: 10px 5px;
}

/* Footer Links */
#footer a {
    color: #fff;
    text-decoration: none;
}

#footer a:hover {
    text-decoration: underline;
}

/* Footer Content Container */
.footer_content {
    margin-left: auto;
    margin-right: auto;
    width: 800px;
}

/* Footer Box - Three-column footer layout */
.footer_box {
    width: 33%;
    float: left;
}

/* END SECTION 7.2: FOOTER NAVIGATION */

/* END SECTION 7: NAVIGATION & MENUS */

/* ===================================================================
   8. PAGE-SPECIFIC COMPONENTS (CONSOLIDATED IN PHASE 5)
   ================================================================ */

/* ===== 8.1 OPERATIONS SYSTEM ===== */

/* Operations Page Card Design */
.operations-nav-links {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    font-size: 14px;
}

.operations-nav-links a {
    color: #2c5aa0;
    text-decoration: none;
    padding: 0 10px;
    font-weight: 500;
}

.operations-nav-links a:hover {
    text-decoration: underline;
}

.operations-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.operation-status {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.operation-status.active {
    background: #28a745;
    color: white;
}

.operation-status.underway {
    background: #ff9800;
    color: white;
}

.operation-status.expired {
    background: #dc3545;
    color: white;
}

.operation-status.closed {
    background: #6c757d;
    color: white;
}

.operation-status .countdown {
    font-size: 13px;
    opacity: 0.9;
}

.operation-detail {
    margin-bottom: 14px;
    font-size: 16px;
    color: #4a4a4a;
}

.operation-detail:last-child {
    margin-bottom: 0;
}

.detail-label {
    font-weight: 600;
    color: #1e3a5f;
    display: inline-block;
    min-width: 90px;
}

.open-position {
    color: #dc3545;
    font-style: italic;
}

.roster-count {
    color: #2c5aa0;
    font-weight: 500;
}

.br-count {
    color: #ff9800;
    font-weight: 600;
}

.create-operation-section {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
}

/* .create-operation-btn moved to Section 4: BUTTONS & ACTIONS */

/* Operation Detail Page Cards */
.op-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Admin Section at bottom of page */
.admin-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px dotted #ccc;
}

.admin-section-content {
    text-align: center;
    font-size: 11px;
    color: #999;
}

.admin-label {
    font-style: italic;
    color: #999;
}

/* .admin-link-btn moved to Section 4: BUTTONS & ACTIONS */

.ship-br {
    padding: 4px 10px;
    background: #ff9800;
    color: white;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}



.log-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.log-entries {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.log-entry {
    padding: 12px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
}

.log-entry-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.log-author {
    font-weight: 600;
    color: #1e3a5f;
}

.log-time {
    color: #999;
    font-size: 14px;
}

.log-entry-text {
    color: #333;
    font-size: 15px;
    line-height: 1.5;
}


/* Operations Member Cards */
.member-cards-container.ops-roster {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    padding: 20px;
}

.ops-member-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ops-ship-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.ops-ship-info .ship-link {
    color: #2c5aa0;
    text-decoration: none;
    font-weight: 500;
}

.ops-ship-info .ship-link:hover {
    text-decoration: underline;
}

.ops-ship-info .select-ship-link {
    color: #dc3545;
    text-decoration: none;
    font-style: italic;
}

.ops-ship-info .select-ship-link:hover {
    text-decoration: underline;
}

.ops-ship-info .ship-br {
    padding: 3px 8px;
    background: #ff9800;
    color: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.ops-ship-info .no-ship {
    color: #999;
    font-style: italic;
}

.ops-member-actions {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.ops-member-actions .roster-action-btn img {
    width: 24px;
    height: 24px;
    transition: transform 0.2s ease;
}

.ops-member-actions .roster-action-btn:hover img {
    transform: scale(1.2);
}

.manual-entry .manual-indicator {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    background: #6c757d;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 16px;
}

.manual-label {
    color: #6c757d;
    font-size: 12px;
    font-style: italic;
    margin-left: 5px;
}

.ops-action-section {
    margin-top: 20px;
    text-align: center;
}

/* .declare-winner-btn moved to Section 4: BUTTONS & ACTIONS */

/* END SECTION 8.1: OPERATIONS SYSTEM */

/* ===== 8.2 TRADING SYSTEM ===== */

/* Trading Page Card-Based Layout */

.trading-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.trading-nav-links {
    text-align: center;
    margin: 15px 0 30px 0;
    font-size: 16px;
}

.trading-nav-links a {
    color: #6c757d;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 8px 16px;
    border-radius: 4px;
    display: inline-block;
}

.trading-nav-links a:hover {
    color: #495057;
    text-decoration: underline;
}

.nav-separator {
    margin: 0 20px;
    color: #adb5bd;
    font-weight: 300;
    font-size: 18px;
}

/* END SECTION 8.2: TRADING SYSTEM */

/* ===== 8.3 NAAPI ADMIN INTERFACE ===== */

/* NAAPI Admin Interface Styles - Global Text Color Override */
/* Uses specific element selectors (p, span, div, etc.) instead of wildcard (*) */
/* This approach preserves button styling by not affecting button elements or links styled as buttons */
.dossier-admin-card p,
.dossier-admin-card span,
.dossier-admin-card div,
.dossier-admin-card label,
.dossier-admin-card td,
.dossier-admin-card th,
.dossier-admin-card li,
.dossier-admin-card strong,
.dossier-admin-card em,
.dossier-section-card p,
.dossier-section-card span,
.dossier-section-card div,
.dossier-section-card label,
.dossier-section-card td,
.dossier-section-card th,
.dossier-section-card li,
.dossier-section-card strong,
.dossier-section-card em,
.standard-parchment-card p,
.standard-parchment-card span,
.standard-parchment-card div,
.standard-parchment-card label,
.standard-parchment-card td,
.standard-parchment-card th,
.standard-parchment-card li,
.standard-parchment-card strong,
.standard-parchment-card em,
.standard-red-card p,
.standard-red-card span,
.standard-red-card div,
.standard-red-card label,
.standard-red-card td,
.standard-red-card th,
.standard-red-card li,
.standard-red-card strong,
.standard-red-card em,
.server-status-card p,
.server-status-card span,
.server-status-card div,
.server-status-card label,
.server-status-card td,
.server-status-card th,
.server-status-card li,
.server-status-card strong,
.server-status-card em,
.port-card p,
.port-card span,
.port-card div,
.port-card label,
.port-card td,
.port-card th,
.port-card li,
.port-card strong,
.port-card em,
.item-card p,
.item-card span,
.item-card div,
.item-card label,
.item-card td,
.item-card th,
.item-card li,
.item-card strong,
.item-card em,
.itemtype-card p,
.itemtype-card span,
.itemtype-card div,
.itemtype-card label,
.itemtype-card td,
.itemtype-card th,
.itemtype-card li,
.itemtype-card strong,
.itemtype-card em,
.item-list-card p,
.item-list-card span,
.item-list-card div,
.item-list-card label,
.item-list-card td,
.item-list-card th,
.item-list-card li,
.item-list-card strong,
.item-list-card em,
.detail-item p,
.detail-item span,
.detail-item div,
.detail-item label,
.detail-item td,
.detail-item th,
.detail-item li,
.detail-item strong,
.detail-item em,
.shop-section p,
.shop-section span,
.shop-section div,
.shop-section label,
.shop-section td,
.shop-section th,
.shop-section li,
.shop-section strong,
.shop-section em {
    color: #212529;
}

.dossier-admin-card h3,
.dossier-section-card h3,
.dossier-admin-card h4,
.dossier-section-card h4,
.standard-parchment-card h3,
.standard-parchment-card h4,
.standard-red-card h3,
.standard-red-card h4 {
    color: #495057 !important;
}

/* NAAPI Admin Interface Styles */
.server-status-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #6c757d;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    color: #212529 !important;
}

.server-status-card * {
    color: #212529 !important;
}

.server-status-card.main-server {
    border-color: #007bff;
    background: linear-gradient(135deg, #e7f3ff 0%, #cce7ff 100%);
}

.server-status-card.peace-server {
    border-color: #28a745;
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
}

.server-header {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #212529 !important;
}

.server-detail, .server-age {
    font-size: 14px;
    color: #6c757d !important;
    margin-bottom: 4px;
}

.server-actions {
    margin-top: 10px;
}

.update-message {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    font-weight: bold;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.server-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

/* .server-btn moved to Section 4: BUTTONS & ACTIONS */

.data-nav-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

/* Mobile responsiveness for data nav grid moved to Section 10: MEDIA QUERIES */

.data-nav-section h4 {
    color: #495057 !important;
    margin-bottom: 10px;
    font-size: 16px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 5px;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-link {
    padding: 8px 12px;
    background: #f8f9fa;
    color: #495057 !important;
    text-decoration: none;
    border-radius: 4px;
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: #e9ecef;
    border-left-color: #007bff;
    transform: translateX(3px);
}

.nav-link.active {
    background: #007bff;
    color: white !important;
    border-left-color: #0056b3;
}

.ports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.port-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    color: #212529 !important;
}

.port-card * {
    color: #212529 !important;
}

.port-name {
    font-weight: bold;
    margin-bottom: 8px;
    color: #495057;
}

.port-actions {
    display: flex;
    gap: 8px;
}


.shop-section {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    color: #212529;
}

.shop-section h4 {
    color: #495057;
    margin-bottom: 12px;
    font-size: 16px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 5px;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.item-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
}

.item-header {
    font-weight: bold;
    color: #495057;
    margin-bottom: 4px;
}

.item-type {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
}

.item-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.item-details span {
    font-size: 12px;
    color: #6c757d;
}

.price-sell {
    color: #28a745;
}

.price-buy {
    color: #dc3545;
}

.resources-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.resource-item {
    background: white;
    padding: 4px 8px;
    border-radius: 3px;
    border: 1px solid #dee2e6;
    font-size: 12px;
    color: #495057;
}

.port-details-grid, .item-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.detail-item {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    border-left: 4px solid #007bff;
    color: #212529;
}

.detail-item strong {
    color: #495057;
}

.detail-array pre {
    background: #e9ecef;
    padding: 8px;
    border-radius: 3px;
    font-size: 11px;
    margin-top: 5px;
    overflow-x: auto;
}

.itemtypes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.itemtype-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    text-align: center;
}

.itemtype-link {
    color: #495057;
    text-decoration: none;
    font-weight: bold;
    display: block;
    transition: color 0.2s ease;
}

.itemtype-link:hover {
    color: #007bff;
}

.items-list {
    margin-top: 15px;
}

.item-list-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #212529;
}

.item-name a {
    color: #495057;
    text-decoration: none;
    font-weight: bold;
}

.item-name a:hover {
    color: #007bff;
}

.item-stats {
    display: flex;
    gap: 10px;
}

.stat {
    font-size: 12px;
    color: #6c757d;
    background: white;
    padding: 2px 6px;
    border-radius: 3px;
}

.item-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    color: #212529;
}

.item-stat {
    margin-bottom: 8px;
    font-size: 14px;
}

.item-details-section {
    margin-top: 20px;
}

.item-details-section h4 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 16px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 5px;
}

.json-data-detailed, .json-data-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    color: #212529;
    max-height: 500px;
    overflow-y: auto;
}

/* END SECTION 8.3: NAAPI ADMIN INTERFACE */

/* ===== 8.4 WARDROOM / MEMBER CARDS ===== */

/* Member Card Layout System moved to Section 6.3: MEMBER CARDS */

/* Section headers for rank groups */
.rank-section-header {
    background: linear-gradient(90deg, #007bff, #0056b3);
    color: white;
    padding: 12px 20px;
    margin: 30px 0 20px 0;
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rank-section-header.on-leave {
    background: linear-gradient(90deg, #6c757d, #495057);
}

.rank-section-header.citizens {
    background: linear-gradient(90deg, #28a745, #1e7e34);
}

/* Search section styling */
.naval-register-search {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid #e9ecef;
}

.naval-register-search h3 {
    margin-top: 0;
    color: #495057;
}

/* .search-form moved to Section 5: FORMS & INPUTS */

/* END SECTION 8.4: WARDROOM / MEMBER CARDS */

/* ===== 8.5 SCUTTLEBUTT/FORUMS ===== */

/*################################# */
/*#### these primarily for scuttlebutt ######### */

.username_container_dark {
    width: 100%;
    min-height: 50px;
}
.username_container_light {
    width: 100%;
    min-height: 50px;
}

.username_container_dark a {
    color: #ffffff;
}

.username_container_light a {
    color: #000000;
}
.username_box {
    float: left;
    padding-top: 10px;
    width: 50%;
    font-size: 24px;
    font-style: italic;
}
.username_box img {
    width: 75px;
}

.insignia_box {
    float: left;
    padding: 10px 5px 5px 5px;
}

.insignia_box img {
    height: 30px;
}

.insignia_medal_container {
}

.insignia_medal_box {
    width: 150px;
    height: 200px;
    float: left;
    text-align: center;
}

.insignia_medal_box img {
    width: 100px;
}


.ribbon_wrapping {
    float: left;
}
.ribbon_wrapping img {
    width: 25px;
   margin: 2px 5px;
}
#ribbon_container img {
    height: 150px;
    width: auto;
    height: 25px;
}
#ribbon_container .ribbon_box {
    padding: 5px;
    margin: 5px;
    width: 110px;
    height: 225px;
}

.dossier_insignia img {
    width: 200px;
}

.dossier_nation img {
    float: none;
    height: 25px;
    width: 30px;
}

.dossier_clan_box {
    display: inline-block;
    margin: auto;
    text-align: center;
    width: 100%;
}

.dossier_ribbon_box img {
    width: 100px;
}

.ClanBadgeSilver {
    border: 1px solid black;
    padding: 2px;
    font-size: 18px;
    font-weight: bold;
    background-image: url(../images/silver-metal.png);
    width: 100px;
    height: 25px;
    margin: auto;
    color: #404040;
}
.ClanBadgeGold {
    border: 1px solid black;
    padding: 2px;
    font-size: 18px;
    font-weight: bold;
    background-image: url(../images/gold-metal.png);
    width: 100px;
    height: 25px;
    margin: auto;
    color: #404040;
}

.ClanBadgeSilver-ribbon {
    float: left;
    border: 1px solid black;
    padding: 2px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    background-image: url(../images/silver-metal.png);
    width: 73px;
    height: 22px;
    margin: auto;
    color: #404040;
}

.ClanBadgeGold-ribbon {
    float: left;
    border: 1px solid black;
    padding: 2px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    background-image: url(../images/gold-metal.png);
    width: 73px;
    height: 22px;
    margin: auto;
    color: #404040;
}
.salute_box {
    float: right;
    width: 50%;
}

.scoreboard-container {
    width: 100%;
}

.scoreboard-cell {
    width: 33%;
    height: 150px;
    float: left;
    text-align: center;
    padding: 5px;
    border: 1px solid gray;
}
.scoreboard-cell img {
    height: 80px;
}

.scoreboard-points {
    font-size: 80px;
}

.scoreboard-score {
    font-size: 80px;
}
.post_container {
    border-bottom: 1px solid gray;
    margin-bottom: 20px;
    width: 100%;
    float: left;
    background-color: white;
}

.text_block {
    background-image: url(../images/parchment.jpg);
    float: left;
    width: 100%;
    color: #000000;
    background-color: #f1f3ce;
    box-shadow: 0px 1px 2px rgba(0,0,0,0.15);
    border-radius: 3px;
    padding: 5px;
}

/*################################# */
/*#### these primarily for public_profile  ######### */

.profile_container {
    display: inline-block;
    margin: auto;
    text-align: center;
    width: 100%;
}

.profile_container .username_box {
    display: inline-block;
    padding: 5px;
    width: 100%;
}

.profile_container .ribbon_box {
    display: inline-block;
    width: 410px;
    float: none;
}

.profile_container .ribbon_box img {
float: left;
width: 75px;
}
/*################################# */
#userHeader {
    background: #ffffff;
    background: -moz-linear-gradient(top,  #ffffff 0%, #f0faff 100%);
    background: -webkit-linear-gradient(top,  #ffffff 0%,#f0faff 100%);
    background: linear-gradient(to bottom,  #ffffff 0%,#f0faff 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f0faff',GradientType=0 );
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

#userHeader .userBox {
    float: left;
    text-align: center;
    width: 33.3333%;
    border-left: 1px solid gray;
    padding: 5px;
    display: table;

}

#userHeader .userBox .content {
    display: table-cell;
    vertical-align: middle;
}

#userHeader .userBoxLeft {
    float: left;
    text-align: left;
    width: 60%;
    padding: 5px;
    display: table;
    border-bottom: 1px solid gray;
    background: #ffffff;
}
#userHeader .userBoxRight {
    float: right;
    text-align: right;
    width: 40%;
    padding: 5px;
    display: table;
    border-bottom: 1px solid gray;
    background: #ffffff;

}

#userHeader .userImg {
    height: 50px;
    width: 50px;
    background-color: #9ea5b9;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 50px 50px;
    border-radius: 5px;
    margin-right: 10px;
}
#userHeader .userName span {
    font-size: 20px;
    font-weight: 700;
    color: #0277bd;
    line-height: 30px;
}

#senderHeader {
    position: relative;
    text-align: center;
    margin-top: 5px;
}

#senderHeader img{
    border-radius: 75px;
    height: 75px;
    width: 75px;
}

#senderHeader .senderName {
    display: inline-block;
}
#senderHeader .senderName span {
    font-size: 16px;
    font-weight: 700;
    color: #0277bd;
    line-height: 30px;
}

#senderHeader .subscribe_container {
    display: inline-block;
}

#userHeader button.logout {
    background-color: #e53935;
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: 400;
    text-transform: uppercase;
    padding: 10px 20px;
    margin: 15px 0;
    border-radius: 20px;
    width: auto;
}
#userHeader button.logout span {
    background-image: url(../images/logout_bg.png);
    background-repeat: no-repeat;
    background-position: left center;
    padding-left: 24px;
    line-height: 16px;
}

#userHeader button.login {
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: 400;
    text-transform: uppercase;
    padding: 10px 20px;
    margin: 15px 0;
    border-radius: 20px;
    width: auto;
}

#main {
    background-color: #e1ebf0;
    padding: 0px;
}

#rank_container {
padding: 5px;
width: 100%;
height: 200px;
}

.rank_list {
border: 1px solid white;
    float: left;
    padding: 5px;
    width: 110px;
height: 80px;
   font-size: 12px;
}
.rank_list img {width: 90px;}

#ribbon_container {
width: 100%;
float: left;
}
.widget_label {
    //background-color: #29b6f6;
    width: 100%;
    border: none;
  //  color: #fff;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    padding: 8px 20px;
    border-radius: 0px;
 //   box-shadow: 0px 1px 1px rgba(0,0,0,0.2);
    margin: 10px 0 0px;
    text-shadow: none;
}

.widget_body {
    padding: 20px;
    text-align: left;
}

.queue_message {
    width: auto;
    background-color: #fff;
    border: none;
    padding: 10px;
    text-align: left;
    margin-bottom: 10px;
    box-shadow: 0px 1px 2px rgba(0,0,0,0.15);
    border-radius: 3px;
    text-shadow: none;
    color: #000;
}
.queue_message span {
    display: block;
    float: right;
    width: 320px;
}
.queue_message .qmImg img {
    border-radius: 70px;
    height: 70px;
    width: 70px;

}

.queue_message .qmImg {
    display: block;
    float: left;
    height: 70px;
    width: 70px;
    border-radius: 70px;
    background-color: #9ea5b9;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 70px 70px;
    margin-right: 10px;
}
.queue_message .qmTitle {
    font-size: 18px;
    font-weight: 700;
}
.queue_message .qmSubtitle {
    font-size: 15px;
    color: #747e84;
    margin-bottom: 5px;
    padding-bottom: 5px;
}
.queue_message .qmText {
}
.fullMess {
    width: auto;
    background-color: #fff;
    border: none;
//    padding: 20px;
    text-align: center;
    margin-bottom: 10px;
    box-shadow: 0px 1px 2px rgba(0,0,0,0.15);
    border-radius: 3px;
    position: relative;
}
.fullMess .userCover img {
 //   margin: -20px -20px 0 -20px;
    border-radius: 3px 3px 0 0;
    background-color: #c0c6d5;
display: block;
	 margin-right: auto;
	 margin-left: auto;

}
.fullMess .userImg {
width: 100%;
height: 100px;
	text-align: center;
}
.fullMess .userImg img {
    position: relative;
    width: 108px;
    height: 108px;
    background-color: #9ea5b9;
    border: 4px solid #fff;
    border-radius: 100px;
    margin-top: -20px;
display: block;
	 margin-right: auto;
	 margin-left: auto;
}
.fullMess .userName {
    margin-top: 10px;;
}
.fullMess .userName span {
    font-size: 20px;
    font-weight: 700;
    color: #0277bd;
    line-height: 30px;
}
.subscribe_container {
    margin-top: 0px;
    padding: 0px;
    float: right;
    background-color: #fff;
height: 80px;
}

button.subscribe  {
    background-color: #26c6da;
    border: none;
    padding: 3px;
    color: #fff;
    font-size: 15px;
    margin-top: 5px;
    border-radius: 20px;
    width: 200px;
    height: 40px;
    float: right;
}

.subscribe_container .differential {
    font-size: 15px;
    color: #747e84;
    margin-bottom: 5px;
    padding-bottom: 5px;
    text-align: center;
    width: 200px;
}

.fullMess .messTitle {
    font-size: 22px;
    font-weight: 700;
    line-height: 32px;
}
.fullMess .messCat {
    color: #000;
    font-size: 12px;
    text-transform: uppercase;
    padding: 4px 8px;
    border: none;
    width: 100%;
	   text-align: center;
}
.fullMess .message {
    font-size: 24px;
    padding: 20px;
}

.reply {
    text-align: center;
padding: 20px;
}
.reply textarea {
    width: 358px;
    border: 1px solid #c8d9e2;
    background-color: #e1ebf0;
    border-radius: 3px;
    padding: 10px 20px;
    margin-bottom: 20px;
}
.reply button {
    /*
    float: left;
    width: 190px;
    height: 80px;
    */
    border: none;
    padding: 5px;
    background-color: #0288d1;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    border-radius: 10px;
    text-shadow: 0 1px 1px rgba(0,0,0,0.35);
    margin: 5px;
}
.reply button span {
    font-weight: 400;
}
button.red {
    background-color: #e53935;
}
.reply button.white {
    background-color: #ffffff;
    color: #000000;
}
.reply button.green {
    background-color: #556B2F;
}
.reply button.profileSend {
    width: 100%;
    height: 40px;
}

/* .bidform and .bidform_options moved to Section 5: FORMS & INPUTS */
/* Footer styles moved to Section 7: NAVIGATION & MENUS */

/*#############################################*/
/* id widget divs */

#login_step1 {
    text-align: center;
}

#dynamic_profile {
    padding: 5px;
    text-align: left;
}

#dynamic_profile .questionanswer {
    margin: 0px 0px 20px 20px;;
}

.question_button {
width: 120px;
}

.question_text {
    font-size: 24px;
    font-family: Times,Times New Roman,Georgia,serif;
}

#dynamic_profile form {
    text-align: left;
}

#dynamic_profile button {
    width: 100px;
    margin-right: 10px;
}
.contact_container {
    display: block;
    float: left;
    background-color: #fff;
    border-radius: 5px;
    margin-bottom: 10px;
    width: 100%;
    height: 105px;
}

.contact {
    display: block;
    float: left;
}

.contact_info {
    background-color: #fff;
    color: #000;
    text-align: left;
    text-shadow: none;
    margin-bottom: 10px;
    padding: 5px;
    width: 250px;
}
.contact_info img {
    display: block;
    float: left;
    height: 50px;
    width: 50px;
    border-radius: 50px;
    background-color: #9ea5b9;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 50px 50px;
margin-right: 5px;
}

.contact_info .contactImage {
    float: left;
    height: 80px;
    width: 54px;
}

.contact_info .contactTitle {
    font-size: 16px;
    font-weight: 700;
}

.contact_info .contactName {
    font-size: 14px;
    font-weight: 700;
}

.contact_info .contactPrice {
    font-size: 15px;
    color: #747e84;
}

.contact_button {
}
.contact_button button {
    display: block;
    background-color: #556B2F;
    border: none;
    padding: 3px;
    color: #fff;
    font-size: 15px;
    margin-top: 0px;
    border-radius: 20px;
    width: 220px;
    height: 40px;
    float: left;
}
.action {
    display: block;
    float: left;
    margin: 5px;
    height: 100px;
}

.action button {
    background-color: #26c6da;
    border: none;
    padding: 3px;
    color: #fff;
    font-size: 15px;
    margin-top: 5px;
    border-radius: 20px;
    width: 150px;
}

button.wide_button {
    width:100%;
    height: 40px;
}

#search_input {

}

#search_button {
    width: 70px;
}

#pagination div {
    float: left;
    width: 33%;
}

#pagination .previous {
    text-align: left;
}

#pagination .pages {
    text-align: center;
}

#pagination .next {
    text-align: right;
}

/* END SECTION 8.5: SCUTTLEBUTT/FORUMS */

/* ===== 8.6 PROFILE/DOSSIER ===== */

/* Dossier Profile Cards moved to Section 6.4: DOSSIER CARDS */

/* Standard Themed Card Variants moved to Section 6.2: THEMED CARD VARIANTS */

/* Member Card Wrapper with Commander Controls */
.member-card-wrapper {
    margin-bottom: 10px;
}

/* Ship Info Bar - visible to everyone */
.ship-info-bar {
    padding: 8px 15px;
    background: #f0f4f8;
    border: 1px solid #d1d9e6;
    border-top: none;
    border-radius: 0 0 8px 8px;
    margin-top: -1px;
    font-size: 14px;
    color: #495057;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ship-info-left {
    flex-grow: 1;
    font-weight: 500;
}

.ship-info-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ship-info-bar a {
    color: #2c5aa0;
    text-decoration: none;
    font-weight: 500;
}

.ship-info-bar a:hover {
    text-decoration: underline;
}

.ship-br {
    color: #6c757d;
    margin-left: 8px;
}

/* .no-ship moved to Section 9: UTILITY CLASSES */

.select-ship-link {
    color: #dc3545;
    font-weight: 500;
}

/* .roster-control-btn moved to Section 4: BUTTONS & ACTIONS */

.port-lookup-results {
    margin-top: 15px;
    padding: 12px;
    background-color: #f0ead6;
    border: 1px solid #c4a574;
    border-radius: 4px;
}

.port-lookup-results a {
    display: inline-block;
    margin: 4px 8px 4px 0;
    padding: 6px 12px;
    background-color: #8b6f3f;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.port-lookup-results a:hover {
    background-color: #654321;
    text-decoration: none;
}

.operations-time-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
    align-items: end;
}

.operations-nav-link {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3a5f 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 15px;
    transition: all 0.2s ease;
}

.operations-nav-link:hover {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5aa0 100%);
    text-decoration: none;
    transform: translateY(-1px);
}


.port-autocomplete-container {
    position: relative;
}

.port-autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #f8f4e6;
    border: 2px solid #8b6f3f;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 99999;
    box-shadow: 0 4px 8px rgba(101, 67, 33, 0.25);
}

.port-autocomplete-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(139, 111, 63, 0.2);
    color: #2c1810;
    transition: background-color 0.2s ease;
}

.port-autocomplete-item:last-child {
    border-bottom: none;
}

.port-autocomplete-item:hover,
.port-autocomplete-item.highlighted {
    background-color: #8b6f3f;
    color: #ffffff;
}

.port-autocomplete-loading {
    padding: 10px 12px;
    color: #6b5b42;
    font-style: italic;
    text-align: center;
}

.port-autocomplete-no-results {
    padding: 10px 12px;
    color: #6b5b42;
    font-style: italic;
    text-align: center;
}

/* Hide the old search button when autocomplete is active */
.autocomplete-enabled .operations-form-button.port-search-btn {
    display: none;
}

/* Port selection validation states */
#portlookup.port-selected {
    border-color: #28a745;
    background-color: #f8fff9;
}

#portlookup.port-error {
    border-color: #dc3545;
    background-color: #fff8f8;
}

/* Ship Selection Modal Styles */

.ship-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.ship-modal-content {
    background-color: #f8f4e6;
    margin: 10% auto;
    padding: 0;
    border: 2px solid #8b6f3f;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 8px 24px rgba(101, 67, 33, 0.4);
}

.ship-modal-header {
    background: linear-gradient(135deg, #8b6f3f 0%, #a0825a 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 6px 6px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ship-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.ship-modal-close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.ship-modal-close:hover {
    color: #ffddaa;
}

.ship-modal-body {
    padding: 20px;
}

/* .ship-form-field moved to Section 5: FORMS & INPUTS */

.ship-autocomplete-container {
    position: relative;
}

#shipSearch {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #8b6f3f;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    color: #2c1810;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

#shipSearch:focus {
    outline: none;
    border-color: #654321;
    background-color: #fffef8;
}

.ship-autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #f8f4e6;
    border: 2px solid #8b6f3f;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 99999;
    box-shadow: 0 4px 8px rgba(101, 67, 33, 0.25);
}

.ship-autocomplete-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(139, 111, 63, 0.2);
    color: #2c1810;
    transition: background-color 0.2s ease;
}

.ship-autocomplete-item:last-child {
    border-bottom: none;
}

.ship-autocomplete-item:hover,
.ship-autocomplete-item.highlighted {
    background-color: #8b6f3f;
    color: #ffffff;
}

.ship-autocomplete-loading {
    padding: 10px 12px;
    color: #6b5b42;
    font-style: italic;
    text-align: center;
}

.ship-autocomplete-no-results {
    padding: 10px 12px;
    color: #6b5b42;
    font-style: italic;
    text-align: center;
}

.ship-modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: flex-end;
}

/* .ship-select-btn and .ship-cancel-btn moved to Section 4: BUTTONS & ACTIONS */
/* Ship selection validation states moved to Section 9: UTILITY CLASSES */

/* END SECTION 8.6: PROFILE/DOSSIER */

/* END SECTION 8: PAGE-SPECIFIC COMPONENTS */


/* ===================================================================
   9. UTILITY CLASSES (CONSOLIDATED IN PHASE 7)
   ================================================================ */

/* ===== 9.1 EMPTY STATE UTILITIES ===== */

/* No Data Message - Generic empty state indicator */
.no-data {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 4px;
    margin: 10px 0;
}

/* No Ship Selected - Empty state for ship selection */
.no-ship {
    color: #6c757d;
    font-style: italic;
}

/* No Reserves - Empty state for operation reserves */
.no-reserves {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
}

/* No Log Entries - Empty state for operation logs */
.no-log-entries {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 30px;
}

/* ===== 9.2 VALIDATION & ERROR STATES ===== */

/* Ship Selection Validation States */
#shipSearch.ship-selected {
    border-color: #28a745;
    background-color: #f8fff9;
}

#shipSearch.ship-error {
    border-color: #dc3545;
    background-color: #fff8f8;
}

/* END SECTION 9: UTILITY CLASSES */


/* ===================================================================
   10. MEDIA QUERIES (CONSOLIDATED IN PHASE 6)
   ================================================================ */

/* ===== 10.1 SMALL DEVICES (max-width: 600px) ===== */

/* Data Navigation Grid - Mobile Single Column */
@media (max-width: 600px) {
    .data-nav-grid {
        grid-template-columns: 1fr;
    }
}

/* Ship Modal - Mobile Full Width */
@media (max-width: 600px) {
    .ship-modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .ship-modal-header {
        padding: 12px 16px;
    }

    .ship-modal-body {
        padding: 16px;
    }

    .ship-modal-buttons {
        flex-direction: column;
    }

    .ship-modal-buttons .card-btn-primary,
    .ship-modal-buttons .card-btn-secondary {
        width: 100%;
    }
}

/* ===== 10.2 TABLETS AND LARGER PHONES (max-width: 768px) ===== */

/* Trading System - Mobile Responsive */
@media (max-width: 768px) {
    .trading-container {
        padding: 15px;
    }

    .trading-search-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .trading-cards-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .standard-card-header, .trading-card-header h4 {
        font-size: 16px;
    }

    .standard-card-body, .trading-card-body {
        padding: 15px;
    }

    .standard-card-footer, .trading-card-footer {
        padding: 12px 15px;
    }

    #port-search-input,
    #item-search-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Member Cards, Welcome Cards, Dossier - Mobile Responsive */
@media (max-width: 768px) {
    .member-cards-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .member-card-header {
        gap: 8px;
    }

    .welcome-hero-card,
    .welcome-mission-card,
    .welcome-video-card {
        padding: 20px;
        margin-bottom: 20px;
    }

    .welcome-hero-card .cta-button {
        padding: 12px 25px;
        font-size: 16px;
    }

    .welcome-mission-card h2 {
        font-size: 22px;
    }

    .welcome-mission-card .mission-statement {
        font-size: 16px;
    }

    .welcome-video-card iframe {
        width: 100%;
        height: 200px;
    }

    .member-card-name {
        font-size: 16px;
    }

    .search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form input[type="text"] {
        min-width: auto;
    }

    .dossier-profile-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .dossier-profile-header {
        flex-direction: column;
        text-align: center;
    }

    .dossier-profile-medals {
        margin-left: 0;
        justify-content: center;
        padding-left: 0;
    }
}

/* Operations Forms - Mobile Responsive */
@media (max-width: 768px) {
    .operations-form-container {
        margin: 0 10px;
    }

    .operations-time-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .operations-form-card {
        padding: 15px;
    }

    .port-lookup-results a {
        display: block;
        margin: 6px 0;
    }
}

/* Server Toggle - Mobile Responsive */
@media (max-width: 768px) {
    .server-toggle-container {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .server-toggle-group {
        flex-direction: column;
        width: 100%;
        align-items: center;
    }

    .server-toggle-btn {
        width: 130px;
        height: 52px;
    }

    .server-toggle-container-small {
        gap: 6px;
        margin: 8px 0 12px 0;
        padding: 6px;
    }

    .server-toggle-btn-small {
        width: 85px;
        height: 34px;
    }
}

/* END SECTION 10: MEDIA QUERIES */
