/* ============================================
   Hero-View & Login Styles
   ============================================ */

body.hero-mode {
    background: var(--gray-50);
}

/* === ERP Badge im Nav === */
.erp-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--success);
    margin-left: 12px;
    animation: pulse-green 2s ease-in-out infinite;
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); }
    50%       { box-shadow: 0 0 0 5px rgba(22,163,74,0.15); }
}

/* === User Chip === */
.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: var(--gray-100);
    border-radius: 999px;
    border: 1px solid var(--gray-200);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.2;
}

.user-company {
    font-size: 0.72rem;
    color: var(--gray-500);
    line-height: 1.2;
}

/* === Hook Banner === */
.hook-banner {
    background: linear-gradient(135deg, #1e3a5f, #1d4ed8);
    color: white;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 24px;
    flex-wrap: wrap;
}

.hook-banner-icon {
    font-size: 1.6rem;
    opacity: 0.9;
    animation: radar 1.5s ease-in-out infinite;
}

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

.hook-banner-text strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
}

.hook-banner-text span {
    font-size: 0.82rem;
    opacity: 0.85;
}

.hook-banner-url {
    margin-left: auto;
    font-family: monospace;
    font-size: 0.78rem;
    opacity: 0.7;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* === Main Container === */
#hero-main {
    margin-top: var(--nav-height);
    min-height: calc(100vh - var(--nav-height));
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 24px;
}

/* === Baskets Header === */
.baskets-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.baskets-header h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.baskets-header h1 i {
    color: var(--primary);
}

.baskets-header p {
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* === Filter Pills === */
.baskets-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-pill {
    padding: 6px 14px;
    border: 1.5px solid var(--gray-200);
    background: white;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.filter-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* === Basket Grid === */
.baskets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 18px;
}

/* === Basket Card === */
.basket-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.basket-card:hover {
    border-color: var(--primary-border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.basket-card.status-ready {
    border-color: var(--success-border);
    border-left: 4px solid var(--success);
}

.basket-card.status-ready:hover {
    box-shadow: 0 10px 25px rgba(22,163,74,0.12);
}

.basket-card.status-validated {
    border-left: 4px solid var(--primary);
}

.basket-card.status-transferred {
    border-left: 4px solid #7c3aed;
    opacity: 0.8;
}

.basket-card.status-draft {
    border-left: 4px solid var(--gray-300);
}

/* Card Header */
.card-header {
    padding: 18px 18px 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.card-file-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--success-bg);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.basket-card.status-validated .card-file-icon {
    background: var(--primary-bg);
    color: var(--primary);
}

.basket-card.status-transferred .card-file-icon {
    background: #f5f3ff;
    color: #7c3aed;
}

.basket-card.status-draft .card-file-icon {
    background: var(--gray-100);
    color: var(--gray-500);
}

.card-title-group {
    flex: 1;
    min-width: 0;
}

.card-filename {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--gray-900);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    margin-bottom: 4px;
}

.card-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

/* Card Body */
.card-body {
    padding: 0 18px 12px;
}

.card-note {
    font-size: 0.82rem;
    color: var(--gray-600);
    font-style: italic;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-stats {
    display: flex;
    gap: 16px;
}

.card-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: var(--gray-500);
}

.card-stat i {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.card-stat strong {
    color: var(--gray-800);
    font-weight: 600;
}

/* Card Footer */
.card-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: var(--gray-50);
}

.card-date {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.card-actions {
    display: flex;
    gap: 6px;
}

/* CTA Button auf der Karte */
.btn-transfer-hero {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-transfer-hero:hover {
    background: #15803d;
    box-shadow: 0 3px 8px rgba(22,163,74,0.3);
}

.btn-view-detail {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    background: white;
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-view-detail:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 80px 40px;
    background: white;
    border-radius: var(--radius-lg);
    border: 2px dashed var(--gray-200);
}

.empty-icon {
    font-size: 3rem;
    color: var(--gray-300);
    margin-bottom: 16px;
}

.empty-state h3 {
    color: var(--gray-600);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--gray-400);
    margin-bottom: 24px;
}

/* === Modal XL === */
.modal-xl {
    max-width: 860px;
    width: 95%;
}

.modal-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

/* Basket Meta Grid */
.basket-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.meta-label {
    font-size: 0.72rem;
    color: var(--gray-400);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.meta-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-800);
}

/* Items Section */
.items-section {
    margin-bottom: 16px;
}

.items-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.items-header h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--gray-700);
}

.items-table-wrap {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: auto;
    max-height: 300px;
}

/* XML Details */
.xml-details {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-top: 8px;
}

.xml-details summary {
    padding: 10px 16px;
    background: var(--gray-50);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    list-style: none;
}

.xml-details summary:hover { background: var(--gray-100); }

.xml-details .xml-code {
    margin: 0;
    border-radius: 0;
    max-height: 250px;
}

/* === Transfer Overlay === */
.transfer-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(15,23,42,0.65);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.transfer-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-xl);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}

.transfer-sending {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.transfer-spinner-ring {
    width: 72px;
    height: 72px;
    border: 5px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

.transfer-sending h2 { font-size: 1.3rem; }
.transfer-sending p  { color: var(--gray-500); font-size: 0.9rem; }

.transfer-success-icon { font-size: 4rem; color: var(--success); margin-bottom: 8px; }
.transfer-error-icon   { font-size: 4rem; color: var(--error);   margin-bottom: 8px; }

.transfer-result-title   { font-size: 1.4rem; font-weight: 800; margin-bottom: 8px; }
.transfer-result-message { color: var(--gray-500); margin-bottom: 28px; font-size: 0.9rem; }

.transfer-result-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* === READY card highlight animation === */
@keyframes ready-glow {
    0%, 100% { box-shadow: 0 4px 15px rgba(22,163,74,0.1); }
    50%       { box-shadow: 0 4px 25px rgba(22,163,74,0.28); }
}

.basket-card.status-ready {
    animation: ready-glow 3s ease-in-out infinite;
}

/* ============================================
   Team-Visibility & Scope-Tab Styles
   ============================================ */

/* --- baskets-header-right: Scope-Tabs + Filter-Pills nebeneinander --- */
.baskets-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

/* --- Scope-Tabs: "Meine" / "Team" --- */
.scope-tabs {
    display: flex;
    gap: 0;
    background: var(--gray-100);
    padding: 4px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.scope-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    border: none;
    border-radius: calc(var(--radius-sm) - 2px);
    background: transparent;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-500);
    transition: all var(--transition-fast);
    position: relative;
    white-space: nowrap;
}

.scope-tab:hover:not(.active) {
    color: var(--gray-700);
    background: var(--gray-200);
}

.scope-tab.active {
    background: white;
    color: var(--gray-900);
    box-shadow: var(--shadow-sm);
}

.scope-tab[data-scope="team"].active {
    color: var(--primary);
}

/* Team-Zähler-Badge auf dem "Team"-Tab */
.team-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--primary);
    color: white;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    margin-left: 2px;
}

/* --- Sichtbarkeits-Toggle-Button auf der Karte --- */
.btn-toggle-visibility {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.btn-toggle-visibility:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    color: var(--gray-600);
}

/* Aktiver Zustand: freigegeben für Team */
.btn-toggle-visibility.is-team {
    background: var(--primary-bg);
    border-color: var(--primary-border);
    color: var(--primary);
}

.btn-toggle-visibility.is-team:hover {
    background: #dbeafe;
    color: var(--primary-dark);
}

/* --- Basket-Karte: Team-Variante (eigene, für Team freigegeben) --- */
.basket-card.visibility-team {
    border-right: 3px solid var(--primary-border);
}

.basket-card.visibility-team .card-header {
    position: relative;
}

/* --- Team-Owner-Badge (fremde Karte aus dem Team) --- */
.team-owner-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    background: var(--primary-bg);
    border: 1px solid var(--primary-border);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}

.team-owner-badge i {
    font-size: 0.65rem;
}

/* --- Kommentar-Zähler-Chip auf der Karte --- */
.comment-count-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--gray-400);
    padding: 2px 6px;
    border-radius: 999px;
    border: 1px solid var(--gray-200);
    background: white;
    transition: all var(--transition-fast);
}

.comment-count-chip:hover {
    border-color: var(--gray-300);
    color: var(--gray-600);
}

.comment-count-chip i {
    font-size: 0.7rem;
}

/* === Responsive === */
@media (max-width: 768px) {
    .baskets-header { flex-direction: column; }
    .baskets-header-right { align-items: flex-start; }
    .baskets-grid { grid-template-columns: 1fr; }
    .hook-banner { flex-direction: column; text-align: center; }
    .hook-banner-url { margin-left: 0; }
    .user-info { display: none; }
    .transfer-card { padding: 32px 24px; }
    .scope-tabs { width: 100%; }
    .scope-tab { flex: 1; justify-content: center; }
}
