/* Nepoužívat .main-content zde — shell <main> už nemá tuto třídu (kolidovalo s common.css a schovávalo patičku). */

.mi-hero {
    display: flex; align-items: center; gap: 24px;
    background: linear-gradient(135deg, #45225e 0%, #6b3fa0 100%);
    border-radius: 12px; padding: 22px 24px; color: #fff;
    margin-bottom: 16px; position: relative; overflow: hidden;
}
.mi-hero::before {
    content: ''; position: absolute; top: -50%; right: -20%;
    width: 300px; height: 300px; border-radius: 50%;
    background: rgba(255,255,255,0.06);
}
.mi-hero-photo {
    width: 72px; height: 72px; border-radius: 50%;
    object-fit: cover; border: 3px solid rgba(255,255,255,0.3);
    flex-shrink: 0; background: rgba(255,255,255,0.12);
}
.mi-hero-placeholder {
    width: 72px; height: 72px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.12); flex-shrink: 0;
    font-size: 1.7rem; color: rgba(255,255,255,0.5);
    border: 3px solid rgba(255,255,255,0.2);
}
.mi-hero-text h1 { margin: 0 0 2px 0; font-size: 1.15rem; font-weight: 700; }
.mi-hero-text p { margin: 0; font-size: 0.82rem; opacity: 0.8; }

.mi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    max-width: 1120px;
}
.mi-card {
    background: #fff; border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid #f1f5f9;
    padding: 0; overflow: hidden;
    transition: box-shadow 0.2s;
}
.mi-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.mi-card-head {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px 10px; border-bottom: 1px solid #f1f5f9;
}
.mi-card-icon {
    width: 30px; height: 30px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; flex-shrink: 0;
}
.mi-card-head h3 { margin: 0; font-size: 0.82rem; font-weight: 700; color: #1e293b; }
.mi-card-body { padding: 12px 14px 14px; }

.mi-row {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 8px 0; gap: 12px;
}
.mi-row + .mi-row { border-top: 1px solid #f8fafc; }
.mi-row-label { font-size: 0.8rem; color: #64748b; white-space: nowrap; }
.mi-row-value {
    font-size: 0.88rem; font-weight: 600; color: #1e293b;
    text-align: right; word-break: break-all;
}

.mi-code {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 1.12rem; font-weight: 800;
    letter-spacing: 0.14em; color: #45225e;
    background: #f3f0f7; padding: 6px 12px;
    border-radius: 8px; display: inline-block;
}
.mi-code-hint {
    font-size: 0.75rem; color: #94a3b8;
    margin-top: 4px; font-weight: 400; letter-spacing: 0;
}
.mi-edit-wrap { max-width: 280px; margin: 0 auto; }
.mi-input {
    width: 100%; padding: 11px 12px; border: 1px solid #d6dce6; border-radius: 10px;
    font-size: 1rem; text-align: center; box-sizing: border-box; letter-spacing: 0.18em;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; font-weight: 700; color: #1e293b;
}
.mi-input.invalid { border-color: #dc2626; box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12); background: #fef2f2; }
.mi-actions { display: flex; justify-content: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.mi-btn {
    border: none; border-radius: 10px; padding: 10px 14px; cursor: pointer; font-weight: 700; font-size: 0.84rem;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.mi-btn-primary { background: #45225e; color: #fff; }
.mi-btn-secondary { background: #e2e8f0; color: #334155; }
.mi-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.mi-edit-toggle {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; color: #45225e;
    font-size: 0.82rem; font-weight: 700; cursor: pointer; background: none; border: none; padding: 0;
}
.mi-edit-form { display: none; margin-top: 14px; }
.mi-edit-form.open { display: block; }
.mi-msg {
    margin-top: 10px; padding: 10px 12px; border-radius: 10px; font-size: 0.8rem;
    line-height: 1.45; text-align: left; display: none;
}
.mi-msg.show { display: block; }
.mi-msg.ok { background: #ecfdf5; color: #166534; }
.mi-msg.err { background: #fef2f2; color: #b91c1c; }
.mi-msg.warn { background: #fffbeb; color: #b45309; }
.mi-empty-box {
    font-size: 0.86rem; color: #64748b; background: #f8fafc; border: 1px dashed #cbd5e1;
    border-radius: 10px; padding: 14px 16px; text-align: center;
}

.mi-full { grid-column: 1 / -1; }

.mi-onas-wrap {
    display: flex; gap: 20px; align-items: flex-start;
}
.mi-onas-media {
    width: 180px; flex-shrink: 0; border-radius: 10px;
    overflow: hidden; background: #f8fafc;
}
.mi-onas-media img,
.mi-onas-media video { width: 100%; display: block; border-radius: 10px; }
.mi-onas-text { flex: 1; font-size: 0.88rem; color: #334155; line-height: 1.6; }
.mi-onas-text p { margin: 0 0 8px; }

.mi-vino-card {
    display: flex; align-items: center; gap: 14px;
    background: #fdf4ff; border-radius: 10px; padding: 12px 16px;
    margin-top: 10px;
}
.mi-vino-img { width: 48px; height: 64px; object-fit: contain; border-radius: 6px; }
.mi-vino-name { font-weight: 600; font-size: 0.88rem; color: #1e293b; }
.mi-vino-code { font-size: 0.75rem; color: #64748b; }

.mi-account-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 0;
}
.mi-account-row + .mi-account-row { border-top: 1px solid #f8fafc; }
.mi-account-icon {
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; flex-shrink: 0; color: #fff;
}
.mi-account-row .mi-account-text { flex: 1; }
.mi-account-row .mi-account-label { font-size: 0.75rem; color: #64748b; }
.mi-account-row .mi-account-value { font-size: 0.86rem; font-weight: 600; color: #1e293b; }

.mi-manager-row {
    display: flex; align-items: center; gap: 12px; padding: 4px 0;
}
.mi-manager-photo {
    width: 40px; height: 40px; border-radius: 50%;
    object-fit: cover; background: #f1f5f9;
}
.mi-manager-placeholder {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #f1f5f9; color: #94a3b8; font-size: 1rem;
}
.mi-manager-name { font-weight: 600; font-size: 0.92rem; color: #1e293b; }
.mi-manager-pos { font-size: 0.78rem; color: #64748b; }
.mi-manager-contact {
    font-size: 0.8rem; color: #475569; margin-top: 4px;
}
.mi-manager-contact a {
    color: #2563eb; text-decoration: none;
}
.mi-manager-contact a:hover { text-decoration: underline; }
.mi-training-list { display: flex; flex-direction: column; gap: 12px; }
.mi-training-item { border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px; background: #fff; }
.mi-training-item.pending { border-color: #c4b5fd; background: #faf5ff; }
.mi-training-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.mi-training-title { font-weight: 700; color: #1e293b; }
.mi-training-date { font-size: 0.78rem; color: #64748b; }
.mi-training-items { display: flex; flex-wrap: wrap; gap: 6px; }
.mi-training-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: #f1f5f9; color: #334155; font-size: 0.76rem; font-weight: 600; }
.mi-training-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.mi-training-empty { padding: 18px; border: 1px dashed #cbd5e1; border-radius: 12px; color: #64748b; text-align: center; }

.mi-loading {
    text-align: center; padding: 60px 20px; color: #94a3b8;
}
.mi-loading i { font-size: 2rem; margin-bottom: 12px; display: block; }

.mi-empty { color: #94a3b8; font-size: 0.85rem; font-style: italic; }
.mi-secret-list { display: grid; gap: 12px; }
.mi-secret-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 14px 16px; border-radius: 12px; background: #faf5ff; border: 1px solid #eadcff; }
.mi-secret-name { font-size: 0.9rem; font-weight: 700; color: #1e293b; }
.mi-secret-note { margin-top: 4px; font-size: 0.78rem; color: #64748b; }
.mi-secret-code { flex-shrink: 0; align-self: center; }
.mi-embed-frame {
    width: 100%; min-height: 400px; border: 1px solid #e2e8f0; border-radius: 16px; background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06); overflow: hidden;
}
.mi-review-summary {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px;
}
.mi-review-stat {
    background: linear-gradient(135deg, #faf5ff 0%, #f6eff8 100%);
    border: 1px solid #eadcff; border-radius: 14px; padding: 16px 18px;
}
.mi-review-stat-label { font-size: 0.75rem; color: #7c3aed; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.mi-review-stat-value { margin-top: 6px; font-size: 1.6rem; font-weight: 800; color: #45225e; }
.mi-review-list { display: grid; gap: 14px; }
.mi-review-item {
    border: 1px solid #eadcff; border-radius: 16px; background: #fff;
    box-shadow: 0 8px 24px rgba(69,34,94,0.08); overflow: hidden;
}
.mi-review-item-head {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
    padding: 18px 20px 14px; background: linear-gradient(135deg, #faf5ff 0%, #fff 100%);
    border-bottom: 1px solid #f3e8ff;
}
.mi-review-customer { font-size: 1rem; font-weight: 800; color: #1f2937; }
.mi-review-meta { margin-top: 4px; font-size: 0.82rem; color: #6b7280; }
.mi-review-badge {
    display: inline-flex; align-items: center; gap: 8px; border-radius: 999px;
    padding: 10px 14px; background: #45225e; color: #fff; font-weight: 700; white-space: nowrap;
}
.mi-review-badge.company { background: #2563eb; }
.mi-review-badge-emoji { font-size: 1.15rem; line-height: 1; }
.mi-review-item-body { padding: 18px 20px 20px; display: grid; gap: 14px; }
.mi-review-rating-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.mi-review-rating-card {
    border-radius: 14px; padding: 14px 16px; border: 1px solid #e9dff2;
    background: linear-gradient(135deg, #fff 0%, #faf7ff 100%);
}
.mi-review-rating-card.personal { border-color: #e9d5ff; background: linear-gradient(135deg, #faf5ff 0%, #fff 100%); }
.mi-review-rating-card.company { border-color: #bfdbfe; background: linear-gradient(135deg, #eff6ff 0%, #fff 100%); }
.mi-review-rating-label {
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.04em; color: #6b7280; margin-bottom: 10px;
}
.mi-review-rating-card.personal .mi-review-rating-label { color: #7c3aed; }
.mi-review-rating-card.company .mi-review-rating-label { color: #2563eb; }
.mi-review-rating-meta { margin-top: 8px; font-size: 0.82rem; color: #64748b; line-height: 1.5; }
.mi-review-comment {
    background: #faf5ff; border: 1px solid #eadcff; border-radius: 12px; padding: 14px 16px;
}
.mi-review-comment-label { font-size: 0.75rem; font-weight: 700; color: #7c3aed; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.mi-review-comment-text { font-size: 0.92rem; color: #334155; line-height: 1.6; }
.mi-review-empty {
    padding: 26px 20px; text-align: center; border: 1px dashed #d8b4fe;
    border-radius: 16px; background: #faf5ff; color: #6b7280;
}
.mi-loaned-list { display: grid; gap: 14px; }
.mi-loaned-item {
    border: 1px solid #e9dff2; border-radius: 16px; background: linear-gradient(135deg, #fff 0%, #faf7ff 100%);
    box-shadow: 0 8px 24px rgba(69,34,94,0.08); padding: 18px 20px;
}
.mi-loaned-head {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px;
}
.mi-loaned-title { font-size: 1rem; font-weight: 800; color: #1f2937; }
.mi-loaned-sub { margin-top: 4px; font-size: 0.82rem; color: #6b7280; }
.mi-loaned-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.mi-loaned-badge {
    display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 7px 10px;
    font-size: 0.76rem; font-weight: 700;
}
.mi-loaned-badge.type { background: #f3e8ff; color: #7c3aed; }
.mi-loaned-badge.qty { background: #dbeafe; color: #2563eb; }
.mi-loaned-note {
    margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid #f1e7f7;
    font-size: 0.88rem; color: #475569; line-height: 1.6; white-space: pre-wrap;
}
.mi-loaned-empty {
    padding: 26px 20px; text-align: center; border: 1px dashed #d8b4fe;
    border-radius: 16px; background: #faf5ff; color: #6b7280;
}

@media (max-width: 700px) {
    .mi-grid { grid-template-columns: 1fr; }
    .mi-hero { flex-direction: column; text-align: center; padding: 24px 16px; }
    .mi-hero-text h1 { font-size: 1.25rem; }
    .mi-onas-wrap { flex-direction: column; }
    .mi-onas-media { width: 100%; max-width: 280px; }
    .mi-secret-item { flex-direction: column; }
    .mi-secret-code { align-self: flex-start; }
    .mi-review-item-head { flex-direction: column; }
}

.ic-purple { background: #ede9fe; color: #6d28d9; }
.ic-blue { background: #dbeafe; color: #2563eb; }
.ic-green { background: #dcfce7; color: #16a34a; }
.ic-orange { background: #fef3c7; color: #d97706; }
.ic-rose { background: #ffe4e6; color: #e11d48; }

/* CRM shell — nativní „Moje info“ */
.crm-moje-info {
    max-width: 100%;
    margin: 0;
}
.crm-moje-info__content {
    min-height: 160px;
}

/* 2026-04 compact redesign */
.crm-moje-info {
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px 0 28px;
}

.crm-moje-info__content {
    min-height: 160px;
}

.mi-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 2px 0;
    font-size: 11px;
    color: #97a0af;
}

.mi-breadcrumbs strong {
    color: #667085;
    font-weight: 600;
}

.mi-profile-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    border: 1px solid #e7edf3;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.mi-profile-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.mi-profile-copy {
    min-width: 0;
}

.mi-profile-eyebrow {
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a94a6;
}

.mi-profile-copy h1 {
    margin: 0;
    font-size: 24px;
    line-height: 1.1;
    font-weight: 700;
    color: #1f2937;
}

.mi-profile-subline {
    margin-top: 5px;
    font-size: 13px;
    color: #667085;
}

.mi-profile-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.mi-stat-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 86px;
    padding: 9px 12px;
    border: 1px solid #e8edf3;
    border-radius: 12px;
    background: #f8fafc;
}

.mi-stat-chip-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8b94a7;
}

.mi-stat-chip strong {
    margin-top: 4px;
    font-size: 20px;
    line-height: 1;
    color: #1f2937;
}

.mi-facts-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.mi-fact-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #e7edf3;
    border-radius: 12px;
    background: #fff;
}

.mi-fact-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f3f0f7;
    color: #45225e;
    flex-shrink: 0;
}

.mi-fact-copy {
    min-width: 0;
}

.mi-fact-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8b94a7;
}

.mi-fact-value {
    margin-top: 3px;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mi-grid {
    gap: 12px;
    max-width: none;
}

.mi-section {
    display: grid;
    gap: 10px;
}

.mi-section-label {
    padding: 0 2px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a94a6;
}

.mi-code-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mi-card,
.mi-review-item,
.mi-loaned-item,
.mi-training-item,
.mi-training-item.pending,
.mi-review-stat,
.mi-secret-item {
    border-radius: 14px;
    border: 1px solid #e7edf3;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}

.mi-card {
    overflow: hidden;
}

.mi-card-head {
    gap: 9px;
    padding: 12px 14px;
    border-bottom: 1px solid #edf2f7;
    background: #fcfdff;
}

.mi-card-head h3 {
    font-size: 13px;
}

.mi-card-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    font-size: 12px;
}

.mi-card-body {
    padding: 13px 14px 14px;
}

.mi-code {
    padding: 7px 11px;
    border-radius: 10px;
    font-size: 17px;
    letter-spacing: 0.16em;
    background: #f5f1fa;
}

.mi-edit-toggle {
    margin-top: 12px;
    font-size: 12px;
}

.mi-btn {
    border-radius: 10px;
    padding: 10px 13px;
    font-size: 12px;
}

.mi-btn-primary {
    background: #45225e;
}

.mi-review-summary {
    gap: 12px;
    margin-bottom: 14px;
}

.mi-review-stat {
    background: #fff;
    padding: 14px 16px;
}

.mi-review-stat-label,
.mi-review-rating-label,
.mi-review-comment-label {
    color: #8b94a7;
}

.mi-review-stat-value {
    color: #1f2937;
}

.mi-review-item-head,
.mi-review-rating-card,
.mi-review-comment,
.mi-loaned-item,
.mi-secret-item,
.mi-training-item,
.mi-training-item.pending {
    background: #fff;
}

.mi-secret-item {
    padding: 12px 14px;
}

.mi-training-chip,
.mi-loaned-badge,
.mi-review-badge,
.mi-review-badge.company {
    box-shadow: none;
}

.mi-loading {
    padding: 56px 18px;
}

.mi-loading--compact {
    padding: 28px 16px;
    border: 1px dashed #d8e0ea;
    border-radius: 14px;
    background: #fff;
}

@media (max-width: 1024px) {
    .mi-facts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .mi-profile-bar {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }

    .mi-profile-stats {
        width: 100%;
        justify-content: flex-start;
    }

    .mi-facts-grid {
        grid-template-columns: 1fr;
    }

    .mi-code-grid {
        grid-template-columns: 1fr;
    }

    .mi-profile-copy h1 {
        font-size: 21px;
    }
}
