.manage-faction-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 8px;
    box-sizing: border-box;
}

/* HEADER */
.mf-header {
    display: flex;
    margin-bottom: 8px;
    border-bottom: 1px solid #333;
    padding-bottom: 6px;
}

.mf-crest {
    width: 72px;
    height: 72px;
    margin-right: 8px;
}

.mf-crest-icon {
    width: 72px;
    height: 72px;
    background-color: #111;
    border: 1px solid #555;
    background-size: cover;
    background-position: center;
}

.mf-header-text {
    flex: 1;
}

.mf-faction-name {
    font-size: 18px;
    font-weight: bold;
}

.mf-faction-motto {
    font-style: italic;
    color: #ccc;
    margin-top: 2px;
}

.mf-faction-description {
    margin-top: 4px;
    font-size: 13px;
}

.mf-header-meta {
    margin-top: 4px;
    font-size: 12px;
    color: #aaa;
    display: flex;
    gap: 12px;
}

/* BODY */
.mf-body {
    display: flex;
    flex: 1;
    gap: 8px;
    margin-top: 6px;
}

.mf-left-column {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mf-right-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* SECTIONS */
.mf-section {
    border: 1px solid #333;
    padding: 6px;
    background-color: rgba(0, 0, 0, 0.4);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mf-section-title {
    font-weight: bold;
    margin-bottom: 4px;
    border-bottom: 1px solid #444;
    padding-bottom: 2px;
}

/* LEADERSHIP */
.mf-leadership {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mf-leadership-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mf-role-label {
    width: 70px;
    font-size: 12px;
    color: #ccc;
}

.mf-slot,
.mf-slot-row {
    flex: 1;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.mf-slot-entry {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px;
    border: 1px solid #444;
    background-color: rgba(20, 20, 20, 0.8);
    font-size: 12px;
}

.mf-slot-empty {
    opacity: 0.5;
    font-style: italic;
}

.mf-rank-icon {
    width: 16px;
    height: 16px;
    background-size: cover;
    background-position: center;
}

/* MEMBERS */
.mf-members-list,
.mf-invites-list {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #333;
    padding: 4px;
    background-color: rgba(10, 10, 10, 0.7);
}

.mf-member-row,
.mf-invite-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 0;
    border-bottom: 1px solid #222;
    font-size: 12px;
}

.mf-member-info {
    display: flex;
    align-items: center;
    gap: 4px;
}

.mf-member-name {
    font-size: 12px;
}

.mf-member-role {
    font-size: 11px;
    color: #aaa;
}

.mf-member-actions button,
.mf-invite-actions button {
    margin-left: 2px;
}

/* INVITES */
.mf-invite-actions {
    margin-top: 4px;
    display: flex;
    gap: 4px;
}

.mf-invite-actions input {
    flex: 1;
    padding: 2px 4px;
    font-size: 12px;
}

/* ACTION BUTTONS */
.mf-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mf-actions button {
    width: 100%;
}

/* BUTTON STYLES */
.btn-primary {
    background-color: #2b6cb0;
    color: #fff;
    border: 1px solid #1a4a7a;
    cursor: pointer;
}

.btn-secondary {
    background-color: #4a5568;
    color: #fff;
    border: 1px solid #2d3748;
    cursor: pointer;
}

.btn-warning {
    background-color: #b7791f;
    color: #fff;
    border: 1px solid #744210;
    cursor: pointer;
}

.btn-danger {
    background-color: #c53030;
    color: #fff;
    border: 1px solid #742a2a;
    cursor: pointer;
}

button:disabled {
    opacity: 0.5;
    cursor: default;
}
