/*
 * De ce exista:
 * Acest fisier tine componentele comune reutilizabile ale frontendului V2.
 *
 * Responsabilitate:
 * Stilizeaza topbar-ul, chip-urile, placeholder-ele, loading-ul si toast-ul
 * pentru toate ecranele din Lot 1.
 *
 * Ce NU face:
 * Nu contine layout dedicat pentru un ecran specific.
 *
 * Depinde de:
 * base.css si partial-ele Blade partajate.
 */

.v2-brand-card {
    padding: 14px 16px;
    border-radius: var(--z-radius-lg);
    display: flex;
    align-items: center;
    gap: 12px;
}

.v2-brand-card img,
.v2-topbar img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.v2-brand-copy,
.v2-topbar-copy {
    display: grid;
    gap: 3px;
}

.v2-brand-copy strong,
.v2-topbar strong {
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.v2-brand-copy span,
.v2-topbar small,
.v2-muted {
    color: var(--z-soft);
}

.v2-topbar-copy small {
    font-size: 0.76rem;
    line-height: 1.28;
}

.v2-topbar-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.v2-screen-head {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
}

.v2-label {
    display: inline-flex;
    width: fit-content;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.08);
    color: var(--z-green);
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.v2-title {
    margin: 0;
    font-size: clamp(1.34rem, 4.8vw, 1.56rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.v2-copy {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.48;
    color: #4b5563;
}

.v2-helper-card,
.v2-placeholder-card,
.v2-profile-card,
.v2-mode-card,
.v2-action-card,
.v2-next-step-card,
.v2-step-card,
.v2-detail-card,
.v2-offer-card,
.v2-filter-card,
.v2-screen-card,
.v2-shell-card {
    border-radius: var(--z-radius-lg);
    border: 1px solid rgba(229, 231, 235, 0.95);
    background: rgba(255, 255, 255, 0.98);
    padding: 16px;
    box-shadow: var(--z-shadow-soft);
    position: relative;
    overflow: hidden;
}

.v2-helper-card {
    display: grid;
    gap: 8px;
}

.v2-helper-card strong {
    font-size: 0.95rem;
}

.v2-helper-card code {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.1);
    color: var(--z-green);
    font-size: 0.88rem;
    width: fit-content;
}

.v2-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(229, 231, 235, 0.95);
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.045);
}

.v2-topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 auto;
}

.v2-mode-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.1);
    color: var(--z-green);
    font-size: 0.73rem;
    font-weight: 800;
}

.v2-shell-notification-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(209, 213, 219, 0.95);
    border-radius: 16px;
    background: rgba(249, 250, 251, 0.98);
    color: #111827;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
}

.v2-shell-notification-button:focus-visible {
    outline: 3px solid rgba(22, 163, 74, 0.22);
    outline-offset: 2px;
}

.v2-shell-notification-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.v2-shell-notification-icon svg {
    width: 18px;
    height: 18px;
}

.v2-shell-notification-label {
    font-size: 0.9rem;
    white-space: nowrap;
}

.v2-shell-notification-count {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--z-green);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
}

.v2-mobile-mode-toolbar {
    display: none;
}

.v2-mobile-notification-button {
    position: relative;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(22, 163, 74, 0.22);
    border-radius: 999px;
    background: rgba(240, 253, 244, 0.98);
    color: var(--z-green);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(22, 163, 74, 0.12);
    cursor: pointer;
    flex-shrink: 0;
}

.v2-mobile-notification-button:focus-visible {
    outline: 3px solid rgba(22, 163, 74, 0.22);
    outline-offset: 2px;
}

.v2-mobile-notification-button .v2-shell-notification-icon,
.v2-mobile-notification-button .v2-shell-notification-icon svg {
    width: 18px;
    height: 18px;
}

.v2-mobile-notification-count {
    position: absolute;
    right: -4px;
    top: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--z-green);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.98);
}

@media (max-width: 767px) {
    .v2-mobile-mode-toolbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 4px;
    }

    .v2-topbar {
        border-radius: 18px;
    }

    .v2-topbar img {
        width: 28px;
        height: 28px;
    }

    .v2-topbar-copy {
        min-width: 0;
        gap: 2px;
    }

    .v2-topbar strong {
        font-size: 0.84rem;
    }

    .v2-topbar-copy small {
        display: none;
    }

    .v2-topbar-meta {
        gap: 4px;
    }

    .v2-mode-pill {
        min-height: 22px;
        padding-inline: 8px;
        font-size: 0.68rem;
    }

    .v2-shell-notification-button {
        min-width: 42px;
        min-height: 42px;
        padding-inline: 11px;
        justify-content: center;
        gap: 0;
        border-radius: 14px;
    }

    .v2-shell-notification-label {
        display: none;
    }

    .v2-shell-notification-count {
        position: absolute;
        right: -4px;
        top: -4px;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        font-size: 0.68rem;
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.98);
    }
}

@media (max-width: 420px) {
    .v2-topbar {
        padding: 9px 10px;
    }

    .v2-topbar strong {
        font-size: 0.8rem;
    }

    .v2-mode-pill {
        font-size: 0.64rem;
    }

    .v2-shell-notification-button {
        min-width: 40px;
        min-height: 40px;
        padding-inline: 10px;
    }
}

.v2-mode-card {
    text-align: left;
    display: grid;
    gap: 10px;
    cursor: pointer;
}

.v2-mode-card.is-active {
    border-color: rgba(22, 163, 74, 0.6);
    box-shadow: 0 18px 38px rgba(22, 163, 74, 0.14);
}

.v2-mode-card h3,
.v2-placeholder-card h3,
.v2-profile-card h3 {
    margin: 0;
    font-size: 1.02rem;
}

.v2-mode-card p,
.v2-placeholder-card p,
.v2-profile-card p {
    margin: 0;
    color: #4b5563;
    line-height: 1.55;
}

.v2-kv {
    display: grid;
    gap: 12px;
}

.v2-kv-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(209, 213, 219, 0.55);
}

.v2-kv-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.v2-kv-row strong {
    font-size: 0.88rem;
}

.v2-kv-row span {
    color: #4b5563;
    text-align: right;
}

.v2-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.v2-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(229, 231, 235, 0.95);
    background: rgba(249, 250, 251, 0.96);
    color: #374151;
    font-size: 0.8rem;
    font-weight: 700;
}

.v2-nav-item {
    display: grid;
    justify-items: center;
    gap: 4px;
    border: none;
    border-radius: 16px;
    background: transparent;
    color: #6b7280;
    padding: 7px 4px 6px;
    min-height: 54px;
    font-size: 0.68rem;
    font-weight: 700;
    transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.v2-nav-item.is-active {
    background: rgba(22, 163, 74, 0.09);
    color: var(--z-green);
    box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.07);
}

.v2-nav-item:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

.v2-nav-item span {
    line-height: 1.1;
}

.v2-nav-icon {
    width: 20px;
    height: 20px;
}

.v2-loading {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 28px 16px;
    min-height: 140px;
}

.v2-loading-card {
    border-radius: var(--z-radius-lg);
    border: 1px solid rgba(229, 231, 235, 0.95);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--z-shadow-soft);
}

.v2-loading-card .v2-screen-head {
    justify-items: center;
    text-align: center;
    margin-bottom: 0;
}

.v2-spinner {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 4px solid rgba(22, 163, 74, 0.16);
    border-top-color: var(--z-green);
    animation: z-spin 880ms linear infinite;
}

.v2-toast {
    position: fixed;
    left: 50%;
    top: 10px;
    transform: translateX(-50%);
    width: min(calc(100% - 24px), 460px);
    padding: 12px 14px;
    border-radius: 18px;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.92);
    box-shadow: var(--z-shadow);
    z-index: 40;
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    backdrop-filter: blur(14px);
}

.v2-toast.is-danger {
    background: rgba(220, 38, 38, 0.94);
}

.v2-toast.is-success {
    background: rgba(21, 128, 61, 0.94);
}

.v2-toast-accent {
    width: 8px;
    align-self: stretch;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
}

.v2-toast-copy {
    display: grid;
    gap: 2px;
}

.v2-toast-title {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.v2-toast-message {
    font-size: 0.92rem;
    line-height: 1.45;
}

.v2-action-grid {
    display: grid;
    gap: 12px;
}

.v2-results-grid {
    display: grid;
    gap: 12px;
}

.v2-action-card,
.v2-next-step-card,
.v2-step-card {
    display: grid;
    gap: 10px;
}

.v2-action-card.is-primary,
.v2-next-step-card.is-primary {
    border-color: rgba(22, 163, 74, 0.2);
    box-shadow: 0 10px 24px rgba(22, 163, 74, 0.06);
}

.v2-action-card h3,
.v2-next-step-card h3,
.v2-step-card h3 {
    margin: 0;
    font-size: 1.02rem;
}

.v2-action-card p,
.v2-next-step-card p,
.v2-step-card p {
    margin: 0;
    color: #4b5563;
    line-height: 1.55;
}

.v2-offer-card,
.v2-detail-card {
    display: grid;
    gap: 12px;
}

.v2-offer-card .v2-screen-head {
    margin-bottom: 0;
}

.v2-offer-card-head {
    display: grid;
    gap: 10px;
}

.v2-offer-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.v2-offer-card-title {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.28;
    letter-spacing: -0.03em;
}

.v2-offer-card h3,
.v2-detail-card h3 {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.3;
}

.v2-offer-line {
    margin: 0;
    color: #4b5563;
    font-size: 0.92rem;
    line-height: 1.52;
}

.v2-offer-card-facts {
    display: grid;
    gap: 10px;
}

.v2-offer-card-fact {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid rgba(229, 231, 235, 0.96);
    background: rgba(249, 250, 251, 0.98);
}

.v2-offer-card-icon,
.v2-offer-card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    flex-shrink: 0;
}

.v2-offer-card-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.14), rgba(245, 158, 11, 0.14));
    color: var(--z-green);
    font-size: 0.88rem;
    font-weight: 800;
}

.v2-offer-card-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.v2-offer-card-copy strong {
    font-size: 0.9rem;
    line-height: 1.28;
}

.v2-offer-card-copy span {
    color: #6b7280;
    font-size: 0.8rem;
    line-height: 1.4;
}

.v2-offer-card-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.v2-offer-card-stat {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(229, 231, 235, 0.96);
    background: rgba(255, 255, 255, 0.98);
    color: #374151;
    font-size: 0.8rem;
    font-weight: 700;
}

.v2-offer-card-rating {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(254, 243, 199, 0.72);
    color: #92400e;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.v2-offer-card-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.v2-job-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.v2-job-card-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.v2-job-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.v2-job-card-next-step {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(229, 231, 235, 0.95);
    background: rgba(249, 250, 251, 0.98);
}

.v2-job-card-next-step strong {
    font-size: 0.88rem;
    line-height: 1.3;
}

.v2-job-card-next-step p {
    margin: 0;
    color: #4b5563;
    font-size: 0.84rem;
    line-height: 1.45;
}

.v2-job-card-next-step.is-success {
    background: rgba(220, 252, 231, 0.64);
    border-color: rgba(22, 163, 74, 0.22);
}

.v2-job-card-next-step.is-warning {
    background: rgba(254, 243, 199, 0.68);
    border-color: rgba(245, 158, 11, 0.28);
}

.v2-job-card-next-step.is-muted {
    background: rgba(243, 244, 246, 0.96);
}

.v2-offer-meta,
.v2-offer-price,
.v2-detail-grid,
.v2-history-list {
    display: grid;
    gap: 10px;
}

.v2-detail-grid {
    gap: 12px;
}

.v2-results-head {
    display: grid;
    gap: 6px;
}

.v2-action-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.v2-step-indicator {
    display: grid;
    gap: 10px;
}

.v2-step-indicator-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.v2-step-pill {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid rgba(209, 213, 219, 0.78);
    background: rgba(255, 255, 255, 0.92);
}

.v2-step-pill.is-active {
    border-color: rgba(22, 163, 74, 0.36);
    background: rgba(22, 163, 74, 0.08);
}

.v2-step-pill strong {
    font-size: 0.86rem;
}

.v2-step-pill span {
    color: #4b5563;
    font-size: 0.82rem;
    line-height: 1.45;
}

.v2-status-callout {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(229, 231, 235, 0.95);
    background: rgba(249, 250, 251, 0.96);
}

.v2-status-callout strong {
    font-size: 0.92rem;
}

.v2-status-callout p {
    margin: 0;
    color: #374151;
    line-height: 1.52;
    font-size: 0.9rem;
}

.v2-status-callout.is-warning {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(254, 243, 199, 0.62);
}

.v2-status-callout.is-success {
    border-color: rgba(22, 163, 74, 0.34);
    background: rgba(220, 252, 231, 0.72);
}

.v2-status-callout.is-muted {
    background: rgba(243, 244, 246, 0.96);
}

.v2-inline-link {
    border: none;
    background: transparent;
    padding: 0;
    color: var(--z-green);
    font: inherit;
    font-weight: 700;
}

.v2-section-stack {
    display: grid;
    gap: 14px;
}

.v2-avatar,
.v2-profile-avatar {
    border-radius: 999px;
    object-fit: cover;
    overflow: hidden;
    background: #eef2f7;
}

.v2-avatar.is-sm {
    width: 32px;
    height: 32px;
}

.v2-avatar.is-md {
    width: 44px;
    height: 44px;
}

.v2-avatar.is-lg,
.v2-profile-avatar {
    width: 72px;
    height: 72px;
}

.v2-avatar-fallback,
.v2-profile-avatar.is-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.12);
    color: var(--z-green);
    font-weight: 800;
}

.v2-service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(22, 163, 74, 0.08);
    color: var(--z-green);
}

.v2-service-icon img,
.v2-service-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.v2-service-icon.is-category {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.12), rgba(245, 158, 11, 0.12));
}

.v2-service-icon.is-fallback {
    padding: 5px;
}

.v2-service-icon.is-category-sm,
.v2-service-icon.is-service-lg {
    width: 32px;
    height: 32px;
}

.v2-service-icon.is-category-md {
    width: 40px;
    height: 40px;
}

.v2-service-icon.is-service-md {
    width: 24px;
    height: 24px;
}

.v2-service-icon.is-service-sm {
    width: 20px;
    height: 20px;
}

.v2-service-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.v2-service-line--stacked {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

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

.v2-category-card {
    display: grid;
    gap: 8px;
    padding: 14px;
    text-align: left;
    cursor: pointer;
    border-radius: var(--z-radius-lg);
    border: 1px solid rgba(229, 231, 235, 0.95);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.04);
}

.v2-category-card strong {
    font-size: 0.92rem;
    line-height: 1.25;
}

.v2-category-card p {
    margin: 0;
    color: #4b5563;
    line-height: 1.45;
    font-size: 0.84rem;
}

.v2-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(229, 231, 235, 0.95);
    background: rgba(249, 250, 251, 0.96);
    color: #374151;
    font-size: 0.78rem;
    font-weight: 700;
}

.v2-status-badge.is-success {
    background: rgba(220, 252, 231, 0.78);
    border-color: rgba(22, 163, 74, 0.22);
    color: #166534;
}

.v2-status-badge.is-warning {
    background: rgba(254, 243, 199, 0.76);
    border-color: rgba(245, 158, 11, 0.24);
    color: #92400e;
}

.v2-status-badge.is-muted {
    background: rgba(243, 244, 246, 0.96);
    color: #4b5563;
}

.v2-empty-state-card {
    display: grid;
    justify-items: start;
    gap: 14px;
    background: linear-gradient(180deg, rgba(249, 250, 251, 0.98), rgba(255, 255, 255, 0.98));
}

.v2-empty-state-card .v2-screen-head {
    margin-bottom: 0;
}

.v2-empty-state-icon {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.12), rgba(245, 158, 11, 0.14));
    position: relative;
}

.v2-empty-state-icon::before,
.v2-empty-state-icon::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    background: rgba(17, 24, 39, 0.24);
    border-radius: 999px;
    transform: translate(-50%, -50%);
}

.v2-empty-state-icon::before {
    width: 18px;
    height: 3px;
}

.v2-empty-state-icon::after {
    width: 3px;
    height: 18px;
}

@media (min-width: 768px) {
    .v2-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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