/* ============================================================
   PANEL MECHANIKA — MOBILNYMECHANIK.PL
   Dashboard for mechanics: subscription, profile, stats
   Designed to match JSX mockup (mobilny-mechanik-panel-mockup.jsx)
   ============================================================ */

/* --- LAYOUT --- */
.mm-panel {
    max-width: 100%;
}

.mm-panel__header {
    margin-bottom: 32px;
}

.mm-panel__title {
    font-size: 28px;
    font-weight: 800;
    color: #0F172A;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

.mm-panel__subtitle {
    font-size: 15px;
    color: #64748B;
    margin: 0;
}

.mm-panel__content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mm-panel__row--2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* --- ALERTS (success/error messages) --- */
.mm-panel-alert {
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 500;
}

.mm-panel-alert--success {
    background: #F0FDF4;
    color: #155724;
    border: 1px solid #BBF7D0;
}

.mm-panel-alert--error {
    background: #FEF2F2;
    color: #721c24;
    border: 1px solid #FECACA;
}

/* --- CARD BASE --- */
.mm-panel .mm-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.mm-panel .mm-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0;
    border-bottom: none;
}

.mm-panel .mm-card__title {
    font-size: 16px;
    font-weight: 700;
    color: #1E293B;
    margin: 0;
}

.mm-panel .mm-card__link {
    font-size: 14px;
    font-weight: 600;
    color: #EA580C;
    text-decoration: none;
}

.mm-panel .mm-card__link:hover {
    color: #C2410C;
}

/* --- STATUS BANNER --- */
.mm-status-banner {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    border-radius: 16px;
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #FFFFFF;
}

.mm-status-banner__left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mm-status-banner__badge {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #4ADE80;
}

.mm-status-banner__badge--warning {
    background: rgba(251, 191, 36, 0.2);
    border-color: rgba(251, 191, 36, 0.3);
    color: #FDE68A;
}

.mm-status-banner__badge--inactive {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
}

.mm-status-banner__dot {
    width: 10px;
    height: 10px;
    background: #22C55E;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.mm-status-banner__badge--warning .mm-status-banner__dot {
    background: #FBBF24;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
}

.mm-status-banner__badge--inactive .mm-status-banner__dot {
    background: #EF4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

.mm-status-banner__item {
    padding-left: 20px;
    border-left: 1px solid #334155;
}

.mm-status-banner__label {
    display: block;
    font-size: 13px;
    color: #94A3B8;
    margin-bottom: 2px;
}

.mm-status-banner__value {
    font-size: 16px;
    font-weight: 700;
}

.mm-status-banner__period {
    font-size: 13px;
    font-weight: 400;
    color: #94A3B8;
}

.mm-status-banner__link {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px 16px;
    color: #FFFFFF;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

.mm-status-banner__link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
}

.mm-status-banner__cta {
    background: #EA580C;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    color: #FFFFFF;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

.mm-status-banner__cta:hover {
    background: #C2410C;
    color: #FFFFFF;
}

/* --- PROFILE COMPLETENESS --- */
.mm-profile-completeness__percent {
    font-size: 24px;
    font-weight: 800;
    color: #EA580C;
}

.mm-panel-progress {
    background: #F1F5F9;
    border-radius: 6px;
    height: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.mm-panel-progress__bar {
    background: linear-gradient(90deg, #EA580C, #F97316);
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s ease;
}

.mm-profile-completeness__hint {
    font-size: 13px;
    color: #64748B;
    margin: 0 0 12px 0;
}

.mm-profile-completeness__list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mm-profile-completeness__item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748B;
}

.mm-profile-completeness__item--done {
    color: #16A34A;
}

.mm-profile-completeness__item--done .mm-profile-completeness__label {
    text-decoration: line-through;
}

/* --- QUICK ACTIONS --- */
.mm-quick-actions__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mm-quick-actions__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.mm-quick-actions__item:hover {
    background: #F1F5F9;
    border-color: #CBD5E1;
}

.mm-quick-actions__icon {
    font-size: 20px;
    flex-shrink: 0;
}

.mm-quick-actions__text {
    flex: 1;
}

.mm-quick-actions__label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1E293B;
}

.mm-quick-actions__desc {
    display: block;
    font-size: 12px;
    color: #64748B;
}

.mm-quick-actions__arrow {
    color: #94A3B8;
    font-size: 14px;
    flex-shrink: 0;
}

/* --- STATISTICS --- */
.mm-statistics__period {
    padding: 8px 12px;
    font-size: 13px;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    background: #FFFFFF;
    color: #475569;
    cursor: pointer;
}

.mm-statistics__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.mm-statistics__item {
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.mm-statistics__icon {
    display: block;
    font-size: 28px;
    margin-bottom: 8px;
}

.mm-statistics__value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 4px;
}

.mm-statistics__stat-label {
    display: block;
    font-size: 13px;
    color: #64748B;
}

/* --- TIP BOX --- */
.mm-tip {
    padding: 14px 16px;
    background: #FFF7ED;
    border: 1px solid #FDBA74;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mm-tip__icon {
    font-size: 18px;
    flex-shrink: 0;
}

.mm-tip__text {
    font-size: 13px;
    color: #9A3412;
}

/* --- PROFILE PREVIEW --- */
.mm-profile-preview__content {
    display: flex;
    gap: 24px;
}

.mm-profile-preview__avatar {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    background: linear-gradient(135deg, #E2E8F0, #CBD5E1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    flex-shrink: 0;
    border: 3px solid #E5E7EB;
    overflow: hidden;
}

.mm-profile-preview__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mm-profile-preview__info {
    flex: 1;
}

.mm-profile-preview__name {
    font-size: 20px;
    font-weight: 700;
    color: #0F172A;
    margin: 0 0 4px 0;
}

.mm-profile-preview__subtitle {
    font-size: 14px;
    color: #64748B;
    margin: 0 0 12px 0;
}

.mm-profile-preview__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.mm-profile-preview__meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #475569;
}

.mm-profile-preview__meta-item--status {
    font-weight: 500;
}

.mm-profile-preview__meta-item--active {
    color: #16A34A;
}

.mm-profile-preview__meta-item--inactive {
    color: #EF4444;
}

.mm-profile-preview__desc {
    padding: 12px 16px;
    background: #F8FAFC;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    font-size: 13px;
    color: #64748B;
}

.mm-profile-preview__desc em {
    font-style: italic;
}

.mm-profile-preview__desc a {
    color: #EA580C;
    text-decoration: none;
    font-weight: 600;
    font-style: normal;
}

.mm-profile-preview__desc a:hover {
    color: #C2410C;
}

/* --- CITIES LIST --- */
.mm-cities__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mm-cities__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
}

.mm-cities__info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mm-cities__name {
    font-size: 15px;
    font-weight: 600;
    color: #1E293B;
}

.mm-cities__status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
}

.mm-cities__status--active {
    background: #F0FDF4;
    color: #16A34A;
}

.mm-cities__status--inactive {
    background: #F1F5F9;
    color: #64748B;
}

.mm-cities__link {
    font-size: 14px;
    color: #EA580C;
    text-decoration: none;
    font-weight: 500;
}

.mm-cities__link:hover {
    color: #C2410C;
}

/* --- HELP SECTION --- */
.mm-panel .mm-help-section {
    background: linear-gradient(135deg, #1E40AF 0%, #1E3A8A 100%) !important;
    border-radius: 12px;
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #FFFFFF !important;
    border: none !important;
    box-shadow: none !important;
}

.mm-panel .mm-help-section h3,
.mm-panel .mm-help-section .mm-help-section__title {
    font-size: 16px !important;
    font-weight: 700 !important;
    margin: 0 0 4px 0 !important;
    color: #FFFFFF !important;
}

.mm-panel .mm-help-section p,
.mm-panel .mm-help-section .mm-help-section__text {
    font-size: 14px !important;
    color: #BFDBFE !important;
    margin: 0 !important;
}

.mm-help-section__actions {
    display: flex;
    gap: 12px;
}

.mm-panel .mm-help-section a.mm-help-section__btn {
    border-radius: 8px !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s;
}

.mm-panel .mm-help-section a.mm-help-section__btn--outline {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #FFFFFF !important;
}

.mm-panel .mm-help-section a.mm-help-section__btn--outline:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #FFFFFF !important;
}

.mm-panel .mm-help-section a.mm-help-section__btn--solid {
    background: #FFFFFF !important;
    border: none !important;
    color: #1E40AF !important;
}

.mm-panel .mm-help-section a.mm-help-section__btn--solid:hover {
    background: #F0F9FF !important;
    color: #1E40AF !important;
}

/* --- EMPTY STATE (no subscription) --- */
.mm-panel-empty {
    text-align: center;
    padding: 60px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.mm-panel-empty__icon {
    font-size: 56px;
    margin-bottom: 20px;
}

.mm-panel-empty__title {
    font-size: 28px;
    font-weight: 700;
    color: #0F172A;
    margin: 0 0 12px;
}

.mm-panel-empty__desc {
    font-size: 16px;
    color: #64748B;
    line-height: 1.6;
    margin: 0 0 36px;
}

.mm-panel-empty__features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
    margin-bottom: 36px;
}

.mm-panel-empty__feature {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    background: #F8FAFC;
    border-radius: 8px;
}

.mm-panel-empty__feature-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.mm-panel-empty__feature strong {
    display: block;
    font-size: 15px;
    color: #0F172A;
    margin-bottom: 2px;
}

.mm-panel-empty__feature span {
    font-size: 14px;
    color: #64748B;
}

.mm-panel-empty__price {
    margin: 20px 0 0;
    font-size: 15px;
    color: #64748B;
}

.mm-panel-empty__price strong {
    font-size: 20px;
    color: #0F172A;
}

/* --- PANEL BUTTONS --- */
.mm-panel .mm-panel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.mm-panel-btn--cta {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

.mm-panel-btn--cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
    color: #FFFFFF;
}

.mm-panel-btn--primary {
    background: #EA580C;
    color: #FFFFFF;
}

.mm-panel-btn--primary:hover {
    background: #C2410C;
    color: #FFFFFF;
}

.mm-panel-btn--outline {
    background: transparent;
    color: #1E293B;
    border: 1px solid #E5E7EB;
}

.mm-panel-btn--outline:hover {
    border-color: #EA580C;
    color: #EA580C;
}

.mm-panel-btn--ghost {
    background: transparent;
    color: #64748B;
}

.mm-panel-btn--ghost:hover {
    background: #F1F5F9;
    color: #1E293B;
}

/* --- PROFILE EDIT FORM --- */
.mm-panel-form {
    max-width: 600px;
}

.mm-panel-form .mm-card {
    margin-bottom: 20px;
}

.mm-panel-form .mm-card__body {
    padding-top: 0;
}

.mm-panel-field {
    margin-bottom: 20px;
}

.mm-panel-field:last-child {
    margin-bottom: 0;
}

.mm-panel-field label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.mm-panel-field__required {
    color: #DC2626;
}

.mm-panel-field__counter {
    font-weight: 400;
    color: #94A3B8;
    font-size: 13px;
}

.mm-panel-field input[type="text"],
.mm-panel-field input[type="tel"],
.mm-panel-field input[type="number"],
.mm-panel-field textarea,
.mm-panel-field select {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    border: 1px solid #DEE2E6;
    border-radius: 8px;
    background: #FFFFFF;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.mm-panel-field input:focus,
.mm-panel-field textarea:focus,
.mm-panel-field select:focus {
    outline: none;
    border-color: #EA580C;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

.mm-panel-field input::placeholder,
.mm-panel-field textarea::placeholder {
    color: #94A3B8;
}

.mm-panel-field__hint {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #64748B;
}

.mm-panel-field__hint--warn {
    color: #F59E0B;
}

.mm-panel-field__with-suffix {
    display: flex;
    align-items: center;
}

.mm-panel-field__with-suffix input {
    border-radius: 8px 0 0 8px;
}

.mm-panel-field__suffix {
    padding: 12px 14px;
    background: #F1F5F9;
    border: 1px solid #DEE2E6;
    border-left: none;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    color: #64748B;
}

.mm-panel-field-row {
    display: grid;
    grid-template-columns: 1fr 140px;
    gap: 16px;
}

/* Photo Upload */
.mm-panel-photo {
    display: flex;
    align-items: center;
    gap: 24px;
}

.mm-panel-photo__preview {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #E2E8F0, #CBD5E1);
    flex-shrink: 0;
    border: 3px dashed #CBD5E1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mm-panel-photo__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mm-panel-photo__placeholder {
    font-size: 32px;
    color: #94A3B8;
}

.mm-panel-photo__actions {
    flex: 1;
}

.mm-panel-photo input[type="file"] {
    display: none;
}

.mm-panel-photo__hint {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #64748B;
}

/* Form Actions */
.mm-panel-form-actions {
    display: flex;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid #E5E7EB;
    margin-top: 8px;
}

/* --- RESPONSIVE --- */
@media (max-width: 991px) {
    .mm-panel__row--2col {
        grid-template-columns: 1fr;
    }

    .mm-status-banner {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .mm-status-banner__left {
        flex-direction: column;
        gap: 16px;
    }

    .mm-status-banner__item {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid #334155;
        padding-top: 16px;
    }
}

@media (max-width: 767px) {
    .mm-panel__title {
        font-size: 24px;
    }

    .mm-statistics__grid {
        grid-template-columns: 1fr;
    }

    .mm-profile-preview__content {
        flex-direction: column;
        text-align: center;
    }

    .mm-profile-preview__avatar {
        margin: 0 auto;
    }

    .mm-profile-preview__meta {
        justify-content: center;
    }

    .mm-help-section {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .mm-panel-field-row {
        grid-template-columns: 1fr;
    }

    .mm-panel-photo {
        flex-direction: column;
        text-align: center;
    }

    .mm-panel-form-actions {
        flex-direction: column;
    }

    .mm-panel-form-actions .mm-panel-btn {
        width: 100%;
    }
}

/* --- ANIMATIONS --- */
@keyframes mmPanelFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mm-panel .mm-card,
.mm-status-banner,
.mm-help-section {
    animation: mmPanelFadeIn 0.3s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    .mm-panel .mm-card,
    .mm-status-banner,
    .mm-help-section {
        animation: none;
    }
}
