/* ===================================
   HUBIONIS HUB - CSS
   Complete styling for the Hub collaboration ecosystem
   ================================== */

/* ===== HUB HERO ===== */
.hub-hero {
    position: relative;
    padding: 60px 0 40px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(15,42,42,0.95) 0%, rgba(10,26,26,0.98) 100%);
}

.hub-hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.hub-hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(127,255,0,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(127,255,0,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hub-hero-particle {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: hubFloat 15s ease-in-out infinite;
}

.hub-hero-particle:nth-child(1) {
    background: var(--primary-color);
    top: -100px;
    right: 10%;
    animation-delay: 0s;
}

.hub-hero-particle:nth-child(2) {
    background: var(--secondary-color);
    bottom: -50px;
    left: 5%;
    animation-delay: -5s;
}

.hub-hero-particle:nth-child(3) {
    background: #00bcd4;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    animation-delay: -10s;
}

@keyframes hubFloat {
    0%, 100% { transform: translateY(0) translateX(0); }
    33% { transform: translateY(-30px) translateX(20px); }
    66% { transform: translateY(20px) translateX(-15px); }
}

.hub-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hub-hero-badge {
    display: inline-block;
    padding: 6px 20px;
    background: rgba(127,255,0,0.1);
    border: 1px solid rgba(127,255,0,0.25);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.hub-hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.1;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, #00e5ff 50%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.hub-hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Hero Stats */
.hub-hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
}

.hero-stat {
    text-align: center;
}

.hero-stat-num {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hero Search */
.hub-hero-search {
    max-width: 600px;
    margin: 0 auto;
}

.hub-search-box {
    display: flex;
    align-items: center;
    background: rgba(26,58,58,0.8);
    border: 1px solid rgba(127,255,0,0.15);
    border-radius: 50px;
    padding: 4px 4px 4px 20px;
    transition: all 0.3s ease;
}

.hub-search-box:focus-within {
    border-color: rgba(127,255,0,0.5);
    box-shadow: 0 0 20px rgba(127,255,0,0.1);
}

.hub-search-icon {
    width: 20px;
    height: 20px;
    color: var(--text-gray);
    flex-shrink: 0;
}

.hub-search-box input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 0.95rem;
    padding: 12px 15px;
    outline: none;
}

.hub-search-box input::placeholder {
    color: rgba(192,192,192,0.5);
}

.hub-search-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--primary-color);
    color: var(--bg-darker);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.hub-search-btn svg {
    width: 20px;
    height: 20px;
}

.hub-search-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* ===== HUB TABS ===== */
.hub-tabs-section {
    position: sticky;
    top: 70px;
    z-index: 50;
    background: rgba(10,26,26,0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(127,255,0,0.1);
    padding: 0;
}

.hub-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 8px 0;
    scrollbar-width: none;
}

.hub-tabs::-webkit-scrollbar { display: none; }

.hub-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-gray);
    cursor: pointer;
    white-space: nowrap;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.hub-tab svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.hub-tab:hover {
    color: var(--text-light);
    background: rgba(127,255,0,0.05);
}

.hub-tab.active {
    color: var(--primary-color);
    background: rgba(127,255,0,0.1);
    border-color: rgba(127,255,0,0.25);
}

.tab-count {
    font-size: 0.75rem;
    background: rgba(127,255,0,0.15);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.hub-badge {
    background: #ef4444 !important;
    color: white !important;
}

/* ===== HUB MAIN ===== */
.hub-main {
    padding: 30px 0 60px;
    min-height: 60vh;
}

/* ===== PANELS ===== */
.hub-panel {
    display: none;
}

.hub-panel.active {
    display: block;
    animation: panelFadeIn 0.3s ease;
}

@keyframes panelFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.panel-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.panel-header p {
    color: var(--text-gray);
    font-size: 0.95rem;
}

/* ===== HUB FILTERS ===== */
.hub-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group select,
.filter-group .filter-search,
.filter-group .filter-input-sm {
    background: rgba(26,58,58,0.6);
    border: 1px solid rgba(127,255,0,0.15);
    border-radius: 8px;
    color: var(--text-light);
    padding: 10px 14px;
    font-size: 0.85rem;
    outline: none;
    transition: all 0.3s ease;
}

.filter-group select {
    cursor: pointer;
    min-width: 160px;
}

.filter-group select option {
    background: var(--bg-darker);
}

.filter-group .filter-search {
    min-width: 220px;
}

.filter-group .filter-input-sm {
    width: 120px;
}

.filter-group select:focus,
.filter-group .filter-search:focus,
.filter-group .filter-input-sm:focus {
    border-color: rgba(127,255,0,0.4);
    box-shadow: 0 0 10px rgba(127,255,0,0.05);
}

.filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-gray);
}

.filter-toggle input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(127,255,0,0.3);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.filter-toggle input[type="checkbox"]:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.filter-toggle input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--bg-darker);
    font-size: 12px;
    font-weight: bold;
}

/* ===== HUB GRID ===== */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.venue-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

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

/* ===== CARDS ===== */
.hub-card {
    background: rgba(26,58,58,0.5);
    border: 1px solid rgba(127,255,0,0.08);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.hub-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.hub-card:hover::before {
    opacity: 1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.card-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(127,255,0,0.1);
    color: var(--primary-color);
}

.card-urgency {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.card-urgency.urgent { background: rgba(239,68,68,0.2); color: #f87171; }
.card-urgency.high { background: rgba(249,115,22,0.2); color: #fb923c; }
.card-urgency.medium { background: rgba(234,179,8,0.2); color: #fbbf24; }
.card-urgency.low { background: rgba(34,197,94,0.2); color: #4ade80; }

.card-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
    color: var(--text-light);
}

.card-desc {
    font-size: 0.85rem;
    color: var(--text-gray);
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.card-tag {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(13,79,79,0.5);
    color: #67e8f9;
    border: 1px solid rgba(103,232,249,0.15);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(127,255,0,0.05);
    font-size: 0.8rem;
    color: var(--text-gray);
}

.card-meta-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--bg-darker);
}

.card-stats {
    display: flex;
    gap: 12px;
    align-items: center;
}

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

.card-stat svg {
    width: 14px;
    height: 14px;
}

/* ===== VENUE CARDS ===== */
.venue-card .card-image {
    width: 100%;
    height: 160px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--bg-lighter), var(--secondary-color));
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    overflow: hidden;
}

.venue-card .card-location {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-gray);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.venue-card .card-location svg {
    width: 14px;
    height: 14px;
    color: var(--primary-color);
}

.venue-card .card-features {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.venue-card .venue-feature {
    font-size: 0.75rem;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 4px;
}

.venue-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.venue-price.free {
    color: #4ade80;
}

.venue-verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #3b82f6;
    background: rgba(59,130,246,0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

/* ===== SPEAKER CARDS ===== */
.speaker-card {
    text-align: center;
    padding: 30px 24px;
}

.speaker-card .speaker-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #00bcd4);
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--bg-darker);
    border: 3px solid rgba(127,255,0,0.2);
}

.speaker-card .speaker-name {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.speaker-card .speaker-tagline {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 12px;
}

.speaker-card .speaker-rating {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
    color: #fbbf24;
    font-size: 0.9rem;
}

.speaker-card .speaker-expertise {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 14px;
}

.speaker-card .speaker-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    margin-bottom: 10px;
    font-size: 0.8rem;
}

.badge-remote {
    color: #3b82f6;
    background: rgba(59,130,246,0.1);
    padding: 3px 8px;
    border-radius: 4px;
}

.badge-probono {
    color: #4ade80;
    background: rgba(34,197,94,0.1);
    padding: 3px 8px;
    border-radius: 4px;
}

/* ===== TEAM CARDS ===== */
.team-card .team-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.team-status.recruiting { background: rgba(34,197,94,0.15); color: #4ade80; }
.team-status.active { background: rgba(59,130,246,0.15); color: #60a5fa; }
.team-status.full { background: rgba(234,179,8,0.15); color: #fbbf24; }

.team-members-bar {
    height: 6px;
    background: rgba(127,255,0,0.1);
    border-radius: 3px;
    margin: 12px 0 8px;
    overflow: hidden;
}

.team-members-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #00e5ff);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.team-members-text {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-bottom: 12px;
}

/* ===== BOARD LIST ===== */
.hub-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.board-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: rgba(26,58,58,0.5);
    border: 1px solid rgba(127,255,0,0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.board-item:hover {
    border-color: rgba(127,255,0,0.2);
    background: rgba(26,58,58,0.7);
}

.board-type-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(127,255,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.board-item-content {
    flex: 1;
    min-width: 0;
}

.board-item-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.board-item-preview {
    font-size: 0.85rem;
    color: var(--text-gray);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.board-item-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-gray);
}

/* ===== BUTTONS ===== */
.btn-hub-create {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--primary-color);
    color: var(--bg-darker);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-hub-create svg {
    width: 18px;
    height: 18px;
}

.btn-hub-create:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(127,255,0,0.3);
}

.btn-hub-action {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid;
}

.btn-hub-action.primary {
    background: var(--primary-color);
    color: var(--bg-darker);
    border-color: var(--primary-color);
}

.btn-hub-action.primary:hover {
    background: var(--primary-dark);
}

.btn-hub-action.secondary {
    background: transparent;
    color: var(--primary-color);
    border-color: rgba(127,255,0,0.3);
}

.btn-hub-action.secondary:hover {
    background: rgba(127,255,0,0.1);
}

/* ===== LOADING & EMPTY STATES ===== */
.hub-loading {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.hub-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(127,255,0,0.15);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: hubSpin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes hubSpin {
    to { transform: rotate(360deg); }
}

.hub-loading p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.hub-empty {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.hub-empty svg {
    width: 64px;
    height: 64px;
    color: rgba(127,255,0,0.2);
    margin-bottom: 16px;
}

.hub-empty h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.hub-empty p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* ===== PAGINATION ===== */
.hub-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.hub-pagination button {
    padding: 8px 14px;
    background: rgba(26,58,58,0.6);
    border: 1px solid rgba(127,255,0,0.15);
    border-radius: 6px;
    color: var(--text-gray);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.hub-pagination button:hover {
    color: var(--text-light);
    border-color: rgba(127,255,0,0.3);
}

.hub-pagination button.active {
    background: rgba(127,255,0,0.15);
    color: var(--primary-color);
    border-color: rgba(127,255,0,0.3);
}

/* ===== MODALS ===== */
.hub-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hub-modal.open {
    display: flex;
    animation: modalFadeIn 0.25s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hub-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
}

.hub-modal-content {
    position: relative;
    background: var(--bg-darker);
    border: 1px solid rgba(127,255,0,0.15);
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0,0,0,0.5);
}

.hub-modal-lg { max-width: 700px; }
.hub-modal-xl { max-width: 900px; }

.hub-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(127,255,0,0.08);
}

.hub-modal-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.hub-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(127,255,0,0.08);
    color: var(--text-gray);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.hub-modal-close:hover {
    background: rgba(239,68,68,0.2);
    color: #f87171;
}

.hub-modal-body {
    padding: 24px;
}

.hub-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid rgba(127,255,0,0.08);
}

/* ===== FORMS ===== */
.form-row { margin-bottom: 16px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    color: var(--text-gray);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: rgba(26,58,58,0.6);
    border: 1px solid rgba(127,255,0,0.15);
    border-radius: 8px;
    color: var(--text-light);
    padding: 10px 14px;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: rgba(127,255,0,0.4);
    box-shadow: 0 0 10px rgba(127,255,0,0.05);
}

.form-group select option {
    background: var(--bg-darker);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.btn-hub-cancel {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid rgba(127,255,0,0.15);
    border-radius: 8px;
    color: var(--text-gray);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-hub-cancel:hover {
    border-color: rgba(239,68,68,0.3);
    color: #f87171;
}

.btn-hub-submit {
    padding: 10px 24px;
    background: var(--primary-color);
    color: var(--bg-darker);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-hub-submit:hover {
    background: var(--primary-dark);
}

.btn-hub-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== MESSAGING ===== */
.hub-messaging {
    display: grid;
    grid-template-columns: 300px 1fr;
    height: 70vh;
    border: 1px solid rgba(127,255,0,0.08);
    border-radius: 12px;
    overflow: hidden;
}

.msg-sidebar {
    background: rgba(15,42,42,0.5);
    border-right: 1px solid rgba(127,255,0,0.08);
    display: flex;
    flex-direction: column;
}

.msg-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid rgba(127,255,0,0.08);
}

.msg-sidebar-header h3 {
    font-size: 1rem;
}

.msg-new-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(127,255,0,0.1);
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.msg-new-btn svg {
    width: 16px;
    height: 16px;
}

.msg-new-btn:hover {
    background: rgba(127,255,0,0.2);
}

.msg-list {
    flex: 1;
    overflow-y: auto;
}

.msg-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(127,255,0,0.04);
}

.msg-item:hover {
    background: rgba(127,255,0,0.05);
}

.msg-item.active {
    background: rgba(127,255,0,0.1);
}

.msg-item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--bg-darker);
    flex-shrink: 0;
}

.msg-item-info {
    flex: 1;
    min-width: 0;
}

.msg-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.msg-item-preview {
    font-size: 0.8rem;
    color: var(--text-gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msg-item-badge {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.msg-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.msg-main {
    display: flex;
    flex-direction: column;
}

.msg-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    gap: 12px;
}

.msg-placeholder svg { opacity: 0.2; }

.msg-chat {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.msg-chat-header {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(127,255,0,0.08);
    font-weight: 600;
    font-size: 1rem;
}

.msg-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.msg-bubble {
    max-width: 70%;
    padding: 10px 16px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.msg-bubble.sent {
    align-self: flex-end;
    background: rgba(127,255,0,0.15);
    color: var(--text-light);
    border-bottom-right-radius: 4px;
}

.msg-bubble.received {
    align-self: flex-start;
    background: rgba(26,58,58,0.8);
    border-bottom-left-radius: 4px;
}

.msg-bubble-sender {
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 2px;
}

.msg-bubble-time {
    font-size: 0.7rem;
    color: var(--text-gray);
    margin-top: 4px;
    text-align: right;
}

.msg-chat-input {
    display: flex;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid rgba(127,255,0,0.08);
}

.msg-chat-input input {
    flex: 1;
    background: rgba(26,58,58,0.6);
    border: 1px solid rgba(127,255,0,0.15);
    border-radius: 24px;
    color: var(--text-light);
    padding: 10px 18px;
    font-size: 0.9rem;
    outline: none;
}

.msg-chat-input input:focus {
    border-color: rgba(127,255,0,0.4);
}

.msg-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--primary-color);
    color: var(--bg-darker);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.msg-send-btn svg {
    width: 18px;
    height: 18px;
}

.msg-send-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* ===== TOAST NOTIFICATIONS ===== */
.hub-toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hub-toast {
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--text-light);
    min-width: 280px;
    max-width: 400px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    animation: toastSlideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hub-toast.success {
    background: rgba(34,197,94,0.9);
    border: 1px solid #4ade80;
}

.hub-toast.error {
    background: rgba(239,68,68,0.9);
    border: 1px solid #f87171;
}

.hub-toast.info {
    background: rgba(59,130,246,0.9);
    border: 1px solid #60a5fa;
}

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ===== DETAIL VIEW ===== */
.detail-hero {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(127,255,0,0.08);
}

.detail-hero-avatar {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.detail-hero-info h2 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.detail-hero-info p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.detail-section {
    margin-bottom: 24px;
}

.detail-section h4 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.detail-section p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-gray);
}

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

.detail-stat {
    background: rgba(26,58,58,0.5);
    border: 1px solid rgba(127,255,0,0.08);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
}

.detail-stat .stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.detail-stat .stat-label {
    font-size: 0.75rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hub-hero-title {
        font-size: 2.2rem;
    }

    .hub-hero-stats {
        gap: 20px;
        flex-wrap: wrap;
    }

    .hero-stat-num {
        font-size: 1.5rem;
    }

    .hub-grid {
        grid-template-columns: 1fr;
    }

    .venue-grid,
    .speaker-grid {
        grid-template-columns: 1fr;
    }

    .hub-messaging {
        grid-template-columns: 1fr;
        height: auto;
    }

    .msg-sidebar {
        max-height: 250px;
    }

    .form-row-2,
    .form-row-3 {
        grid-template-columns: 1fr;
    }

    .hub-filters {
        flex-direction: column;
    }

    .filter-group select,
    .filter-group .filter-search,
    .filter-group .filter-input-sm {
        width: 100%;
    }

    .panel-header {
        flex-direction: column;
    }

    .hub-modal-content {
        max-height: 95vh;
    }

    .hub-tabs {
        gap: 2px;
    }

    .hub-tab span:not(.tab-count) {
        display: none;
    }

    .hub-tab {
        padding: 10px 14px;
    }

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

@media (max-width: 480px) {
    .hub-hero {
        padding: 30px 0 20px;
    }

    .hub-hero-title {
        font-size: 1.8rem;
    }

    .hub-hero-subtitle {
        font-size: 0.95rem;
    }

    .hub-hero-badge {
        font-size: 0.75rem;
    }
}

/* ===================================
   EVENT CONTEXT BAR
   Allows selecting an event as context
   for all Hub operations
   ================================== */

.hub-event-context-bar {
    background: linear-gradient(135deg, rgba(139, 255, 34, 0.06) 0%, rgba(15, 42, 42, 0.95) 100%);
    border-bottom: 1px solid rgba(139, 255, 34, 0.2);
    border-top: 1px solid rgba(139, 255, 34, 0.08);
    padding: 12px 0;
    position: sticky;
    top: 60px;
    z-index: 90;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.event-context-content {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.event-context-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    white-space: nowrap;
}

.event-context-label svg {
    stroke: #8BFF22;
    flex-shrink: 0;
}

.hub-event-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(139, 255, 34, 0.3);
    border-radius: 8px;
    color: #fff;
    padding: 8px 16px;
    font-size: 0.88rem;
    min-width: 280px;
    max-width: 480px;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238BFF22' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.hub-event-select:hover {
    border-color: #8BFF22;
    background-color: rgba(139, 255, 34, 0.08);
}

.hub-event-select:focus {
    outline: none;
    border-color: #8BFF22;
    box-shadow: 0 0 0 3px rgba(139, 255, 34, 0.15);
}

.hub-event-select option,
.hub-event-select optgroup {
    background: #0a1f2f;
    color: #fff;
}

.event-context-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    animation: fadeIn 0.3s ease;
}

.event-context-info span {
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
}

.event-context-info .status-published {
    background: rgba(139, 255, 34, 0.15);
    color: #8BFF22;
}

.event-context-info .status-draft {
    background: rgba(255, 193, 7, 0.15);
    color: #FFC107;
}

.btn-event-context-clear {
    background: none;
    border: 1px solid rgba(255, 100, 100, 0.3);
    color: #ff6464;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.3s;
    flex-shrink: 0;
}

.btn-event-context-clear:hover {
    background: rgba(255, 100, 100, 0.15);
    border-color: #ff6464;
}

/* Event-context-aware action buttons on cards & detail modals */
.btn-event-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(139, 255, 34, 0.15), rgba(139, 255, 34, 0.05));
    border: 1px solid rgba(139, 255, 34, 0.4);
    color: #8BFF22;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-event-action:hover {
    background: rgba(139, 255, 34, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 255, 34, 0.2);
}

.btn-event-action:active {
    transform: translateY(0);
}

.btn-event-action.secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

.btn-event-action.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Context badge shown on cards when event is selected */
.event-context-badge {
    display: none;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(139, 255, 34, 0.1);
    color: #8BFF22;
    border: 1px solid rgba(139, 255, 34, 0.2);
    margin-top: 8px;
    white-space: nowrap;
}

body.has-event-context .event-context-badge {
    display: inline-flex;
}

/* Green left border on cards when event context is active */
body.has-event-context .hub-card {
    position: relative;
}

body.has-event-context .hub-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: #8BFF22;
    border-radius: 3px 0 0 3px;
    opacity: 0;
    transition: opacity 0.3s;
}

body.has-event-context .hub-card:hover::after {
    opacity: 0.6;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .event-context-content {
        flex-direction: column;
        align-items: stretch;
    }

    .hub-event-select {
        min-width: 100%;
        max-width: 100%;
    }

    .event-context-info {
        justify-content: center;
    }

    .event-context-label {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hub-event-context-bar {
        padding: 10px 0;
    }

    .hub-event-select {
        font-size: 0.82rem;
        padding: 7px 12px;
    }
}

/* ===== EVENT HUB DASHBOARD (P2) ===== */

.event-hub-dashboard {
    margin-top: 14px;
    animation: fadeIn 0.4s ease;
}

.ehd-summary-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ehd-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 130px;
}

.ehd-stat:hover {
    background: rgba(139, 255, 34, 0.08);
    border-color: rgba(139, 255, 34, 0.3);
    transform: translateY(-1px);
}

.ehd-stat.active {
    background: rgba(139, 255, 34, 0.12);
    border-color: rgba(139, 255, 34, 0.5);
}

.ehd-stat-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.ehd-stat-num {
    font-weight: 700;
    font-size: 1.1rem;
    color: #8BFF22;
}

.ehd-stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
}

/* EHD Detail Sections */
.ehd-detail-section {
    margin-top: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    animation: fadeIn 0.3s ease;
}

.ehd-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ehd-section-header h4 {
    font-size: 0.95rem;
    color: #fff;
    margin: 0;
}

.ehd-section-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.ehd-section-close:hover {
    background: rgba(255, 100, 100, 0.15);
    color: #ff6464;
}

.ehd-section-body {
    padding: 12px 16px;
    max-height: 350px;
    overflow-y: auto;
}

.ehd-empty {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.ehd-loading {
    text-align: center;
    padding: 16px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

/* EHD Request/Invitation Items */
.ehd-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: background 0.2s;
}

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

.ehd-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.ehd-item-info {
    flex: 1;
    min-width: 0;
}

.ehd-item-title {
    font-size: 0.9rem;
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ehd-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 3px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.ehd-item-status {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ehd-item-status.status-pending {
    background: rgba(255, 193, 7, 0.15);
    color: #FFC107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.ehd-item-status.status-accepted {
    background: rgba(139, 255, 34, 0.15);
    color: #8BFF22;
    border: 1px solid rgba(139, 255, 34, 0.3);
}

.ehd-item-status.status-declined {
    background: rgba(255, 100, 100, 0.15);
    color: #ff6464;
    border: 1px solid rgba(255, 100, 100, 0.3);
}

.ehd-item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.ehd-btn {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    cursor: pointer;
    border: none;
    font-weight: 500;
    transition: all 0.2s;
}

.ehd-btn-accept {
    background: rgba(139, 255, 34, 0.15);
    color: #8BFF22;
    border: 1px solid rgba(139, 255, 34, 0.3);
}

.ehd-btn-accept:hover {
    background: rgba(139, 255, 34, 0.3);
}

.ehd-btn-decline {
    background: rgba(255, 100, 100, 0.1);
    color: #ff6464;
    border: 1px solid rgba(255, 100, 100, 0.2);
}

.ehd-btn-decline:hover {
    background: rgba(255, 100, 100, 0.25);
}

/* Smart Match Grid */
.ehd-smart-match-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.ehd-smart-col h5 {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ehd-smart-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 250px;
    overflow-y: auto;
}

.ehd-smart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.ehd-smart-item:hover {
    background: rgba(139, 255, 34, 0.06);
    border-color: rgba(139, 255, 34, 0.2);
}

.ehd-smart-item-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.ehd-smart-item-info {
    flex: 1;
    min-width: 0;
}

.ehd-smart-item-name {
    font-size: 0.82rem;
    color: #fff;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ehd-smart-item-detail {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.5);
}

.ehd-smart-item-score {
    background: rgba(139, 255, 34, 0.1);
    color: #8BFF22;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

.ehd-smart-item-btn {
    padding: 4px 10px;
    background: rgba(139, 255, 34, 0.12);
    border: 1px solid rgba(139, 255, 34, 0.3);
    color: #8BFF22;
    border-radius: 6px;
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.ehd-smart-item-btn:hover {
    background: rgba(139, 255, 34, 0.25);
}

/* Incoming Requests Panel */
.event-incoming-panel {
    margin-top: 12px;
    background: rgba(255, 193, 7, 0.04);
    border: 1px solid rgba(255, 193, 7, 0.15);
    border-radius: 12px;
    overflow: hidden;
    animation: fadeIn 0.3s ease;
}

.event-incoming-panel .ehd-section-header {
    background: rgba(255, 193, 7, 0.06);
    border-bottom: 1px solid rgba(255, 193, 7, 0.1);
}

/* EHD Responsive */
@media (max-width: 768px) {
    .ehd-summary-row {
        gap: 6px;
    }

    .ehd-stat {
        min-width: calc(50% - 6px);
        flex: none;
    }

    .ehd-smart-match-grid {
        grid-template-columns: 1fr;
    }

    .ehd-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .ehd-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    .ehd-stat {
        min-width: 100%;
        padding: 6px 10px;
    }
}

/* ==============================================
   P3: POLISH, UX & ACCESSIBILITY ENHANCEMENTS
   ============================================== */

/* ===== P3-1: SKELETON SHIMMER LOADING ===== */

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.hub-card-skeleton {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 20px;
    min-height: 200px;
    position: relative;
    overflow: hidden;
}

.hub-card-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 25%, rgba(255, 255, 255, 0.04) 50%, transparent 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

.hub-card-skeleton .skel-line {
    height: 14px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    margin-bottom: 12px;
}

.hub-card-skeleton .skel-line.skel-title {
    width: 70%;
    height: 18px;
}

.hub-card-skeleton .skel-line.skel-text {
    width: 90%;
}

.hub-card-skeleton .skel-line.skel-short {
    width: 40%;
}

.hub-card-skeleton .skel-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.board-item-skeleton {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.board-item-skeleton .skel-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.board-item-skeleton .skel-lines {
    flex: 1;
}

.board-item-skeleton .skel-lines .skel-line {
    height: 12px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    margin-bottom: 8px;
}

.board-item-skeleton .skel-lines .skel-line:first-child {
    width: 60%;
    height: 16px;
}

.board-item-skeleton .skel-lines .skel-line:last-child {
    width: 80%;
    margin-bottom: 0;
}

/* ===== P3-2: BUTTON LOADING STATES ===== */

.btn-loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.btn-loading .btn-text {
    opacity: 0.5;
}

.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== P3-4: OFFLINE BANNER ===== */

.hub-offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    text-align: center;
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    display: none;
    animation: slideDown 0.3s ease;
}

.hub-offline-banner.visible {
    display: block;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* ===== P3-11: SKIP-TO-CONTENT LINK ===== */

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    z-index: 10001;
    padding: 10px 20px;
    background: var(--primary-color);
    color: #000;
    font-weight: 700;
    border-radius: 0 0 8px 0;
    font-size: 0.9rem;
    text-decoration: none;
}

.skip-link:focus {
    left: 0;
    top: 0;
}

/* ===== P3-20/21: TOAST IMPROVEMENTS ===== */

.hub-toast {
    position: relative;
    padding-right: 36px;
}

.hub-toast.warning {
    background: rgba(234, 179, 8, 0.92);
    border: 1px solid #fbbf24;
    color: #000;
}

.hub-toast .toast-close {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: inherit;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0.6;
    padding: 2px 6px;
    line-height: 1;
}

.hub-toast .toast-close:hover {
    opacity: 1;
}

.hub-toast .toast-action {
    display: inline-block;
    margin-left: 10px;
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.hub-toast .toast-action:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* ===== P3-22: EHD SECTION SLIDE ANIMATION ===== */

.ehd-detail-section.ehd-animated {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
    margin-top: 0 !important;
    display: block !important;
    border-color: transparent;
}

.ehd-detail-section.ehd-section-open {
    max-height: 600px;
    opacity: 1;
    margin-top: 12px !important;
    border-color: rgba(255, 255, 255, 0.08);
}

/* ===== P3-23: CARD STAGGER ANIMATION ===== */

@keyframes cardSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-animate-in {
    animation: cardSlideUp 0.35s ease forwards;
    opacity: 0;
}

/* ===== P3-27: CUSTOM CONFIRM DIALOG ===== */

.confirm-dialog-content {
    max-width: 440px;
    margin: 0 auto;
}

.confirm-dialog-body {
    text-align: center;
    padding: 24px 20px;
}

.confirm-dialog-body .confirm-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.confirm-dialog-body h3 {
    color: #fff;
    font-size: 1.15rem;
    margin: 0 0 8px 0;
}

.confirm-dialog-body p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.88rem;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.confirm-dialog-body textarea,
.confirm-dialog-body input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #fff;
    font-size: 0.88rem;
    resize: vertical;
    margin-bottom: 4px;
    font-family: inherit;
}

.confirm-dialog-body textarea:focus,
.confirm-dialog-body input[type="text"]:focus {
    outline: none;
    border-color: rgba(139, 255, 34, 0.4);
}

.confirm-dialog-footer {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 0 20px 20px;
}

.confirm-dialog-footer .btn-confirm {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.88rem;
    transition: all 0.2s;
}

.confirm-dialog-footer .btn-confirm.primary {
    background: var(--primary-color);
    color: #000;
}

.confirm-dialog-footer .btn-confirm.primary:hover {
    background: #a5ff4a;
}

.confirm-dialog-footer .btn-confirm.danger {
    background: rgba(255, 100, 100, 0.15);
    color: #ff6464;
    border: 1px solid rgba(255, 100, 100, 0.3);
}

.confirm-dialog-footer .btn-confirm.danger:hover {
    background: rgba(255, 100, 100, 0.3);
}

.confirm-dialog-footer .btn-confirm.cancel {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.confirm-dialog-footer .btn-confirm.cancel:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* ===== P3-12/13: EHD FILTER ROW ===== */

.ehd-filter-row {
    display: flex;
    gap: 8px;
    padding: 8px 16px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ehd-filter-row select,
.ehd-filter-row input {
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    font-size: 0.78rem;
    flex: 1;
    max-width: 200px;
}

.ehd-filter-row select:focus,
.ehd-filter-row input:focus {
    outline: none;
    border-color: rgba(139, 255, 34, 0.4);
}

.ehd-filter-row label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

/* ===== P3-41: CHARACTER COUNTER ===== */

.char-counter {
    display: block;
    text-align: right;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 4px;
}

.char-counter.warning {
    color: #fbbf24;
}

.char-counter.limit {
    color: #f87171;
}

/* ===== P3-19: INCOMING BADGE ===== */

.incoming-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #dc2626;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 10px;
    margin-left: 8px;
    animation: badgePulse 2s ease infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ===== P3-48: EVENT ACTION HINT ===== */

.event-action-hint {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.72rem;
    cursor: help;
    margin-top: 6px;
}

/* ===== P3-17: EHD STAT PULSE ON UPDATE ===== */

@keyframes ehdPulse {
    0% { box-shadow: 0 0 0 0 rgba(139, 255, 34, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(139, 255, 34, 0); }
    100% { box-shadow: 0 0 0 0 rgba(139, 255, 34, 0); }
}

.ehd-stat.updated {
    animation: ehdPulse 0.8s ease;
}

/* ===== P3-34: MOBILE MESSAGING SLIDE-OVER ===== */

@media (max-width: 768px) {
    .hub-messaging.msg-show-chat .msg-sidebar {
        display: none;
    }

    .hub-messaging.msg-show-chat .msg-main {
        display: flex !important;
    }

    .hub-messaging .msg-main {
        display: none;
    }

    .msg-back-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        background: none;
        border: none;
        color: var(--primary-color);
        font-size: 0.85rem;
        cursor: pointer;
        padding: 4px 8px;
        margin-right: 10px;
    }
}

@media (min-width: 769px) {
    .msg-back-btn {
        display: none;
    }
}

/* ===== P3-36: MOBILE COMPACT STAT TILES ===== */

@media (max-width: 480px) {
    .ehd-stat {
        min-width: calc(33.33% - 6px) !important;
        flex: none !important;
        padding: 5px 8px !important;
    }

    .ehd-stat-label {
        display: none !important;
    }
}

/* ===== P3-35: MOBILE TAB TOOLTIP ===== */

@media (max-width: 768px) {
    .hub-tab {
        position: relative;
    }

    .hub-tab:focus::after,
    .hub-tab:active::after {
        content: attr(data-tooltip);
        position: absolute;
        bottom: calc(100% + 6px);
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.9);
        color: #fff;
        padding: 4px 10px;
        border-radius: 6px;
        font-size: 0.72rem;
        white-space: nowrap;
        pointer-events: none;
        z-index: 100;
    }
}

/* ===== P3: FOCUS VISIBLE OUTLINES ===== */

.hub-tab:focus-visible,
.hub-card:focus-visible,
.ehd-stat:focus-visible,
.ehd-btn:focus-visible,
.btn-hub-submit:focus-visible,
.btn-hub-action:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.hub-modal:focus-visible {
    outline: none;
}
