/* Admin Table Features - Resizing & Column Picker */

/* Resizers */
.admin-table th {
    position: relative;
    /* user-select: none; allow text selection if not resizing, but preventing selects makes drag simpler */
}

.col-resizer {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 5px;
    background: rgba(255, 255, 255, 0.1);
    cursor: col-resize;
    user-select: none;
    touch-action: none;
    z-index: 10;
}

.col-resizer:hover, .col-resizing {
    background: var(--accent-lime);
}

/* Column Picker Dropdown */
.column-picker-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: rgba(17,17,17,0.95);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    z-index: 1000;
    display: none;
    max-height: 400px;
    overflow-y: auto;
    width: 220px;
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}

.column-picker-dropdown.active {
    display: block;
}

.column-picker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    cursor: pointer;
    color: #ccc;
    font-size: 0.9rem;
    border-radius: 4px;
}

.column-picker-item:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

.column-picker-item input {
    cursor: pointer;
}

.column-picker-header {
    font-weight: bold;
    color: var(--accent-lime);
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Dynamic hiding class appended via JS style injection */
/* e.g. .hide-col-3 { display: none !important; } */

/* ========== Dashboard Accordions ========== */

.admin-accordion-toggle:hover .admin-accordion-arrow {
    color: var(--accent-lime) !important;
}

.admin-accordion-body {
    overflow: hidden;
}

/* ========== Quick Actions HUD ========== */

.admin-qa-hud {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 25500;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.admin-qa-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-lime), #a8cc00);
    border: none;
    color: #000;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(212,255,0,0.3);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-qa-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(212,255,0,0.45);
}

.admin-qa-hud.open .admin-qa-toggle {
    background: #333;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.admin-qa-panel {
    display: none;
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 280px;
    background: rgba(17,17,17,0.95);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    animation: qaSlideUp 0.2s ease;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}

.admin-qa-hud.open .admin-qa-panel {
    display: block;
}

@keyframes qaSlideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.admin-qa-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: var(--accent-lime);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.admin-qa-actions {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-qa-btn {
    width: 100%;
    padding: 12px 16px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    color: #bbb;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-qa-btn:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.12);
    color: white;
}

.admin-qa-btn i {
    width: 20px;
    text-align: center;
}

.admin-qa-btn-primary {
    background: var(--accent-lime);
    color: #000;
    border-color: var(--accent-lime);
    font-weight: 600;
}

.admin-qa-btn-primary:hover {
    background: #c2eb00;
    border-color: #c2eb00;
    color: #000;
}

.admin-qa-btn-danger {
    color: #ff4444;
    border-color: rgba(255,68,68,0.3);
}

.admin-qa-btn-danger:hover {
    background: rgba(255,68,68,0.1);
    border-color: #ff4444;
    color: #ff4444;
}

.admin-qa-btn-warn {
    color: orange;
    border-color: rgba(255,165,0,0.3);
}

.admin-qa-btn-warn:hover {
    background: rgba(255,165,0,0.1);
    border-color: orange;
    color: orange;
}

.admin-qa-divider {
    height: 1px;
    background: rgba(255,255,255,0.05);
    margin: 6px 0;
}

/* ========== Confirmation Dialog ========== */

.admin-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 26000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.admin-confirm-dialog {
    background: rgba(17,17,17,0.95);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 30px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}

.admin-confirm-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .admin-qa-hud {
        bottom: 20px;
        right: 16px;
    }
    .admin-qa-toggle {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    .admin-qa-panel {
        width: 260px;
        bottom: 62px;
    }
}


/* ─── EMAIL PANEL ─────────────────────────────────────── */

.email-panel-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.email-compose-pane {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.email-preview-pane {
    position: sticky;
    top: 0;
}

.email-field-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.email-label {
    color: #888;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.email-input {
    background: #0a0a0a;
    border: 1px solid #222;
    border-radius: 6px;
    padding: 10px 14px;
    color: #eee;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.email-input:focus {
    outline: none;
    border-color: var(--accent-lime, #D4FF00);
}

.email-input::placeholder {
    color: #444;
}

/* Toolbar */
.email-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    background: #0a0a0a;
    border: 1px solid #222;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    flex-wrap: wrap;
}

.email-toolbar button {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #999;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.15s;
    line-height: 1;
}

.email-toolbar button:hover {
    background: #1a1a1a;
    color: #fff;
    border-color: #333;
}

.email-toolbar-sep {
    width: 1px;
    height: 18px;
    background: #222;
    margin: 0 4px;
}

/* Editor */
.email-editor {
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    background: #0a0a0a;
    border: 1px solid #222;
    border-radius: 0 0 6px 6px;
    padding: 14px 16px;
    color: #eee;
    font-size: 0.95rem;
    line-height: 1.6;
    outline: none;
    transition: border-color 0.2s;
}

.email-editor:focus {
    border-color: var(--accent-lime, #D4FF00);
}

.email-editor:empty::before {
    content: attr(data-placeholder);
    color: #444;
    pointer-events: none;
}

/* Mode Toggle */
.email-mode-toggle {
    display: flex;
    gap: 0;
    border: 1px solid #333;
    border-radius: 6px;
    overflow: hidden;
}

.email-mode-btn {
    background: transparent;
    border: none;
    color: #666;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 5px 12px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.email-mode-btn:hover {
    background: #1a1a1a;
    color: #ccc;
}

.email-mode-btn.active {
    background: #1a1a1a;
    color: var(--accent-lime, #D4FF00);
}

/* HTML Source Textarea */
.email-html-source {
    width: 100%;
    min-height: 280px;
    background: #050505;
    border: 1px solid #222;
    border-radius: 6px;
    padding: 14px 16px;
    color: #7dd3fc;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.82rem;
    line-height: 1.55;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.email-html-source:focus {
    border-color: #7dd3fc;
}

/* Preview */
.email-preview-frame {
    width: 100%;
    min-height: 500px;
    border: 1px solid #222;
    border-radius: 8px;
    background: #050505;
}

.email-history-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

/* Responsive */
@media (max-width: 900px) {
    .email-panel-layout {
        grid-template-columns: 1fr;
    }
    .email-history-grid {
        grid-template-columns: 1fr;
    }
    .email-preview-pane {
        position: static;
    }
}


/* ========== Admin Portal — Rounded Buttons ========== */
/* Override the public-site angular clip-path with clean rounded corners */

#admin-portal .btn,
#admin-portal .btn-primary,
#admin-portal .btn-secondary {
    clip-path: none;
    border-radius: 8px;
}


/* ========== Events — Thumbnail View ========== */

.evt-thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 14px;
    padding: 16px;
}

.evt-thumb-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.evt-thumb-card:hover {
    border-color: rgba(255,255,255,0.16);
    transform: translateY(-2px);
}

.evt-thumb-poster {
    aspect-ratio: 4 / 5;
    background: rgba(255,255,255,0.04) center / cover no-repeat;
    position: relative;
}

.evt-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.18s ease;
}
.evt-thumb-card:hover .evt-thumb-overlay {
    opacity: 1;
}

.evt-thumb-info {
    padding: 10px 12px 12px;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.evt-thumb-title {
    font-size: 0.84rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}
.evt-thumb-meta {
    font-size: 0.7rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
}
.evt-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 2px 8px;
    border-radius: 20px;
}
.evt-status-confirmed {
    background: rgba(212,255,0,0.1);
    border: 1px solid rgba(212,255,0,0.28);
    color: var(--accent-lime);
}
.evt-status-draft {
    background: rgba(255,165,0,0.1);
    border: 1px solid rgba(255,165,0,0.28);
    color: orange;
}
.evt-status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    display: inline-block;
}


/* ========== Events — Column View ========== */

.evt-col-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 16px;
}

.evt-col-row {
    display: grid;
    grid-template-columns: 56px 1fr 72px 96px 76px;
    gap: 12px;
    align-items: center;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}
.evt-col-row:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
}

.evt-col-thumb {
    width: 56px;
    height: 36px;
    border-radius: 6px;
    background: rgba(255,255,255,0.04) center / cover no-repeat;
    border: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.evt-col-name {
    font-size: 0.86rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.evt-col-sub {
    font-size: 0.72rem;
    color: #666;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.evt-col-price {
    font-size: 0.82rem;
    color: #aaa;
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .evt-thumb-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
        padding: 12px;
    }
    .evt-col-row {
        grid-template-columns: 44px 1fr 64px;
    }
    .evt-col-price,
    .evt-col-row > .evt-status-badge,
    .evt-col-row > button {
        display: none;
    }
}


/* ========== Email Templates — Two-Panel Layout ========== */

.tpl-layout {
    display: flex;
    gap: 20px;
    align-items: start;
}
.tpl-sidebar {
    width: 260px;
    flex-shrink: 0;
}
.tpl-main {
    flex: 1;
    min-width: 0;
}
.tpl-editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}
@media (max-width: 900px) {
    .tpl-layout { flex-direction: column; }
    .tpl-sidebar { width: 100%; }
    .tpl-editor-grid { grid-template-columns: 1fr; }
}


/* ========== Artist Portal — Grid + List Views ========== */

.acts-view-toggle {
    display: flex;
    gap: 4px;
}
.acts-view-btn {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: 6px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: #555;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.acts-view-btn.active {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.2);
    color: #ccc;
}

/* Grid */
.acts-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    padding: 4px 0 16px;
}
.act-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s;
}
.act-card:hover {
    border-color: rgba(255,255,255,0.14);
    transform: translateY(-2px);
}
.act-card-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #1a1a1a;
    position: relative;
}
.act-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.act-card-img .act-card-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    color: #2a2a2a;
}
.act-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.18s;
}
.act-card:hover .act-card-overlay { opacity: 1; }
.act-card-info {
    padding: 10px 12px 12px;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.act-card-name {
    font-size: 0.84rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
}
.act-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.act-genre-tag {
    font-size: 0.62rem;
    color: #777;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    padding: 1px 6px;
}
.act-portal-badge {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 2px 7px;
    border-radius: 4px;
}
.act-portal-active {
    background: rgba(212,255,0,0.08);
    border: 1px solid rgba(212,255,0,0.25);
    color: var(--accent-lime);
}
.act-portal-inactive {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.07);
    color: #444;
}

/* List */
.acts-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 4px 0 16px;
}
.act-list-row {
    display: grid;
    grid-template-columns: 38px 1fr 90px 78px 90px;
    gap: 12px;
    align-items: center;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 9px 14px;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}
.act-list-row:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.1);
}
.act-list-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}
.act-list-name {
    font-size: 0.86rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.act-list-email {
    font-size: 0.74rem;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* Quick-edit panel */
.act-quick-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100vh;
    background: #0d0d0d;
    border-left: 1px solid rgba(255,255,255,0.08);
    z-index: 20001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.22s ease;
    overflow: hidden;
}
.act-quick-panel.open {
    transform: translateX(0);
}
@media (max-width: 900px) {
    .acts-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .acts-grid { grid-template-columns: repeat(2, 1fr); }
    .act-list-row { grid-template-columns: 36px 1fr 78px; }
    .act-list-row > .act-portal-badge,
    .act-list-row > div:last-child { display: none; }
    .act-quick-panel { width: 100%; }
    .evt-quick-panel { width: 100%; }
}

/* Event quick-edit panel */
.evt-quick-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 340px;
    height: 100vh;
    background: #0d0d0d;
    border-left: 1px solid rgba(255,255,255,0.08);
    z-index: 20001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.22s ease;
    overflow: hidden;
}
.evt-quick-panel.open {
    transform: translateX(0);
}
