   Portfolio / Visit Card Styles
   =================================================================== */

.portfolio-card {
    position: relative;
    overflow: hidden;
}

.portfolio-banner {
    position: relative;
    width: 100%;
    height: 260px;
    border-radius: 12px;
    overflow: hidden;
    background-position: center;
    background-size: cover;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}

.portfolio-banner--fallback {
    background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tier-list-container {
    width: 100%;
}

.tier-row {
    position: relative;
}

.tier-label {
    width: 80px;
    min-width: 80px;
}

.tier-name-input {
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.tier-heroes-container {
    min-height: 60px;
    border: 2px dashed transparent;
    transition: all 0.3s ease;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.tier-heroes-container.drag-over {
    border-color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), 0.1) !important;
}

.hero-badge {
    cursor: move;
    user-select: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.hero-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.old-team-item {
    transition: all 0.2s ease;
}

.old-team-item:hover {
    transform: translateX(5px);
}

.portfolio-page .card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.portfolio-page .card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Card View Styling */
.portfolio-card {
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 80px rgba(0,0,0,0.4);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tier-label {
        width: 60px;
        min-width: 60px;
    }
    
    .tier-name-input {
        font-size: 0.9rem;
    }
    
    .hero-badge {
        font-size: 0.8rem;
    }
}

/* Hero Icon Badges */
.hero-icon-badge {
    display: inline-block;
    width: 42px;
    height: 42px;
    margin: 3px;
    cursor: move;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hero-icon-badge:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border-color: rgba(59, 130, 246, 0.6);
}

.hero-icon-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-icon-badge span {
    font-size: 0.7rem;
    padding: 2px;
    display: block;
    text-align: center;
    line-height: 1.2;
}

.hero-icon-badge.dragging {
    opacity: 0.4;
    cursor: grabbing;
}

.hero-drop-indicator {
    width: 42px;
    height: 42px;
    border: 2px dashed rgba(59, 130, 246, 0.8);
    border-radius: 6px;
    margin: 3px;
    background: rgba(59, 130, 246, 0.1);
    pointer-events: none;
    flex-shrink: 0;
}

/* Simplified tier list */
.tier-label {
    width: 70px;
    min-width: 70px;
}

.tier-heroes-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    transition: all 0.2s ease;
}

/* Previous teams simplified */
.previous-teams-list .team-item {
    padding: 0;
}

.previous-teams-list .team-item:hover {
    transform: none;
}

/* Remove excessive animations */
.old-team-item {
    transition: none;
}

.portfolio-page .card:hover {
    transform: none;
}

.portfolio-card:hover {
    transform: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.portfolio-modal-body {
    max-height: 55vh;
    overflow-y: auto;
    padding: 1rem 1.25rem;
    background: transparent;
}

.portfolio-card {
    position: relative;
    max-width: 520px;
    border-radius: 24px;
    padding: 32px;
    color: #f8fafc;
    background: rgba(17, 24, 39, 0.92);
    box-shadow: 0 25px 60px rgba(0,0,0,0.35);
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.portfolio-card__backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.35;
    filter: blur(1px);
}

.portfolio-card__body {
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.portfolio-card__avatar {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.85);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.portfolio-card__avatar--placeholder {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    border: 3px dashed rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.08);
}

.portfolio-card__tagline {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.78);
    margin-bottom: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.portfolio-card__contacts .contact-line {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.85);
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portfolio-card__contacts .contact-note {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.65);
    margin-top: 0.35rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.portfolio-card__section {
    background: rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 16px 18px;
}

.portfolio-card__section-title {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.68);
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.hero-highlight-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-highlight {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(59,130,246,0.18);
    border: 1px solid rgba(255,255,255,0.12);
    color: #f8fafc;
    font-size: 0.78rem;
    font-weight: 600;
}

.hero-highlight img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 3px 10px rgba(0,0,0,0.35);
}

.hero-highlight span {
    white-space: nowrap;
    color: #fef9c3;
    font-weight: 600;
}

.hero-highlight-row--page .hero-highlight {
    background: rgba(59,130,246,0.12);
    border-color: rgba(59,130,246,0.25);
    color: #fef9c3;
}

.hero-highlight-row--page .hero-highlight span {
    color: #fef9c3;
    font-weight: 600;
}

.hero-tier-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tier-hero-icon {
    width: 58px;
    min-width: 58px;
    text-align: center;
    border-radius: 12px;
    padding: 6px 4px 4px;
    background: rgba(59,130,246,0.08);
    border: 1px solid rgba(59,130,246,0.18);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.tier-hero-icon img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}

.tier-hero-icon span {
    font-size: 0.68rem;
    line-height: 1.2;
    color: #fef9c3;
    font-weight: 600;
}

.team-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.team-chip {
    background: rgba(255,255,255,0.12);
    color: #f8fafc;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    display: inline-block;
}

.stat-card {
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 14px;
    height: 100%;
}

.stat-card__title {
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.75);
    margin-bottom: 0.35rem;
}

.stat-card__value {
    font-size: 0.9rem;
    color: #f8fafc;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.tier-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.74rem;
    color: rgba(255,255,255,0.65);
}

.tier-pill {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.1);
}

.hero-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hero-tag {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.14);
    border: 1px solid rgba(99, 102, 241, 0.25);
    font-size: 0.85rem;
}

.tier-block {
    background: rgba(255,255,255,0.04);
    border-radius: 14px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.portfolio-page__header {
    margin-top: 0;
    padding-top: 1rem;
}

.portfolio-page__header--no-banner {
    margin-top: 0;
}

.portfolio-page__avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(17, 24, 39, 0.85);
    box-shadow: 0 15px 40px rgba(0,0,0,0.35);
}

.portfolio-page__avatar--placeholder {
    background: #d1d5db;
    border: 5px dashed rgba(51,65,85,0.35);
}

.portfolio-page__banner-wrapper {
    margin-top: 1.5rem;
}

.portfolio-page__banner-preview {
    width: 100%;
    height: 110px;
    border-radius: 14px;
    background-position: center;
    background-size: cover;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.18);
}

.portfolio-page__banner-preview--fallback {
    background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.portfolio-card-modal {
    max-width: 610px;
}

.portfolio-card-modal__content {
    background: rgba(9, 14, 24, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 80px rgba(0,0,0,0.55);
    overflow: visible;
    border-radius: 20px;
    backdrop-filter: blur(12px);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.portfolio-card-modal.modal-dialog {
    margin: 10vh auto;
}

.portfolio-card-modal .modal-header {
    padding: 0.6rem 1.2rem;
    background: rgba(6, 11, 20, 0.95);
    border: none;
    color: #f8fafc;
    border-radius: 20px 20px 0 0;
}

.portfolio-card-modal .modal-title {
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

.portfolio-card-modal .modal-body {
    max-height: none;
    overflow: visible;
    padding: 1.75rem 2rem 2.25rem;
    background: transparent;
    display: flex;
    justify-content: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.portfolio-card-modal__frame {
    position: relative;
    display: inline-block;
    transform: scale(1);
    transform-origin: top center;
    transition: transform 0.2s ease;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.portfolio-card-modal__frame:hover {
    transform: scale(1.02);
}

.portfolio-page__hero-row {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.portfolio-page__header-col {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.portfolio-page__name {
    margin-bottom: 0.25rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: hidden;
}

.portfolio-page__banner-wrapper {
    margin-top: 0.75rem;
}

.portfolio-page__banner-preview {
    width: 100%;
    height: 110px;
    border-radius: 14px;
    background-position: center;
    background-size: cover;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}
.portfolio-page-section .portfolio-card__section {
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 18px 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.portfolio-page-section .portfolio-card__section-title {
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.72);
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.portfolio-card__text {
    color: rgba(255,255,255,0.82);
    font-size: 0.93rem;
    line-height: 1.55;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: hidden;
}

.tier-badge {
    background: rgba(59,130,246,0.35);
    border-radius: 999px;
    padding: 4px 14px;
    color: #fef9c3;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portfolio-page__banner-preview--fallback {
    background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Portfolio Textarea Styling */
.portfolio-textarea {
    resize: none !important;
}

.portfolio-textarea:focus {
    resize: none !important;
}

.char-counter {
    font-weight: 600;
    transition: color 0.2s ease;
}

/* Portfolio Preview Selector Styling */
.portfolio-editor-header .btn-group {
    flex-shrink: 0;
    display: flex;
    gap: 0;
}

.portfolio-editor-header .btn-group .btn {
    white-space: nowrap;
    min-width: auto;
}

.portfolio-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.portfolio-editor-header h1 {
    margin: 0;
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .portfolio-editor-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .portfolio-editor-header .btn-group {
        width: 100%;
        display: flex;
    }
    
    .portfolio-editor-header .btn-group .btn {
        flex: 1;
    }
}

/* Public Portfolio View Selector */
#portfolioViewContainer {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* ===================================================================
   MANAGE TEAMS PAGE - MODERN STYLING
   =================================================================== */

.manage-teams-page {
    padding: 2rem;
    min-height: 100vh;
}

.manage-teams-header {
    position: relative;
    background: linear-gradient(135deg, rgba(26, 35, 58, 0.95), rgba(17, 24, 39, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 24px 72px rgba(10, 14, 25, 0.5), 0 0 0 1px rgba(255, 159, 28, 0.1);
    overflow: hidden;
}

.manage-teams-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(255, 159, 28, 0.08), transparent 55%),
                radial-gradient(circle at bottom right, rgba(46, 196, 182, 0.08), transparent 60%);
    opacity: 0.9;
    pointer-events: none;
}

.manage-teams-header-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.manage-teams-title-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.manage-teams-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 159, 28, 0.2), rgba(46, 196, 182, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 159, 28, 0.3);
    box-shadow: 0 8px 24px rgba(255, 159, 28, 0.15);
}

.manage-teams-icon-wrapper i {
    font-size: 1.75rem;
    color: var(--accent-primary);
    filter: drop-shadow(0 2px 4px rgba(255, 159, 28, 0.3));
}

.manage-teams-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, rgba(255, 159, 28, 0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.manage-teams-subtitle {
    font-size: 1rem;
    color: rgba(248, 250, 252, 0.7);
    margin: 0;
}

.manage-teams-create-btn {
    background: linear-gradient(135deg, rgba(255, 159, 28, 0.2), rgba(46, 196, 182, 0.2));
    border: 1px solid rgba(255, 159, 28, 0.3);
    color: var(--accent-primary);
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.manage-teams-create-btn:hover {
    background: linear-gradient(135deg, rgba(255, 159, 28, 0.3), rgba(46, 196, 182, 0.3));
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 159, 28, 0.2);
    border-color: rgba(255, 159, 28, 0.5);
}

.manage-teams-content {
    position: relative;
}

.manage-teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.manage-team-card-wrapper {
    position: relative;
}

.manage-team-card-wrapper.selected .manage-team-card {
    border-color: rgba(255, 159, 28, 0.5);
    box-shadow: 0 8px 32px rgba(255, 159, 28, 0.2);
}

.manage-team-card {
    background: rgba(30, 30, 30, 0.4);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.manage-team-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.selected-indicator {
    background: linear-gradient(135deg, rgba(255, 159, 28, 0.2), rgba(46, 196, 182, 0.2));
    border: 1px solid rgba(255, 159, 28, 0.3);
    color: var(--accent-primary);
    padding: 0.35rem 0.75rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    backdrop-filter: blur(10px);
    white-space: nowrap;
    margin-top: 0.5rem;
}

.selected-indicator i {
    font-size: 0.7rem;
}

.manage-team-card-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.manage-team-card-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.manage-team-card-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}

.manage-team-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.manage-team-logo-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 159, 28, 0.2), rgba(46, 196, 182, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 159, 28, 0.3);
    flex-shrink: 0;
}

.manage-team-logo-placeholder i {
    font-size: 1.5rem;
    color: var(--accent-primary);
}

.manage-team-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.manage-team-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

.manage-team-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.manage-team-creator-badge {
    color: var(--accent-primary);
    font-size: 1.25rem;
    cursor: help;
    flex-shrink: 0;
}

.manage-team-card-body {
    padding: 1.5rem;
    flex: 1;
}

.manage-team-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 1.25rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.manage-team-meta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.manage-team-meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.manage-team-meta-item i {
    color: var(--accent-primary);
    width: 18px;
    text-align: center;
}

.manage-team-card-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.manage-team-btn-select {
    flex: 1;
    min-width: 140px;
}

.manage-team-btn-edit,
.manage-team-btn-delete {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.manage-teams-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 5rem 2rem;
    background: rgba(30, 30, 30, 0.15);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
}

.manage-teams-empty-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.manage-teams-empty-icon i {
    font-size: 2.5rem;
    color: white;
}

.manage-teams-empty-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.manage-teams-empty-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 500px;
    margin: 0 auto 2rem;
}

@media (max-width: 768px) {
    .manage-teams-page {
        padding: 1rem;
    }
    
    .manage-teams-header {
        padding: 1.5rem;
    }
    
    .manage-teams-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .manage-teams-title-section {
        width: 100%;
    }
    
    .manage-teams-create-btn {
        width: 100%;
    }
    
    .manage-teams-grid {
        grid-template-columns: 1fr;
    }
    
    .manage-team-card-footer {
        flex-direction: column;
    }
    
    .manage-team-btn-select {
        width: 100%;
    }
    
    .selected-indicator {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }
    
    .selected-indicator i {
        font-size: 0.65rem;
    }
    
    .manage-team-card-header-right {
        gap: 0.4rem;
    }
}

[data-theme="light"] .manage-teams-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .manage-team-card {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .manage-team-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .manage-teams-empty-state {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(0, 0, 0, 0.1);
}

/* =================================================================================================
   SCRIM CHAT INTERFACE - DISCORD-STYLE CHAT
   ================================================================================================= */

/* Main Container */
.scrim-chat-page {
    min-height: calc(100vh - 80px);
    background: transparent;
    padding: 1.5rem;
}

.scrim-chat-header {
    margin-bottom: 1.5rem;
}

.scrim-chat-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.scrim-chat-title i {
    color: var(--accent-primary);
}

/* Layout */
.scrim-chat-layout {
    display: flex;
    gap: 1.5rem;
    height: calc(100vh - 180px);
    min-height: 600px;
}

/* Sidebar - Channel List */
.scrim-chat-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.scrim-chat-channels {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
}

.scrim-channel-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(226, 232, 240, 0.7);
    font-weight: 500;
}

.scrim-channel-item:hover:not(.locked) {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateX(4px);
    color: rgba(226, 232, 240, 0.9);
}

.scrim-channel-item.active {
    background: rgba(255, 159, 28, 0.15);
    border-color: rgba(255, 159, 28, 0.3);
    color: var(--accent-primary);
}

.scrim-channel-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.02);
}

.scrim-channel-item i:first-child {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.scrim-channel-item span {
    flex: 1;
}

.scrim-channel-item .fa-lock {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Main Chat Area */
.scrim-chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.scrim-chat-container {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0; /* Important for flex scrolling */
    position: relative;
}

/* Channel Header Bar */
.scrim-chat-header-bar {
    padding: 1rem 1.5rem;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.scrim-chat-header-bar h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.scrim-chat-header-bar i {
    color: var(--accent-primary);
}

/* Messages Wrapper */
.scrim-chat-messages-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem;
    position: relative;
    min-height: 0; /* Important for flex scrolling */
    max-height: 100%;
}

.scrim-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 1rem;
}

/* Loading State */
.scrim-chat-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: rgba(226, 232, 240, 0.6);
    gap: 0.75rem;
}

/* Empty State */
.scrim-chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: rgba(226, 232, 240, 0.5);
}

.scrim-chat-empty i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.4;
    color: rgba(226, 232, 240, 0.3);
}

.scrim-chat-empty p {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0.5rem 0;
    color: rgba(226, 232, 240, 0.7);
}

.scrim-chat-empty small {
    font-size: 0.95rem;
    color: rgba(226, 232, 240, 0.5);
}

/* Messages */
.scrim-message {
    display: flex;
    gap: 0.75rem;
    padding: 0.25rem 0;
    transition: background 0.2s ease;
    border-radius: 4px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

.scrim-message:hover {
    background: rgba(255, 255, 255, 0.03);
}

.scrim-message-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.scrim-message-avatar:hover {
    transform: scale(1.1);
}

.scrim-message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scrim-message-content {
    flex: 1;
    min-width: 0;
}

.scrim-message-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.scrim-message-author {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: color 0.2s ease;
}

.scrim-message-author:hover {
    color: var(--accent-primary);
}

.scrim-message-discord {
    font-weight: 400;
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.6);
    font-style: italic;
}

.scrim-message-time {
    font-size: 0.75rem;
    color: rgba(226, 232, 240, 0.4);
    font-weight: 400;
}

.scrim-message-text {
    color: rgba(226, 232, 240, 0.9);
    line-height: 1.5;
    word-wrap: break-word;
    word-break: break-word;
}

/* More Messages Indicator */
.scrim-chat-more-messages-indicator {
    text-align: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.scrim-chat-more-messages-indicator small {
    color: rgba(226, 232, 240, 0.5);
    font-size: 0.85rem;
}

.scrim-chat-more-messages-indicator i {
    margin-right: 0.5rem;
}

.scrim-message-own .scrim-message-author {
    color: var(--accent-primary);
}

/* Scroll to Bottom Button */
.scrim-scroll-to-bottom {
    position: absolute;
    bottom: 5rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: none;
    color: white;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 10;
}

.scrim-scroll-to-bottom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.scrim-scroll-to-bottom:active {
    transform: translateY(0);
}

/* Input Wrapper - Fixed at bottom */
.scrim-chat-input-wrapper {
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    min-height: 60px;
}

.scrim-custom-message-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 159, 28, 0.2);
    border: 1px solid rgba(255, 159, 28, 0.3);
    color: var(--accent-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.scrim-custom-message-btn:hover {
    background: rgba(255, 159, 28, 0.3);
    transform: scale(1.05);
}

.scrim-chat-input-form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex: 1;
}

.scrim-chat-input-container {
    flex: 1;
    position: relative;
}

.scrim-chat-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.75rem 3.5rem 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.scrim-chat-char-count {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: rgba(226, 232, 240, 0.5);
    pointer-events: none;
    user-select: none;
}

.scrim-chat-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(255, 159, 28, 0.1);
}

.scrim-chat-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.02);
}

.scrim-chat-input::placeholder {
    color: rgba(226, 232, 240, 0.4);
}

.scrim-chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--accent-primary);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.scrim-chat-send-btn:hover {
    background: #ffa834;
    transform: scale(1.05);
}

.scrim-chat-send-btn:active {
    transform: scale(0.95);
}

.scrim-chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Modal positioning fix */
#customMessageModal {
    z-index: 1055;
}

#customMessageModal .modal-dialog {
    margin: 1.75rem auto;
    max-height: calc(100vh - 3.5rem);
    display: flex;
    align-items: center;
    min-height: calc(100% - 3.5rem);
}

#customMessageModal .modal-content {
    max-height: calc(100vh - 3.5rem);
    overflow-y: auto;
    margin: auto;
}

#customMessageModal .modal-body {
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

/* Admin Panel */
