@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {

    --bg-app: #F4F5F9;
    --bg-card: #FFFFFF;
    --bg-sidebar: #151c2c;
    /* Dark elegant sidebar */

    --text-main: #1C1C1E;
    --text-muted: #8E8E93;

    --accent-primary: #9B59B6;
    /* Purple */
    --accent-light: #EBD9F3;
    /* Soft lavender */
    --accent-success: #2ecc71;
    /* Your signature Lima green */
    --accent-danger: #e74c3c;
    /* Red for critical actions */

    --border-radius-lg: 32px;
    --border-radius-md: 20px;
    --border-radius-sm: 12px;

    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.03);
    --shadow-med: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);

    /* Tier Colors */
    --tier-25: #95a5a6;
    /* Coal/Grayish */
    --tier-50: #bdc3c7;
    /* Silver */
    --tier-100: #f1c40f;
    /* Gold */
}

.tier-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.tier-25 {
    background: #f0f0f0;
    color: #7f8c8d;
    border: 1px solid #e0e0e0;
}

.tier-50 {
    background: linear-gradient(135deg, #bdc3c7, #95a5a6);
    color: #2c3e50;
}

.tier-100 {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    color: white;
}


* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-app);
    color: var(--text-main);
    min-height: 100vh;
}

/* Layout Wrapper */
.layout-wrapper {
    min-height: 100vh;
    padding-left: 100px;
    /* Space for the sidebar */
}

/* Sidebar Styling */
.sidebar {
    width: 100px;
    background: var(--bg-sidebar);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 0;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.sidebar-logo {
    width: 60px;
    height: 60px;
    background: transparent;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item {
    margin: 20px 0;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
    text-decoration: none;
    color: white;
    font-size: 1.2rem;
}

.nav-item:hover,
.nav-item.active {
    opacity: 1;
}

/* Language Switcher */
.lang-switch {
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.btn-lang {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.6rem;
    font-weight: 800;
    padding: 6px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-lang:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.btn-lang.active {
    background: var(--accent-primary);
    color: #1a1a1a;
    box-shadow: 0 4px 12px rgba(193, 240, 47, 0.2);
}

/* Main Content Area */
.main-content {
    margin: 0 auto;
    padding: 30px 40px;
    max-width: 1280px;
    width: 100%;
}

.profile-metrics-card {
    grid-column: 2 / span 2;
}

/* Header within Content */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

#header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-lang-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-lang-toggle:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.15);
}

.user-pill,
.user-pill * {
    text-decoration: none !important;
}

.user-pill {
    background: white;
    padding: 8px 16px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-subtle);
    cursor: pointer;
    transition: all 0.2s ease;
    color: inherit;
}

.user-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    background: #fdfdfd;
}

.user-pill-link {
    text-decoration: none !important;
    display: contents;
}

/* User Pill Dropdown Menu */
.user-pill-wrapper {
    position: relative;
    display: inline-block;
}

.user-pill-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 8px;
    min-width: 215px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
    pointer-events: none;
}

.user-pill-wrapper:hover .user-pill-dropdown,
.user-pill-wrapper.active .user-pill-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-pill-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    transform: rotate(45deg);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.dropdown-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.dropdown-menu-item:hover {
    background: linear-gradient(135deg, var(--accent-light), rgba(193, 240, 47, 0.15));
    color: var(--accent-primary);
    transform: translateX(4px);
}

.dropdown-menu-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.dropdown-menu-item:hover i {
    opacity: 1;
    transform: scale(1.1);
}

.dropdown-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
    margin: 8px 0;
}


/* Hero Banner Style */
.hero-banner {
    position: relative;
    border-radius: var(--border-radius-lg);
    margin-bottom: 40px;
    height: 270px;
    overflow: hidden;
    background: var(--accent-light);
    display: flex;
    align-items: center;
}

.hero-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-slide-content {
    width: 100%;
    height: 100%;
    padding: 40px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    border-radius: var(--border-radius-lg);
}

.slider-dots {
    position: absolute;
    bottom: 25px;
    right: 40px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dot.active {
    background: var(--accent-primary);
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(155, 89, 182, 0.4);
}

.hero-banner h2 {
    font-size: 2.5rem;
    margin: 0 0 15px 0;
    font-weight: 700;
}

.hero-banner p {
    color: #666;
    max-width: 400px;
    margin: 0;
}

.hero-content {
    z-index: 2;
    position: relative;
}

.hero-image {
    position: absolute;
    right: 100px;
    bottom: 0px;
    height: 100%;
    object-fit: contain;
    object-position: right bottom;
    z-index: 1;
    pointer-events: none;
}


/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-med);
    border: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
}

.card h3 {
    margin-top: 0;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.card h2 {
    font-size: 2rem;
    margin: 10px 0;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 99px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    background: #8e44ad;
    transform: translateY(-2px);
}

.btn-purple {
    background: #8e44ad;
    color: white;
}

.btn-purple:hover {
    background: #9b59b6;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.3);
}

.btn-dark {
    background: #2D3436;
    color: white;
}

.btn-dark:hover {
    background: #000000;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

/* Board Map Redesign */

.board-map {
    position: relative;
    width: 100%;
    height: 500px;
    background: #F9F9FB;
    border-radius: var(--border-radius-md);
    margin-top: 20px;
}

.node {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    z-index: 10;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease, filter 0.3s ease;
}

.node:hover {
    z-index: 10001 !important;
}

.node img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: none;
    box-shadow: none;
}

.node.guide img {
    border-color: var(--bg-sidebar);
}

.node.empty {
    border: 2px dashed #D1D1D6;
    background: transparent;
    opacity: 0.6;
}

.node.locked {
    background: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    cursor: not-allowed !important;
}

.node.locked i {
    color: #CCC;
}

.node-label {
    position: absolute;
    bottom: -20px;
    white-space: nowrap;
    font-size: 11px;
    color: var(--text-muted);
}

.btn-retirar {
    position: absolute;
    bottom: -62px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 800;
    background: var(--accent-danger);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    display: none;
    /* Controlled by JS */
}

.btn-retirar:hover {
    background: #c0392b;
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.5);
}

.btn-retirar:active {
    transform: translateX(-50%) translateY(0);
}

/* Toggle Switch (Admin auto-removal) */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 28px;
    transition: background 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked+.toggle-slider {
    background: var(--accent-primary);
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(24px);
}

/* Builder Fade-out warning animation */
@keyframes fadeWarningPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(255, 152, 0, 0);
    }
}

.node.fading-out {
    animation: fadeWarningPulse 2s infinite;
    border: 2px dashed #ff9800 !important;
}


.connection-line {
    position: absolute;
    height: 2px;
    background: #E5E5EA;
    z-index: 1;
    transform-origin: 0 0;
}

/* Grids */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: stretch;
}

.board-container-card {
    grid-column: span 2;
}

.profile-grid {
    grid-template-columns: 1fr 3.5fr !important;
    align-items: start !important;
}

@media (max-width: 1024px) {
    .profile-grid {
        grid-template-columns: 1fr !important;
    }
}

.profile-grid .board-container-card,
.profile-grid .profile-metrics-card {
    grid-column: span 1 !important;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .board-container-card {
        grid-column: span 1;
    }
}

/* Admin Dashboard Specifics */
.admin-role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.role-card {
    text-align: center;
    transition: transform 0.2s;
}

.role-card:hover {
    transform: translateY(-5px);
}

.role-card i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.role-card h2 {
    margin: 5px 0;
    font-size: 1.8rem;
}

.role-card span {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-dashboard-split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 30px;
    align-items: start;
}

.hero-stats-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.admin-hero-banner {
    background: var(--bg-sidebar);
    color: white;
    padding: 30px;
    border-radius: 20px;
}

.admin-action-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(5px);
}

.admin-action-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-2px);
}

.admin-stats-card-flex {
    display: flex;
    gap: 30px;
    align-items: center;
    justify-content: space-between;
}

.admin-stats-card-flex>div {
    flex: 1;
}

.admin-country-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-country-table th {
    text-align: left;
    padding: 12px 10px;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-bottom: 2px solid #f0f0f0;
}

.admin-country-table td {
    padding: 15px 10px;
    border-bottom: 1px solid #f9f9f9;
}

/* Utility */
.text-gradient {
    background: linear-gradient(135deg, var(--accent-primary), #3498db);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.show-430 {
    display: none;
}

/* Modals & Glassmorphism */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 80000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: #ffffff;
    border-radius: 40px;
    padding: 40px;
    max-width: 500px;
    width: 95%;
    position: relative;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    animation: modalSlideUp 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    border: 1px solid rgba(0, 0, 0, 0.05);
}


.modal-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-light);
    color: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.5rem;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-main);
}

.invite-box {
    background: rgba(0, 0, 0, 0.03);
    padding: 20px;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    word-break: break-all;
    margin-bottom: 25px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}

.invite-box:hover {
    background: rgba(0, 0, 0, 0.05);
}

.copy-status {
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--accent-success);
    color: #333;
    font-size: 0.75rem;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 700;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(193, 240, 47, 0.3);
}

.copy-status.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalSlideUp {
    to {
        transform: translateY(0);
    }
}

/* User Profile Modal */
.modal-profile-card {
    background: white;
    border: 1px solid #efefef;
    border-radius: 32px;
    padding: 35px;
    width: 100%;
    max-width: 380px;
    text-align: center;
    position: relative;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.12);
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--text-main);
}

@keyframes modalSlideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.profile-avatar-large {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    margin: 0 auto 25px;
    border: 5px solid #f8f9fa;
    padding: 5px;
    background: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.profile-avatar-large img,
.profile-avatar-large .avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.social-icon.deactivated {
    color: #cbd5e1 !important;
    opacity: 0.6;
    filter: grayscale(1);
    cursor: default;
    pointer-events: none;
}

.modal-checklist {
    margin: 25px 0;
    text-align: left;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 20px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.check-item:last-child {
    margin-bottom: 0;
}

.check-item i:first-child {
    width: 20px;
    text-align: center;
    color: var(--text-muted);
}

.check-item .status-icon {
    margin-left: auto;
    font-size: 1.1rem;
}

.country-flag {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    vertical-align: middle;
}

.social-links {
    margin: 25px 0;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    font-size: 1.3rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border: 1px solid #eee;
}

.social-icon.icon-facebook {
    color: #3b5998;
}

.social-icon.icon-instagram {
    color: #e1306c;
}

.social-icon.icon-whatsapp {
    color: #25d366;
}

.social-icon.icon-telegram {
    color: #0088cc;
}

.social-icon:hover {
    background: var(--accent-primary);
    color: #ffffff !important;
    transform: translateY(-4px) scale(1.05);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 20px rgba(155, 89, 182, 0.2);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #f0f0f0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.stat-item .label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    font-weight: 600;
}

.stat-item .value {
    margin-top: auto;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
}

.modal-close-x {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.3s;
    border: 1px solid #eee;
}

.modal-close-x:hover {
    background: #ff4757;
    color: white;
    border-color: #ff4757;
    transform: rotate(90deg);
}

.btn-report {
    margin-top: 30px;
    width: 100%;
    background: #fff5f6;
    color: #ff4757;
    border: 1px solid #ffebeb;
    font-weight: 700;
    padding: 14px;
    border-radius: 16px;
    transition: all 0.3s;
}

.btn-report:hover {
    background: #ff4757;
    color: white;
    transform: translateY(-2px);
}

.btn-report:hover {
    background: #ff4757 !important;
    color: white !important;
}

@keyframes pulse-scale {
    0% {
        box-shadow: 0 0 0 0 rgba(155, 89, 182, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(155, 89, 182, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(155, 89, 182, 0);
    }
}

@keyframes online-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(39, 174, 96, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0);
    }
}

.node.pulse {
    animation: pulse-scale 2s infinite;
}

.status-online-pulse {
    animation: online-pulse 2s infinite;
}

/* Golden Ring for verified Gifters */
.node.golden-ring img {
    border: 3px solid #FFD700 !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.8), 0 0 5px rgba(255, 215, 0, 1) !important;
    animation: golden-glow 2s infinite alternate;
}

@keyframes golden-glow {
    from {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
    }

    to {
        box-shadow: 0 0 25px rgba(255, 215, 0, 1), 0 0 10px rgba(255, 255, 255, 0.5);
    }
}

/* Gifter Specific Button */
.btn-gift {
    margin-top: 15px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a1a;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.8rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-gift:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
}

.btn-gift.pulse {
    animation: pulse-yellow 2s infinite;
}

@keyframes pulse-yellow {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 90000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 16px 24px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 280px;
    max-width: 450px;
    transform: translateX(120%);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
}

.toast.show {
    transform: translateX(0);
}

.toast i {
    font-size: 1.2rem;
}

.toast-success i {
    color: #2ecc71;
}

.toast-error i {
    color: #e74c3c;
}

.toast-warning i {
    color: #f1c40f;
}

.toast-info i {
    color: #3498db;
}

@keyframes toastSlideOut {
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* History Banner Styling */
.history-banner {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(44, 62, 80, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    padding: 12px 25px;
    border-radius: 99px;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideDownFade 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Fading Warning Banner */
.fading-warning-banner {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 1px solid #ffb74d;
    padding: 15px 25px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 1001;
    /* Very high z-index */
    animation: bannerFadeDown 0.4s ease-out;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.1);
    min-width: 340px;
    text-align: center;
}

.fading-warning-banner .warning-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #e65100;
    font-weight: 600;
    font-size: 0.95rem;
}

.fading-warning-banner .btn-extend-warning {
    background: #ff9800;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

.fading-warning-banner .btn-extend-warning:hover {
    background: #f57c00;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(245, 124, 0, 0.2);
}

@keyframes bannerFadeDown {
    from {
        transform: translate(-50%, -20px);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@keyframes slideDownFade {
    from {
        transform: translate(-50%, -20px);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.banner-content i {
    color: var(--accent-success);
    font-size: 1rem;
}

@keyframes slideDownFade {
    from {
        transform: translateX(-50%) translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.gift-button-container {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: center;
    top: 65%;
    /* Positioned below Legend */
    z-index: 20;
}

/* Legend Progress Ring (Enhanced with SVG) */
.progress-ring {
    position: relative;
    width: 94px;
    height: 94px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.5s ease;
}

.progress-ring-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    /* Start at 12 o'clock */
    overflow: visible;
    z-index: 5;
    pointer-events: none;
}

.ring-track {
    fill: none;
    stroke: rgba(255, 215, 0, 0.08);
    stroke-width: 6;
    /* 30% Thicker than previous */
}

.ring-progress {
    fill: none;
    stroke: #FFD700;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 264;
    /* Approx 2 * PI * 42 */
    stroke-dashoffset: 264;
    /* Initial: hidden */
    transition: stroke-dashoffset 2s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.5));
}

/* Centering the avatar inside the ring */
.legend-avatar-container {
    position: relative;
    z-index: 2;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.progress-ring img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--bg-card);
    object-fit: cover;
    transition: all 0.5s ease;
}

/* Glow effect when completed (8/8) */
.progress-ring.completed {
    animation: ring-triumph 2s infinite alternate;
}

.progress-ring.completed .ring-progress {
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8));
    stroke-width: 7;
}

@keyframes ring-triumph {
    from {
        filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.6));
        transform: scale(1);
    }

    to {
        filter: drop-shadow(0 0 25px rgba(255, 215, 0, 1));
        transform: scale(1.05);
    }
}

.builder-energy-bolt {
    color: #ffd600;
    margin-left: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 0 2px rgba(255, 214, 0, 0.4));
}

.builder-energy-bolt:hover {
    transform: scale(1.3) rotate(10deg);
    color: #ffea00;
}

.builder-timer-wrapper.hide-main-tooltip .builder-timer-tooltip {
    visibility: hidden !important;
    opacity: 0 !important;
}

.extend-option:hover {
    border-color: var(--accent-primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.extend-option[style*="border-color: var(--accent-primary)"] {
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.15);
}

/* Adjustment for legend node to accommodate ring */
.node.legend {
    width: 94px;
    height: 94px;
}

/* Gifter Verified Badge */
.verified-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 22px;
    height: 22px;
    background: #27ae60;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border: 2px solid white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 20;
    animation: badge-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badge-pop {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }

    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

/* Modern Admin Assignment Styles */
.admin-search-wrapper {
    position: relative;
    margin-bottom: 25px;
}

.admin-search-input {
    width: 100%;
    background: #f8f9fa;
    border: 2px solid #f0f0f0;
    padding: 16px 20px 16px 50px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-main);
}

.admin-search-input:focus {
    background: #fff;
    border-color: var(--accent-primary);
    box-shadow: 0 10px 25px rgba(155, 89, 182, 0.1);
    outline: none;
}

.admin-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: color 0.3s;
}

.admin-search-input:focus+.admin-search-icon {
    color: var(--accent-primary);
}

/* Horizontal Suggested Users */
.suggested-users-row {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 5px 20px;
    margin: 0 -5px;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.suggested-users-row::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.suggested-user-item {
    flex: 0 0 75px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.suggested-user-item:hover {
    transform: scale(1.1);
}

.suggested-user-thumb {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: var(--accent-light);
    border: 2px solid #fff;
    box-shadow: var(--shadow-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--accent-primary);
    margin-bottom: 8px;
    overflow: hidden;
    position: relative;
}

.suggested-user-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.suggested-user-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.suggested-user-item:hover .suggested-user-name {
    color: var(--accent-primary);
}

/* Results Card List */
.admin-results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 5px;
}

.admin-results-list::-webkit-scrollbar {
    width: 4px;
}

.admin-results-list::-webkit-scrollbar-thumb {
    background: #eee;
    border-radius: 10px;
}

.modern-user-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 18px;
    background: #f9f9fb;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.modern-user-card:hover {
    background: #fff;
    border-color: var(--accent-primary);
    transform: translateX(4px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.modern-user-card-info {
    flex: 1;
}

.modern-user-card-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
}

.modern-user-card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Custom Instant Tooltip for Builder Timer */
.builder-timer-wrapper {
    position: absolute !important;
    cursor: help;
    transition: all 0.2s ease;
}

.builder-timer-tooltip {
    visibility: hidden;
    position: absolute;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(155, 89, 182, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    width: max-content;
    max-width: 250px;
    white-space: normal;
    overflow-wrap: break-word;
    text-align: center;
    line-height: 1.4;
    opacity: 0;
    transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 40000;
    pointer-events: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Arrow */
.builder-timer-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: rgba(155, 89, 182, 0.95) transparent transparent transparent;
}

.builder-timer-wrapper:hover .builder-timer-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    z-index: 60000 !important;
}

.builder-timer-wrapper:hover {
    transform: translateY(-50%) scale(1.05);
    background: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    z-index: 60002 !important;
}

/* Global Dynamic Tooltip (Reusing Builder Timer Style) */
.global-tooltip {
    position: fixed;
    visibility: hidden;
    opacity: 0;
    background: rgba(155, 89, 182, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    width: max-content;
    max-width: 280px;
    white-space: normal;
    overflow-wrap: break-word;
    text-align: center;
    z-index: 50000;
    pointer-events: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateY(10px) translateX(-50%);
    left: 0;
    top: 0;
}

.global-tooltip.visible {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) translateX(-50%);
}

.global-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: rgba(155, 89, 182, 0.95) transparent transparent transparent;
}

/* Tooltip Themes */
.global-tooltip.tooltip-green {
    background: #2ecc71 !important;
}

.global-tooltip.tooltip-green::after {
    border-color: #2ecc71 transparent transparent transparent !important;
}

/* Pulse Animation for Warning Badges */
@keyframes badgePulse {
    0% {
        transform: scale(1);
        text-shadow: 0 0 0 rgba(231, 76, 60, 0);
    }

    50% {
        transform: scale(1.2);
        text-shadow: 0 0 10px rgba(231, 76, 60, 0.6);
    }

    100% {
        transform: scale(1);
        text-shadow: 0 0 0 rgba(231, 76, 60, 0);
    }
}

.pulse-badge {
    animation: badgePulse 1.5s infinite ease-in-out;
    display: inline-block;
    vertical-align: middle;
}

/* Board Chat UI */
.chat-card {
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
    margin-top: 15px;
}

.chat-message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.chat-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* CHAT STYLES (Dynamic) */
.chat-card {
    display: flex;
    flex-direction: column;
    height: 640px;
    /* Fixed height to match board-container-card */
    min-height: 0;
    overflow: hidden;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 15px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column-reverse;
    /* Push up effect */
    gap: 0;
    padding-right: 5px;
    margin-bottom: 15px;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.chat-message {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.chat-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.chat-bubble {
    background: #f9f9fb;
    padding: 10px 14px;
    border-radius: 12px;
    border-bottom-left-radius: 2px;
    max-width: 85%;
    position: relative;
}

.chat-message.me {
    flex-direction: row-reverse;
}

.chat-message.me .chat-bubble {
    background: #f6f0fd;
    color: #8e44ad;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 2px;
}

.chat-message.me .chat-name {
    color: #8e44ad;
    text-align: right;
}

.chat-message.me .chat-text {
    color: #8e44ad;
}

.chat-name {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 600;
}

.chat-timestamp {
    font-size: 10px;
    opacity: 0.7;
    margin-left: 5px;
    font-weight: 400;
}

.chat-text {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-mention {
    background: transparent;
    padding: 0;
    border-radius: 4px;
    font-weight: bold;
}

.chat-input-container {
    display: flex;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.chat-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #eee;
    border-radius: 25px;
    outline: none;
    transition: all 0.3s;
    font-size: 0.95rem;
    background: white;
}

.chat-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(155, 89, 182, 0.1);
}

.chat-input:disabled {
    background: #f9f9f9;
    cursor: not-allowed;
}

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

.chat-send-btn:hover {
    transform: scale(1.1);
    background: #8e44ad;
}

.chat-badge {
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
    line-height: 1;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 5px rgba(255, 71, 87, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0);
    }
}

/* INACTIVITY BANNER REDESIGN */
.inactivity-banner-container {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.1);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    /* Fix: Clip background image with rounded corners */
}

.inactivity-top-bar {
    height: 120px;
    /* Taller red header as in reference */
    background: #FF5A5F;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.inactivity-icon-wrapper {
    width: 65px;
    height: 65px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.inactivity-icon-wrapper i {
    color: #FF5A5F;
    font-size: 2rem;
}

.inactivity-content-wrapper {
    display: flex;
    padding: 40px 50px;
    position: relative;
    min-height: 400px;
    /* Background image settings */
    background-image: url('../img/warning-timer.jpg');
    background-position: bottom right 30px;
    background-repeat: no-repeat;
    background-size: 900px;
    /* Increased size to match original */
}

.inactivity-left-panel {
    flex: 1;
    max-width: 60%;
    z-index: 2;
}

.inactivity-title {
    color: #2c3e50;
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
    margin-top: 10px;
}

.inactivity-subtitle {
    color: #FF5A5F;
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 25px;
    display: block;
}

.requirements-header {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.requirement-block {
    margin-bottom: 25px;
}

.requirement-label {
    font-weight: 700;
    color: #34495e;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.guest-count-badge {
    border: 1px dashed #FF5A5F;
    color: #FF5A5F;
    background: rgba(255, 90, 95, 0.05);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.requirement-desc {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-left: 0;
    margin-bottom: 15px;
    line-height: 1.5;
}

.option-text {
    color: #2c3e50;
    font-size: 0.95rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.option-text strong {
    color: #2c3e50;
    /* Same as text usually, or darker */
}

.footer-note {
    font-size: 0.8rem;
    color: #95a5a6;
    margin-top: 20px;
    line-height: 1.4;
    max-width: 90%;
}

.recover-btn {
    background: #FF5A5F;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    margin-top: 25px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 90, 95, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.recover-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 90, 95, 0.4);
    background: #ff4f54;
}

@media (max-width: 900px) {
    .inactivity-content-wrapper {
        background-image: none;
        flex-direction: column;
    }

    .inactivity-left-panel {
        max-width: 100%;
    }
}

/* Admin Layout Helper Classes */
.admin-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.admin-actions-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.back-btn {
    text-decoration: none;
    color: var(--text-muted);
    margin-right: 15px;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
}

.back-btn:hover {
    color: var(--accent-primary);
}

.admin-tiers-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
}

.admin-stats-flex {
    display: flex;
    justify-content: space-between;
}

.add-tier-card {
    border: 2px dashed #ddd !important;
    background: transparent !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 150px;
}

/* ─── Mobile & Tablet Responsive Improvements ─── */
@media (max-width: 1024px) {
    .admin-content-grid {
        grid-template-columns: 1fr;
    }

    .admin-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .admin-actions-group {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .admin-actions-group .input-group {
        width: 100% !important;
        margin-bottom: 10px !important;
    }

    .admin-actions-group form {
        width: 100%;
    }

    .admin-actions-group .btn {
        width: 100%;
        justify-content: center;
    }

    .admin-stats-flex {
        flex-direction: column;
        gap: 15px;
    }

    .admin-stats-flex div {
        text-align: center !important;
    }

    .layout-wrapper {
        padding-left: 0;
    }

    .sidebar {
        position: fixed;
        /* Keep it fixed at bottom */
        width: 100%;
        height: 60px;
        flex-direction: row;
        padding: 0 10px;
        bottom: 0;
        top: auto;
        left: 0;
        justify-content: center;
        align-items: center;
        gap: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 1000;
    }

    .sidebar-logo,
    .lang-switch,
    .sidebar>div:last-child {
        display: none;
    }

    .nav-item {
        margin: 0;
        font-size: 1.4rem;
    }

    .mobile-lang-toggle {
        display: flex !important;
        margin: 0;
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
        padding-bottom: 80px;
        /* Space for bottom nav */
    }

    .content-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 25px;
    }

    .content-header>div:first-child {
        flex: 1;
        min-width: 0;
        order: 1;
    }

    .content-header h2 {
        font-size: 1.1rem;
    }

    .content-header p {
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #header-actions {
        display: contents !important;
    }

    .user-pill-wrapper {
        order: 2;
    }

    .header-action-buttons {
        order: 3;
        width: 100%;
        margin-top: 10px;
        justify-content: space-between;
    }

    .header-action-buttons .btn,
    .header-action-buttons a {
        flex: 1;
        justify-content: center;
    }

    .hide-mobile {
        display: none !important;
    }

    .hero-banner {
        padding: 0;
        height: auto;
        min-height: 480px;
        margin-bottom: 20px;
        border-radius: 32px;
        position: relative;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .hero-slider {
        flex: 1;
        width: 100%;
        position: relative;
    }

    .hero-slide {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        text-align: center;
        justify-content: flex-start;
        box-sizing: border-box;
    }

    .hero-slide-content {
        padding: 30px 20px 60px 20px !important;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
    }

    .hero-content {
        width: 100%;
        z-index: 5;
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-banner h2 {
        font-size: 1.5rem;
        margin-bottom: 12px;
        line-height: 1.3;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .hero-banner p {
        font-size: 0.95rem;
        margin-bottom: 20px;
        max-width: 100%;
        line-height: 1.5;
    }

    .hero-image {
        position: relative !important;
        right: auto !important;
        bottom: auto !important;
        width: 180px !important;
        height: auto !important;
        margin: 15px auto 0 auto !important;
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
        z-index: 1;
    }

    .slider-dots {
        bottom: 20px;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        gap: 12px;
        z-index: 20;
    }

    .slider-dots .dot {
        width: 10px;
        height: 10px;
        background: rgba(0, 0, 0, 0.15);
        border: 1px solid rgba(0, 0, 0, 0.1);
    }

    .slider-dots .dot.active {
        background: var(--accent-primary);
        transform: scale(1.3);
    }

    .hero-slide.active {
        opacity: 1;
        visibility: visible;
    }

    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }

    .board-container-card,
    .profile-metrics-card {
        grid-column: span 1 !important;
    }

    .board-map {
        height: 400px;
        overflow: hidden;
    }

    /* User Pill layout for mobile */
    .user-pill {
        padding: 6px 12px;
    }

    .user-pill .username {
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .admin-role-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .admin-dashboard-split {
        grid-template-columns: 1fr;
    }

    .admin-stats-card-flex {
        flex-direction: column;
    }
}

@media (max-width: 430px) {
    .main-content {
        padding: 15px;
    }

    .hero-banner {
        padding: 20px;
        border-radius: var(--border-radius-lg);
    }

    .hero-banner h2 {
        font-size: 1.4rem;
        margin-bottom: 10px;
    }

    .hero-banner p {
        font-size: 0.85rem;
    }

    .btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .content-header h2 {
        font-size: 1.2rem;
    }

    .board-map {
        height: 380px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .board-container-card {
        padding: 15px;
    }

    .friend-item {
        flex-shrink: 0;
    }

    .chat-card {
        height: 550px !important;
        min-height: 400px !important;
        display: flex !important;
    }

    .chat-card:not(.is-empty) {
        min-height: 550px !important;
    }

    .chat-messages {
        flex: 1 1 auto !important;
        max-height: none !important;
        overflow-y: auto !important;
        display: flex !important;
        flex-direction: column-reverse !important;
        -webkit-overflow-scrolling: touch;
        transform: translateZ(0);
        /* Safari hardware acceleration fix */
    }

    .card h3 {
        font-size: 0.95rem;
    }

    /* Admin specific 430px */
    .hero-banner[style*="background: var(--bg-sidebar)"] h2 {
        font-size: 1.3rem;
    }

    .hero-banner[style*="background: var(--bg-sidebar)"] h1 {
        font-size: 1.6rem !important;
    }

    .hero-stats-flex {
        flex-direction: column;
        text-align: center;
    }

    .admin-role-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero-stats-flex>div:last-child {
        text-align: center !important;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -15px;
        padding: 0 15px;
    }

    .admin-country-table {
        min-width: 500px;
    }

    .admin-country-table th,
    .admin-country-table td {
        padding: 10px 5px;
        font-size: 0.8rem;
    }

    .admin-stats-card-flex canvas {
        max-height: 180px;
    }

    .back-btn {
        margin-bottom: 15px;
        display: block;
        font-size: 1.2rem;
    }

    .hide-430 {
        display: none;
    }

    .show-430 {
        display: inline;
    }
}