/* ============================================
   GLOBAL
============================================ */

.hidden { display: none !important; }

body {
    background: #0d0d0d;
    color: #e5e5e5;
    font-family: Arial, sans-serif;
    margin: 0;
}

a {
    color: #ffdd99;
    text-decoration: none;
}

a:hover {
    color: #ffffff;
}

/* ============================================
   HEADER
============================================ */

.header-bar {
    width: 100%;
    background: linear-gradient(90deg, #0a0a0a 0%, #161616 50%, #0a0a0a 100%);
    border-bottom: 2px solid #b8860b;
    padding: 10px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    gap: 20px;
    box-shadow: 0 2px 16px rgba(255,180,70,0.15);
}

/* Alliance brand */
.header-brand {
    display: flex;
    align-items: baseline;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.brand-tag {
    font-size: 1.15rem;
    font-weight: 900;
    color: #ffd700;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(255,215,0,0.6);
}

.brand-name {
    font-size: 1rem;
    font-weight: bold;
    color: #ffb347;
    letter-spacing: 0.5px;
}

.brand-motto {
    font-size: 0.72rem;
    color: #888;
    font-style: italic;
    letter-spacing: 0.3px;
}

.header-left a,
.header-right a {
    color: #ffb347;
    margin-right: 20px;
    font-weight: bold;
}

.header-left a:last-child,
.header-right a:last-child {
    margin-right: 0;
}

.header-left a:hover,
.header-right a:hover {
    color: #ffd9a0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-right select {
    background: #1a1a1a;
    border: 1px solid #555;
    color: #ffdd99;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
}

.logout-btn {
    color: #ff6666;
    font-weight: bold;
}

.logout-btn:hover {
    color: #ff9999;
}

.admin-link {
    color: #ff6666 !important;
}

.admin-link:hover {
    color: #ff9999 !important;
}

/* ============================================
   MAIN CONTENT
============================================ */

.main-content {
    padding: 30px;
    box-sizing: border-box;
}

/* ============================================
   PANEL BOXES
============================================ */

.panel {
    background: #111;
    border: 1px solid #333;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 180, 70, 0.1);
}

/* ============================================
   DASHBOARD GLOW TILES
============================================ */

.grid-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.dashboard-top-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.dashboard-title {
    margin: 0;
    flex: 1;
}

.dash-highlight-stack {
    width: min(840px, 100%);
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 10px;
}

.dash-highlight-card {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 183, 71, 0.2), rgba(255, 120, 60, 0.12));
    border: 1px solid rgba(255, 190, 95, 0.55);
    border-radius: 10px;
    padding: 12px 34px 12px 12px;
    box-shadow: 0 0 16px rgba(255, 170, 70, 0.18);
}

.dash-highlight-card-critical {
    background: linear-gradient(135deg, rgba(195, 45, 45, 0.26), rgba(120, 16, 16, 0.18));
    border: 1px solid rgba(255, 95, 95, 0.62);
    box-shadow: 0 0 16px rgba(170, 55, 55, 0.3);
}

.dash-highlight-card-critical h2 {
    color: #ffd6d6;
}

.dash-highlight-card-critical p,
.dash-highlight-card-critical a {
    color: #ffeaea;
}

.dash-highlight-card.is-dismissed {
    display: none;
}

.dash-highlight-card h2 {
    margin: 0 0 4px;
    color: #ffd67f;
    font-size: 1rem;
}

.dash-highlight-card p {
    margin: 0;
    color: #f3e6cf;
    font-size: 0.86rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dash-highlight-card a {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.84rem;
    color: #fff1ce;
    text-decoration: underline;
    font-weight: bold;
}

.dash-highlight-more {
    margin-left: 10px;
    opacity: 0.95;
}

.dash-highlight-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(20, 20, 20, 0.35);
    color: #fff;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.dash-highlight-close:hover {
    background: rgba(0, 0, 0, 0.55);
}

.dash-news-cta-wrap {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.dash-news-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 208, 122, 0.55);
    background: linear-gradient(135deg, rgba(255, 196, 98, 0.2), rgba(255, 140, 90, 0.12));
    color: #ffe1af;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.dash-news-cta:hover {
    border-color: rgba(255, 223, 150, 0.75);
    box-shadow: 0 0 14px rgba(255, 185, 90, 0.28);
    transform: translateY(-1px);
}

.dash-news-cta-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    padding: 0 9px;
    background: rgba(255, 170, 80, 0.16);
    border: 1px solid rgba(255, 219, 155, 0.4);
    color: #fff6df;
    font-size: 0.82rem;
    font-weight: 800;
}

.dash-manage-cta-wrap {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dash-manage-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(111, 186, 255, 0.45);
    background: linear-gradient(135deg, rgba(75, 135, 220, 0.25), rgba(42, 87, 170, 0.15));
    color: #dcecff;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.dash-manage-cta:hover {
    border-color: rgba(159, 214, 255, 0.8);
    box-shadow: 0 0 14px rgba(85, 160, 255, 0.3);
    transform: translateY(-1px);
}


.glow-tile {
    display: block;
    background: #111;
    border: 1px solid #333;
    padding: 20px;
    border-radius: 12px;
    text-decoration: none;
    color: #ffdd99;
    box-shadow: 0 0 20px rgba(255, 180, 70, 0.15);
    transition: 0.2s;
}

.glow-tile:hover {
    box-shadow: 0 0 25px rgba(255, 180, 70, 0.35);
    transform: translateY(-3px);
}

.glow-tile h2 {
    font-size: 1.3rem;
    margin: 0 0 6px 0;
    color: #ffb347;
}

.glow-tile p {
    margin: 0;
    color: #ccc;
    font-size: 0.9rem;
}

/* ============================================
   LOGIN BOX
============================================ */

.login-brand {
    text-align: center;
    margin: 40px auto 16px;
}

.login-brand-tag {
    font-size: 2.8rem;
    font-weight: 900;
    color: #ffd700;
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(255,215,0,0.7), 0 0 40px rgba(255,215,0,0.3);
    line-height: 1;
}

.login-brand-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #ffb347;
    letter-spacing: 2px;
    margin-top: 4px;
    text-shadow: 0 0 10px rgba(255,180,70,0.4);
}

.login-brand-motto {
    font-size: 0.85rem;
    color: #777;
    font-style: italic;
    margin-top: 6px;
    letter-spacing: 0.5px;
}

.login-box {
    max-width: 380px;
    margin: 80px auto;
    background: #111;
    border: 1px solid #333;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 0 25px rgba(255, 180, 70, 0.15);
}

.login-title {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 25px;
    color: #ffb347;
}

.login-box input,
.login-box button {
    width: 100%;
    box-sizing: border-box;
    padding: 14px;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 15px;
}

.login-box input {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #ffdd99;
    transition: 0.2s;
}

.login-box input:focus {
    border-color: #ffb347;
    box-shadow: 0 0 10px rgba(255, 180, 70, 0.25);
}

.login-box button {
    background: #ffb347;
    color: #000;
    border: none;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 5px;
    transition: 0.2s;
}

.login-box button:hover {
    background: #ffdd99;
}

.login-box .register-link {
    text-align: center;
    margin-top: 10px;
}

.login-box .register-link a {
    color: #ffdd99;
}

.login-box .register-link a:hover {
    color: #ffffff;
}

/* ============================================
   TABLE WRAPPER (SCROLL)
============================================ */

.table-wrapper {
    max-height: 75vh;
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
}

/* Tasks distribution needs overlay pickers to extend outside the table box. */
.table-wrapper.tasks-table-wrapper {
    max-height: none;
    overflow: visible;
}

/* ============================================
   SQUAD TABLE
============================================ */

.squads-topbar {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.squads-topbar-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.squads-topbar h1 {
    margin: 0;
}

.squads-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    flex: 1 1 980px;
    max-width: 100%;
}

.squads-summary-card {
    background: linear-gradient(180deg, #171717 0%, #111 100%);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 8px 9px;
    box-shadow: 0 0 18px rgba(255, 180, 70, 0.08);
    display: flex;
    flex-direction: column;
    position: relative;
}

.squads-summary-card h2 {
    margin: 0 0 6px 0;
    font-size: 0.74rem;
    color: #ffb347;
}

.squads-summary-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4px;
    margin-bottom: 6px;
}

.squads-summary-card-header h2 {
    margin: 0;
}

.squads-summary-showall {
    background: none;
    border: none;
    color: #888;
    font-size: 0.64rem;
    cursor: pointer;
    padding: 0;
    white-space: nowrap;
    text-decoration: underline dotted;
    line-height: 1.4;
    flex-shrink: 0;
}

.squads-summary-showall:hover {
    color: #ffb347;
}

.squads-summary-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
}

.squads-summary-card.is-expanded .squads-summary-list {
    max-height: 260px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #444 transparent;
}

.squads-summary-extra {
    display: none !important;
}

.squads-summary-card.is-expanded .squads-summary-extra {
    display: flex !important;
}

.squads-summary-list li {
    display: flex;
    align-items: baseline;
    gap: 4px;
    padding: 4px 0;
    border-bottom: 1px solid #222;
    font-size: 0.74rem;
}

.squads-summary-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.squads-summary-own-item {
    background: rgba(255, 180, 70, 0.07);
    border-radius: 3px;
    padding-left: 3px;
}

.squads-summary-own {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-top: 6px;
    padding-top: 5px;
    border-top: 1px solid #ffb347;
    font-size: 0.74rem;
    background: rgba(255, 180, 70, 0.06);
    border-radius: 0 0 6px 6px;
    padding: 5px 3px 0;
    flex-shrink: 0;
}

.squads-summary-own .squads-summary-rank {
    color: #ffb347;
}

.squads-summary-own .squads-summary-name {
    color: #ffdd99;
    font-weight: bold;
}

.squads-summary-own .squads-summary-strength {
    color: #7ad67a;
    font-weight: bold;
}

.squads-summary-rank {
    min-width: 16px;
    color: #ffdd99;
    font-weight: bold;
}

.squads-summary-name {
    flex: 1;
    color: #e5e5e5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.squads-summary-strength {
    color: #7ad67a;
    font-weight: bold;
    white-space: nowrap;
}

.squads-summary-empty {
    color: #888;
    font-style: italic;
}

.squads-mobile-controls {
    display: none;
    margin: 0 0 12px 0;
}

.squads-table-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #444;
    color: #ffdd99;
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

.squads-table-toggle-btn:hover {
    background: #242424;
}

/* Edit squads button */
.squads-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    border: 1px solid #ffb347;
    color: #ffb347;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.88rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.squads-edit-btn:hover {
    background: #2a2010;
}

.squads-edit-btn--mobile {
    width: 100%;
    margin-top: 8px;
}

@media (max-width: 760px) {
    #squads-edit-btn {
        display: none;
    }
}

/* ============================================
   SQUAD EDIT MODAL
============================================ */

.squads-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.72);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.squads-modal-overlay[hidden] {
    display: none;
}

.squads-modal {
    background: #141414;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 28px 24px 20px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 0 40px rgba(255,180,70,0.2);
    box-sizing: border-box;
}

.squads-modal h2 {
    margin: 0 0 20px 0;
    color: #ffb347;
    font-size: 1.15rem;
}

.squads-modal-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.squads-modal-row {
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 10px 12px 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.squads-modal-row legend {
    color: #ffdd99;
    font-size: 0.82rem;
    padding: 0 4px;
}

.squads-modal-select {
    flex: 0 0 auto;
    width: 110px;
}

.squads-modal .squads-modal-select.inline-select {
    width: 110px;
    flex: 0 0 110px;
    min-width: 0;
}

.squads-modal-input {
    flex: 1;
    width: auto;
    min-width: 0;
}

.squads-modal .squads-modal-input.inline-input {
    width: 80px;
    flex: 0 0 80px;
}

/* Make modal inputs larger and visually consistent */
.squads-modal input,
.squads-modal select,
.squads-modal textarea,
.squads-modal .squads-modal-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 8px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #ffdd99;
    font-size: 1rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.squads-modal input:focus,
.squads-modal select:focus,
.squads-modal textarea:focus {
    border-color: #ffb347;
    box-shadow: 0 0 10px rgba(255,180,70,0.12);
    outline: none;
}

/* helper class to group two inputs side-by-side but stack on small screens */
.modal-pair {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.squads-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

.squads-modal-actions .btn-green,
.squads-modal-actions .btn-red {
    flex: 1;
    text-align: center;
    padding: 10px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.squads-modal-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.squads-modal-status {
    min-height: 1.2em;
    font-size: 0.88rem;
    text-align: center;
}

.squads-modal-status--ok  { color: #66ff66; }
.squads-modal-status--err { color: #ff6666; }

@media (max-width: 480px) {
    .squads-modal {
        padding: 20px 14px 16px;
    }
}

.squad-table {
    width: 100%;
    border-collapse: collapse;
    background: #111;
    border: 1px solid #333;
    box-shadow: 0 0 25px rgba(255, 180, 70, 0.1);
}


.squad-table thead th {
    background: #1a1a1a;
    color: #ffb347;
    padding: 6px 8px;
    text-align: left;
    font-size: 0.9rem;
    border-bottom: 1px solid #333;

    /* Sticky Header */
    position: sticky;
    top: -1px;
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.squad-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #222;
    font-size: 0.9rem;
}

@media (max-width: 1100px) {
    .squads-summary-grid {
        grid-template-columns: repeat(2, minmax(200px, 1fr));
        max-width: none;
    }
}

@media (max-width: 760px) {
    .squads-mobile-controls {
        display: block;
    }

    .squads-summary-grid {
        display: none;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .squads-summary-grid.squads-summary-visible {
        display: grid;
    }

    .squad-table thead th,
    .squad-table td {
        padding: 6px 8px;
        font-size: 0.8rem;
    }
}

@media (max-width: 600px) {
    .squads-modal-row { flex-direction: column; align-items: stretch; }
    .modal-pair { flex-direction: column; gap: 8px; }
    .squads-modal-actions { flex-direction: column-reverse; }
    .squads-modal-actions a.btn-yellow { width: 100%; text-align: center; }
    /* Make action buttons fit inside the modal on small screens */
    .squads-modal-actions > * {
        width: 100%;
        box-sizing: border-box;
        padding: 10px 12px;
        font-size: 0.98rem;
    }
    .squads-modal-actions button,
    .squads-modal-actions a {
        display: block;
    }
}

.squad-table tr:hover {
    background: #181818;
}

.squad-table tr.task-row-underfilled td {
    background: rgba(255, 220, 0, 0.14);
}

.squad-table tr.task-row-underfilled:hover td {
    background: rgba(255, 220, 0, 0.2);
}

/* ============================================
   INLINE EDITING
============================================ */

.editable {
    cursor: pointer;
    color: #ffdd99;
}

.editable:hover {
    background: #222;
}

.inline-input {
    width: 80px;
    padding: 6px;
    background: #1a1a1a;
    border: 1px solid #555;
    color: #ffdd99;
    border-radius: 6px;
}

.inline-select {
    padding: 6px;
    background: #1a1a1a;
    border: 1px solid #555;
    color: #ffdd99;
    border-radius: 6px;
}

.task-responsible-picker {
    position: relative;
    width: 100%;
    min-width: 0;
    overflow: visible;
}

.task-lead-picker {
    position: relative;
    width: 100%;
    min-width: 0;
    overflow: visible;
}

#tasks-table td {
    vertical-align: middle;
}

#tasks-table {
    width: 100%;
    table-layout: fixed;
}

#tasks-table thead th,
#tasks-table td {
    font-size: 0.94rem;
}

#tasks-table thead th {
    font-size: 1.12rem;
    font-weight: 700;
}

#tasks-table th.tasks-col-no,
#tasks-table td.tasks-col-no,
#tasks-table th.tasks-col-min,
#tasks-table td.tasks-col-min {
    text-align: center;
}

#tasks-table .tasks-col-min-head {
    display: inline-block;
    white-space: nowrap;
    line-height: 1.05;
    text-align: center;
    font-size: 1.12rem;
}

#tasks-table thead th,
#tasks-table td {
    padding-top: 4px;
    padding-bottom: 4px;
}

#tasks-table input[type="text"],
#tasks-table input[type="number"],
#tasks-table textarea,
#tasks-table select {
    width: 100%;
    box-sizing: border-box;
    background: linear-gradient(180deg, #171717 0%, #121212 100%);
    border: 1px solid #474747;
    color: #f3f3f3;
    border-radius: 8px;
    padding: 5px 8px;
    font-size: 0.92rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

#tasks-table input[type="text"]:focus,
#tasks-table input[type="number"]:focus,
#tasks-table textarea:focus,
#tasks-table select:focus {
    outline: none;
    border-color: #ffb347;
    box-shadow: 0 0 0 3px rgba(255, 179, 71, 0.16);
    background: #1b1b1b;
}

#tasks-table textarea {
    min-height: 0;
    height: auto;
    line-height: 1.2;
    resize: none;
    overflow-y: auto;
}

#tasks-table .task-no-select {
    min-width: 72px;
    max-width: 78px;
    margin: 0 auto;
    text-align: center;
    text-align-last: center;
    font-weight: 700;
    color: #ffd49a;
}

#tasks-table .tasks-col-min .task-min-input {
    max-width: 112px;
    margin: 0 auto;
    text-align: center;
}

.task-responsible-toggle {
    width: 100%;
    max-width: 100%;
    min-height: 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    padding: 4px 8px;
    background: linear-gradient(180deg, #171717 0%, #121212 100%);
    border: 1px solid #474747;
    color: #ffd9a8;
    border-radius: 8px;
    cursor: pointer;
    white-space: normal;
    overflow: hidden;
    line-height: 1.2;
    font-size: 0.92rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.task-lead-toggle {
    width: 100%;
    max-width: 100%;
    min-height: 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    padding: 4px 8px;
    background: linear-gradient(180deg, #171717 0%, #121212 100%);
    border: 1px solid #474747;
    color: #b9d8ff;
    border-radius: 8px;
    cursor: pointer;
    white-space: normal;
    overflow: hidden;
    line-height: 1.2;
    font-size: 0.92rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.task-responsible-text {
    display: block;
    width: 100%;
    max-height: 100%;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    overflow: hidden;
    font-size: 0.92rem;
    line-height: 1.25;
}

.task-lead-text {
    display: block;
    width: 100%;
    max-height: 100%;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    overflow: hidden;
    font-size: 0.92rem;
    line-height: 1.25;
}

.task-responsible-hoverbox {
    position: absolute;
    z-index: 58;
    pointer-events: none;
    top: 0;
    left: 0;
    right: 0;
    min-height: 100%;
    max-height: 220px;
    overflow: auto;
    display: none;
    box-sizing: border-box;
    padding: 4px 8px;
    background: linear-gradient(180deg, #1b1b1b 0%, #131313 100%);
    border: 1px solid #c18a34;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
    color: #ffe3bb;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    line-height: 1.25;
    font-size: 0.92rem;
}

.task-responsible-picker.has-overflow:not(.is-panel-open):hover .task-responsible-hoverbox,
.task-responsible-picker.has-overflow:not(.is-panel-open):focus-within .task-responsible-hoverbox {
    display: block;
}

.task-responsible-toggle.has-value {
    align-items: center;
}

.table-wrapper #tasks-table .task-responsible-toggle {
    font-size: 1rem;
    line-height: 1.35;
}

.table-wrapper #tasks-table .task-lead-toggle {
    font-size: 1rem;
    line-height: 1.35;
}

.task-responsible-toggle:hover:not(:disabled) {
    border-color: #c18a34;
    background: #1b1b1b;
}

.task-lead-toggle:hover:not(:disabled) {
    border-color: #c18a34;
    background: #1b1b1b;
}

.task-responsible-toggle:focus-visible {
    outline: none;
    border-color: #ffb347;
    box-shadow: 0 0 0 3px rgba(255, 179, 71, 0.16);
}

.task-lead-toggle:focus-visible {
    outline: none;
    border-color: #ffb347;
    box-shadow: 0 0 0 3px rgba(255, 179, 71, 0.16);
}

.task-responsible-toggle:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.task-lead-toggle:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.task-responsible-panel {
    position: absolute;
    z-index: 60;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 190px;
    overflow: auto;
    background: #0f0f10;
    border: 1px solid #5a5a5a;
    border-radius: 10px;
    padding: 4px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.52), 0 0 0 1px rgba(255, 179, 71, 0.12);
}

.task-lead-panel {
    position: absolute;
    z-index: 60;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 190px;
    overflow: auto;
    background: #0f0f10;
    border: 1px solid #5a5a5a;
    border-radius: 10px;
    padding: 4px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.52), 0 0 0 1px rgba(255, 179, 71, 0.12);
}

.task-responsible-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 3px 6px;
    border-radius: 7px;
    color: #eee;
    font-size: 0.92rem;
}

.task-lead-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 3px 6px;
    border-radius: 7px;
    color: #eee;
    font-size: 0.92rem;
}

.task-responsible-item:hover {
    background: rgba(255, 179, 71, 0.08);
}

.task-lead-item:hover {
    background: rgba(255, 179, 71, 0.08);
}

.task-responsible-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #ffb347;
}

.task-lead-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #ffb347;
}

/* ============================================
   TYPE COLORS
============================================ */

.type-Tank { color: #ff6666; font-weight: bold; }
.type-Air { color: #66aaff; font-weight: bold; }
.type-Missile { color: #66ff66; font-weight: bold; }
.type-Mixed { color: #ffdd66; font-weight: bold; }
.type-None { color: #888; font-weight: bold; }

/* ============================================
   SORTABLE HEADERS
============================================ */

.sortable {
    cursor: pointer;
    position: relative;
}

.sortable::after {
    content: "⇅";
    font-size: 0.8rem;
    color: #666;
    margin-left: 6px;
}

.sorted-asc::after {
    content: "↑";
    color: #ffb347;
}

.sorted-desc::after {
    content: "↓";
    color: #ffb347;
}

/* ============================================
   ADMIN BADGES & BUTTONS
============================================ */

.badge {
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.85rem;
}

/* Compact action buttons inside table wrapper to reduce row height */
.table-wrapper .btn-yellow,
.table-wrapper .btn-blue,
.table-wrapper .btn-danger,
.table-wrapper .btn-green,
.table-wrapper button,
.table-wrapper a.btn {
    padding: 6px 8px;
    font-size: 0.82rem;
    border-radius: 6px;
    line-height: 1;
    white-space: nowrap;
}

/* ============================================
   HAMBURGER BUTTON (mobile nav)
============================================ */

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-left: auto;
    z-index: 100;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    background: #ffb347;
    border-radius: 2px;
    transition: 0.25s;
}

.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Nav wrapper (desktop: flex row) */
.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    justify-content: space-between;
}

/* ============================================
   RESPONSIVE — TABLET (≤ 900px)
============================================ */
@media (max-width: 900px) {
    .brand-motto { display: none; }

    .grid-tiles {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-content { padding: 20px 16px; }

    /* Squads / Admin: reduce padding */
    .squad-table thead th,
    .squad-table td {
        padding: 8px 8px;
        font-size: 0.88rem;
    }
}

/* ============================================
   RESPONSIVE — MOBILE (≤ 600px)
============================================ */
@media (max-width: 600px) {
    /* Header */
    .header-bar {
        flex-wrap: wrap;
        padding: 10px 14px;
        gap: 0;
    }

    .header-brand {
        flex: 1;
    }

    .brand-name  { font-size: 0.85rem; }
    .brand-motto { display: none; }

    .hamburger { display: flex; }

    /* Nav: hidden by default, shown when .open */
    .header-nav {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        background: #111;
        border-top: 1px solid #333;
        padding: 12px 0 8px;
        gap: 0;
    }

    .header-nav.open { display: flex; }

    .header-left {
        display: flex;
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .header-left a {
        display: block;
        padding: 12px 16px;
        margin: 0;
        border-bottom: 1px solid #222;
        font-size: 1.05rem;
    }

    .header-right {
        width: 100%;
        padding: 10px 16px;
        justify-content: space-between;
    }

    /* Page headings */
    h1 { font-size: 1.3rem; text-align: center; }

    /* Dashboard tiles: 1 column */
    .grid-tiles {
        grid-template-columns: 1fr;
    }

    .glow-tile { padding: 16px; }

    .main-content { padding: 12px 10px; }

    .dashboard-top-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 14px;
    }

    .dashboard-title {
        text-align: center;
    }

    .dash-highlight-stack {
        width: 100%;
        grid-template-columns: 1fr;
    }

    .dash-news-cta-wrap {
        align-items: flex-start;
    }

    .dash-news-cta {
        font-size: 0.8rem;
        padding: 7px 10px;
    }

    .dash-manage-cta {
        font-size: 0.8rem;
        padding: 7px 10px;
    }

    /* Panel */
    .panel { padding: 14px; }

    /* Tables: horizontal scroll, compact */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
    }

    .squad-table {
        min-width: 560px; /* force scroll rather than wrapping */
    }

    .squad-table thead th,
    .squad-table td {
        padding: 8px 6px;
        font-size: 0.82rem;
        white-space: nowrap;
    }

    /* Admin user table */
    .admin-table {
        min-width: 480px;
    }

    /* Login / Register */
    .login-brand { margin-top: 24px; }
    .login-brand-tag  { font-size: 2rem; }
    .login-brand-name { font-size: 1rem; }

    .login-box {
        margin: 12px auto;
        padding: 20px 14px;
    }

    .login-box input,
    .login-box button {
        padding: 12px;
        font-size: 0.95rem;
    }

    /* Inline editing inputs */
    .inline-input  { width: 60px; }

    .main-content { padding: 16px 12px; }

    /* Tables: horizontal scroll */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Login brand */
    .login-brand { margin-top: 24px; }
    .login-brand-tag  { font-size: 2rem; }
    .login-brand-name { font-size: 1rem; }

    .login-box {
        margin: 12px auto;
        padding: 20px 16px;
    }
}

/* ============================================
   PENDING USERS TILE (Dashboard Admin)
============================================ */

.glow-tile--pending-users {
    cursor: default;
}

.glow-tile--pending-users:hover {
    transform: none;
}

/* ============================================================
   Allies page (allies.php)
   ============================================================ */
.allies-rule-banner {
    display: inline-block;
    background: rgba(200,0,0,0.18);
    border: 1px solid #8b0000;
    color: #ff6b6b;
    font-size: 0.92rem;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 8px;
    margin-bottom: 28px;
    letter-spacing: 0.04em;
}

.allies-section {
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.allies-section-title {
    font-size: 1.1rem;
    color: #ffb347;
    margin: 0 0 6px 0;
}

.allies-section-sub {
    color: #aaa;
    font-size: 0.83rem;
    margin: 0 0 16px 0;
}

.allies-server-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.allies-full-server {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,215,0,0.06);
    border: 1px solid #c8a84b;
    border-radius: 8px;
    padding: 8px 14px;
}

.allies-server-num {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffd700;
    font-family: monospace;
}

.allies-full-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* Server badge (table) */
.allies-server-badge {
    display: inline-block;
    background: #222;
    border: 1px solid #555;
    color: #ccc;
    font-size: 0.78rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}
.allies-server-badge--ours {
    background: rgba(255,215,0,0.1);
    border-color: #c8a84b;
    color: #ffd700;
}

/* Table */
.allies-table-wrap {
    overflow-x: auto;
}

.allies-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.allies-table th {
    text-align: left;
    padding: 8px 12px;
    color: #ffb347;
    border-bottom: 1px solid #333;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.allies-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #1e1e1e;
    vertical-align: middle;
}

.allies-table tbody tr:last-child td { border-bottom: none; }
.allies-table tbody tr:hover td { background: rgba(255,255,255,0.03); }

.allies-row--allied-server td { background: rgba(255,215,0,0.03); }

.allies-server-header-row td {
    background: #1a1a2e;
    border-top: 2px solid #333;
    border-bottom: none;
    padding: 10px 12px 4px;
}
.allies-server-header-row--allied td {
    background: rgba(255,215,0,0.06);
    border-top-color: rgba(255,215,0,0.25);
}
.allies-server-header-cell {
    line-height: 1;
}
.allies-server-header-cell .allies-server-badge {
    font-size: 1.05rem;
    font-weight: 700;
    padding: 3px 10px;
    letter-spacing: 0.03em;
}

.allies-clan-tag {
    font-family: monospace;
    font-weight: bold;
    color: #e0c070;
    font-size: 0.95rem;
}

.allies-forbidden {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* Rule badges */
.rule-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.rule-badge--trucks {
    background: rgba(180,90,0,0.25);
    border: 1px solid #b45309;
    color: #fbbf24;
}
.rule-badge--trains {
    background: rgba(29,78,216,0.2);
    border: 1px solid #1d4ed8;
    color: #93c5fd;
}
.rule-badge--attacks {
    background: rgba(185,28,28,0.25);
    border: 1px solid #b91c1c;
    color: #fca5a5;
}
.rule-badge--tasks {
    background: rgba(109,40,217,0.2);
    border: 1px solid #6d28d9;
    color: #c4b5fd;
}

@media (max-width: 600px) {
    .allies-section { padding: 14px 12px; }
    .allies-table th, .allies-table td { padding: 7px 8px; }
    .allies-server-num { font-size: 1rem; }
}

/* Allies edit-mode controls */
.allies-edit-toggle {
    background: #2a2a2a;
    border: 1px solid #555;
    color: #ffb347;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
}
.allies-edit-toggle:hover { background: #333; border-color: #ffb347; }

.allies-save-msg { font-size: 0.85rem; font-weight: bold; }
.allies-save-msg--ok  { color: #4ade80; }
.allies-save-msg--err { color: #f87171; }

.edit-server-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.edit-server-input,
.edit-clan-server,
.edit-clan-tag {
    background: #1a1a1a;
    border: 1px solid #444;
    color: #eee;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}
.edit-server-input { width: 100px; }
.edit-clan-server  { width: 80px; }
.edit-clan-tag     { width: 90px; }

.allies-del-btn {
    background: none;
    border: 1px solid #7f1d1d;
    color: #f87171;
    border-radius: 4px;
    cursor: pointer;
    padding: 2px 7px;
    font-size: 0.8rem;
    line-height: 1.4;
}
.allies-del-btn:hover { background: rgba(185,28,28,0.2); }

.allies-add-btn {
    margin-top: 8px;
    background: rgba(255,179,70,0.1);
    border: 1px dashed #c8a84b;
    color: #ffb347;
    padding: 5px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.83rem;
}
.allies-add-btn:hover { background: rgba(255,179,70,0.2); }

.allies-save-btn {
    background: #16a34a;
    border: none;
    color: #fff;
    padding: 7px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
}
.allies-save-btn:hover:not(:disabled) { background: #15803d; }
.allies-save-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.allies-cancel-btn {
    background: #333;
    border: 1px solid #555;
    color: #ccc;
    padding: 7px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}
.allies-cancel-btn:hover { background: #3a3a3a; }

.th-center, .td-center { text-align: center; }
.td-center input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; }

.pending-users-list {
    list-style: none;
    margin: 10px 0 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
}

.pending-users-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px;
    background: #1a1a1a;
    border-radius: 6px;
    border: 1px solid #333;
}

.pending-username {
    flex: 1;
    color: #e5e5e5;
    font-size: 0.88rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-activate-inline {
    padding: 4px 10px;
    background: #4caf50;
    color: #000;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
}

.btn-activate-inline:hover {
    background: #6ddd6d;
    color: #000;
}

.btn-activate-gast {
    background: #66aaff;
}
.btn-activate-gast:hover {
    background: #88ccff;
    color: #000;
}

.pending-users-empty {
    margin-top: 8px;
    opacity: 0.55;
    font-size: 0.85em;
    color: #999;
}

@media (max-width: 600px) {
    .pending-users-list {
        max-height: 180px;
    }
}

.badge-admin { background: #ff6666; color: #000; }
.badge-dsadmin { background: #ffaa33; color: #000; }
.badge-ally-admin { background: #4ade80; color: #000; }
.badge-user { background: #66aaff; color: #000; }
.badge-tcadmin { background: #ffd700; color: #000; }
.badge-aradmin { background: #9f7aea; color: #000; }
.badge-r4 { background: #22d3ee; color: #000; }
.badge-gast { background: #94a3b8; color: #000; }
.badge-pending { background: #f97316; color: #000; }

.badge-active { background: #66ff66; color: #000; }
.badge-inactive { background: #888; color: #000; }

/* Role dropdown */
.role-dropdown-wrap {
    display: inline-block;
    position: relative;
    vertical-align: middle;
    margin-right: 6px;
}
.roles-popup {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 200;
    background: #1e1e2e;
    border: 1px solid #444;
    border-radius: 10px;
    padding: 12px;
    min-width: 180px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.6);
}
.roles-popup--open {
    display: block;
}
.role-pill {
    display: block;
    margin-bottom: 6px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    background: #2a2a3a;
    color: #aaa;
    border: 1px solid #3a3a4a;
    transition: background 0.15s, color 0.15s;
    user-select: none;
}
.role-pill input[type=checkbox] {
    display: none;
}
.role-pill--on {
    background: #3b5bdb;
    color: #fff;
    border-color: #5c7cfa;
}
.role-pill:hover {
    background: #33334a;
    color: #ddd;
}
.role-pill--on:hover {
    background: #4c6ef5;
}

.btn-green,
.btn-red,
.btn-yellow,
.btn-blue {
    padding: 8px 12px;
    border-radius: 6px;
    color: #000;
    font-weight: bold;
    text-decoration: none;
    margin-right: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-block;
}

.btn-green  { background: #66ff66; }
.btn-red    { background: #ff6666; }
.btn-yellow { background: #ffdd66; }
.btn-blue   { background: #66aaff; }

.btn-green:hover,
.btn-red:hover,
.btn-yellow:hover,
.btn-blue:hover {
    opacity: 0.8;
    color: #000;
}

/* Highlighted theme button — use brand gold with subtle glow to draw attention */
.btn-highlight {
    padding: 8px 12px;
    border-radius: 6px;
    color: #000;
    font-weight: bold;
    text-decoration: none;
    margin-right: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-block;
    background: linear-gradient(180deg, #ffb347 0%, #ffd66d 100%);
    box-shadow: 0 6px 24px rgba(255,180,70,0.22), inset 0 -2px 0 rgba(0,0,0,0.06);
    transition: box-shadow 0.15s ease, transform 0.12s ease;
}
.btn-highlight:hover {
    box-shadow: 0 10px 34px rgba(255,180,70,0.32), inset 0 -2px 0 rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.roles-form input[type="checkbox"] { transform: translateY(2px); margin-right:4px; }
.roles-form label { cursor: pointer; }

/* Subtle back button used site-wide for navigational back links */
.btn-back {
    padding: 6px 10px;
    border-radius: 6px;
    color: #ffdd99;
    background: transparent;
    border: 1px solid rgba(255,180,70,0.06);
    font-weight: normal;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-block;
    margin-right: 6px;
}
.btn-back:hover {
    background: rgba(255,180,70,0.04);
    box-shadow: none;
    color: #ffdca6;
}

/* User notification banner shown under the header (compact) */
.user-notices { max-width:1100px; margin:8px auto; padding:0 12px; }
.notice { display:flex; align-items:center; gap:10px; background: rgba(255,215,0,0.06); border:1px solid rgba(255,180,70,0.08); padding:6px 10px; border-radius:6px; color:#ffefc7; font-size:0.92rem; }
.notice strong { color:#ffd700; font-weight:700; margin-right:6px; font-size:0.95rem; }
.notice-content { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#fff; opacity:0.95; }
.notice .notice-actions { margin-left:auto; flex-shrink:0; }
.notice .notice-close { background:transparent; border:0; color:#ccc; font-size:1.05rem; cursor:pointer; margin-left:8px; }

@media (max-width: 760px) {
    .user-notices { padding:0 10px; }
    .notice {
        position: relative;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 10px 12px;
        font-size:0.9rem;
    }
    .notice strong {
        display: block;
        margin-right: 0;
    }
    .notice-content {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
    .notice .notice-actions {
        margin-left: 0;
        width: 100%;
    }
    .notice .notice-actions a {
        display: block;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
    .notice .notice-close {
        position: absolute;
        top: 6px;
        right: 8px;
        margin-left: 0;
    }
}

/* Leader rules: mobile layout — image above, text below */
@media (max-width: 760px) {
    .leader-rules-panel {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    .leader-rules-panel .leader-image,
    #image-preview-wrap {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .leader-rules-panel .leader-image img,
    #image-preview-wrap img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
        margin: 0 0 10px 0 !important;
    }
}

/* Temp-PW Box (Admin) */
.temp-pw-box {
    margin: 16px 0;
    padding: 16px 20px;
    background: #1a1a1a;
    border: 1px solid #ffb347;
    border-radius: 10px;
    box-shadow: 0 0 18px rgba(255,180,70,0.15);
}

.temp-pw-box p {
    margin: 0 0 10px;
    color: #e5e5e5;
}

.temp-pw-display {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.temp-pw-display code {
    font-size: 1.3rem;
    font-family: monospace;
    color: #ffd700;
    background: #111;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 6px 14px;
    letter-spacing: 2px;
    user-select: all;
}

.temp-pw-hint {
    margin: 10px 0 0 !important;
    font-size: 0.83rem;
    color: #ffb347;
    opacity: 0.9;
}

/* ============================================
   PROFILE DROPDOWN
============================================ */

.profile-menu {
    position: relative;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid #555;
    border-radius: 20px;
    padding: 5px 12px 5px 8px;
    color: #ffb347;
    font-size: 0.88rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.profile-btn:hover {
    background: rgba(255,179,71,0.1);
    border-color: #ffb347;
    color: #ffd9a0;
}

.profile-icon {
    font-size: 1rem;
    line-height: 1;
}

.profile-caret {
    font-size: 0.75rem;
    opacity: 0.7;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 280px;
    background: #1a1a1a;
    border: 1px solid #b8860b;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.6);
    padding: 16px;
    z-index: 9999;
}

.profile-dropdown-title {
    font-size: 0.85rem;
    font-weight: bold;
    color: #ffd700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #333;
}

.profile-dropdown label {
    display: flex;
    flex-direction: column;
    font-size: 0.78rem;
    color: #aaa;
    margin-bottom: 10px;
    gap: 4px;
}

.profile-dropdown label input {
    background: #111;
    border: 1px solid #444;
    border-radius: 6px;
    color: #f0f0f0;
    padding: 7px 9px;
    font-size: 0.88rem;
    transition: border-color 0.15s;
    width: 100%;
    box-sizing: border-box;
}

.profile-dropdown label input:focus {
    outline: none;
    border-color: #b8860b;
}

.pf-divider {
    border: none;
    border-top: 1px solid #333;
    margin: 12px 0;
}

.pf-optional {
    font-size: 0.72rem;
    opacity: 0.55;
    font-style: italic;
}

.pf-required {
    color: #ff8888;
    font-size: 0.75rem;
}

.pf-save-btn {
    width: 100%;
    margin-top: 6px;
    padding: 9px;
    background: #b8860b;
    border: none;
    border-radius: 7px;
    color: #000;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s;
}

.pf-save-btn:hover:not(:disabled) {
    background: #d4a017;
}

.pf-save-btn:disabled {
    opacity: 0.5;
    cursor: wait;
}

.pf-delete-btn {
    width: 100%;
    margin-top: 8px;
    padding: 9px;
    background: #5a1111;
    border: 1px solid #a93232;
    border-radius: 7px;
    color: #ffd7d7;
    font-weight: bold;
    font-size: 0.86rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.pf-delete-btn:hover:not(:disabled) {
    background: #7a1515;
    border-color: #d44;
}

.pf-delete-btn:disabled {
    opacity: 0.5;
    cursor: wait;
}

.pf-message {
    font-size: 0.82rem;
    border-radius: 5px;
    padding: 7px 10px;
    margin-bottom: 8px;
}

.pf-success {
    background: rgba(100,200,100,0.15);
    border: 1px solid #4a9;
    color: #6ddb8b;
}

.pf-error {
    background: rgba(200,80,80,0.15);
    border: 1px solid #c55;
    color: #f99;
}

.input-field {
    width: 100%;
    padding: 14px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #ffdd99;
    border-radius: 8px;
    margin-bottom: 15px;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: #ffb347;
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

.btn-primary:hover {
    background: #ffdd99;
}

.error-box {
    background: #ff4444;
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
}

.success-box {
    background: #2d7a2d;
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
}

.btn-danger {
    padding: 8px 12px;
    border-radius: 6px;
    background: #c62828;
    color: #000;
    font-weight: bold;
    text-decoration: none;
    margin-right: 6px;
    display: inline-block;
}

.btn-danger:hover {
    opacity: 0.8;
}

