.ap-customer-dashboard {
    max-width: 1180px;
    padding-top: 40px;
}

.ap-customer-hero {
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 28%),
        linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: calc(var(--ap-radius) + 4px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding: 1.9rem 2rem;
}

.ap-customer-hero > div:first-child {
    min-width: 0;
}

.ap-customer-hero h1,
.ap-customer-hero h2,
.ap-customer-hero p,
.ap-customer-hero .ap-eyebrow {
    color: #f8fafc;
}

.ap-customer-hero p {
    color: #cbd5e1;
    margin-bottom: 1rem;
    font-size: 1.08rem;
    line-height: 1.7;
    max-width: 760px;
}

.ap-customer-hero-warranty {
    margin-top: 0.25rem;
}

.ap-warranty-pill {
    border: 1px solid transparent;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 0.7rem 1rem;
}

.ap-warranty-pill-active {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(134, 239, 172, 0.32);
    color: #bbf7d0;
}

.ap-warranty-pill-expired {
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(252, 165, 165, 0.3);
    color: #fecaca;
}

.ap-customer-hero .ap-eyebrow {
    color: #93c5fd;
}

.ap-customer-hero h1 {
    margin-bottom: 0.3rem;
}

.ap-customer-hero-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 0.85rem;
    justify-content: center;
}

.ap-customer-hero-actions .ap-button,
.ap-customer-hero-actions .ap-logout-button {
    justify-content: center;
    min-width: 260px;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease;
}

.ap-customer-hero-actions .ap-button svg,
.ap-customer-hero-actions .ap-logout-button svg {
    flex: 0 0 18px;
    height: 18px;
    width: 18px;
}

.ap-whatsapp-button {
    background: #16a34a;
    border-color: #16a34a;
    color: #ffffff !important;
}

.ap-whatsapp-button:hover {
    background: #15803d;
    border-color: #15803d;
    box-shadow: 0 10px 22px rgba(22, 163, 74, 0.28);
    color: #ffffff !important;
    transform: translateY(-1px);
}

.ap-customer-hero-actions .ap-logout-button:hover {
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.24);
    transform: translateY(-1px);
}

.ap-customer-hero-actions .ap-button:active,
.ap-customer-hero-actions .ap-logout-button:active {
    transform: translateY(0);
}

.ap-eyebrow {
    color: var(--ap-muted-foreground);
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}

.ap-profile-card {
    margin-bottom: 1.5rem;
}

.ap-profile-card h2 {
    margin-bottom: 0.35rem;
}

.ap-profile-grid,
.ap-info-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ap-profile-grid p,
.ap-info-grid p,
.ap-info-grid > div {
    background: var(--ap-muted);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    color: var(--ap-foreground);
    margin: 0;
    min-height: 72px;
    padding: 0.85rem;
}

.ap-profile-grid span,
.ap-info-grid span,
.ap-machine-card-head span {
    color: var(--ap-muted-foreground);
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.ap-info-wide {
    grid-column: span 2;
}

.ap-section-heading {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin: 1.5rem 0 1rem;
}

.ap-section-heading h2 {
    margin-bottom: 0;
}

.ap-section-heading span {
    color: var(--ap-muted-foreground);
    font-weight: 700;
}

.ap-machine-cards {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

.ap-machine-card {
    padding: 1.5rem;
}

.ap-machine-card-head {
    align-items: flex-start;
    border-bottom: 1px solid var(--ap-border);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
}

.ap-machine-card-head h3 {
    font-size: clamp(1.55rem, 2.2vw, 2.15rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.12;
    margin: 0;
}

.ap-machine-card-head h3 small {
    color: inherit;
    display: inline;
    font: inherit;
    letter-spacing: inherit;
    margin-left: 0;
}

.ap-machine-serial {
    color: var(--ap-muted-foreground);
    font-size: 1rem;
    font-weight: 650;
    margin: 0.65rem 0 0;
}

.ap-machine-serial strong {
    color: var(--ap-foreground);
}

.ap-machine-card-head .ap-status-pill {
    flex: 0 0 auto;
}

.ap-machine-card-head em {
    align-items: center;
    background: var(--ap-success-bg);
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    color: var(--ap-success);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.75rem;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.05em;
    min-height: 30px;
    padding: 0.3rem 0.75rem;
    text-transform: uppercase;
}

.ap-status-pill {
    align-items: center;
    background: var(--ap-success-bg);
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    color: var(--ap-success);
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    min-height: 30px;
    padding: 0.3rem 0.75rem;
    text-transform: uppercase;
}

.ap-status-pill.is-inactive {
    background: var(--ap-secondary);
    border-color: var(--ap-border);
    color: var(--ap-muted-foreground);
}

.ap-machine-split {
    align-items: stretch;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.35fr) minmax(420px, 1fr);
}

.ap-machine-info {
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ap-machine-detail-panel,
.ap-service-panel {
    padding: 1rem;
}

.ap-machine-detail-panel h3,
.ap-service-panel h3,
.ap-machine-detail-panel h4,
.ap-service-panel h4 {
    margin-bottom: 1rem;
}

.ap-service-list {
    display: grid;
    gap: 0.75rem;
}

.ap-service-item {
    background: var(--ap-muted);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    display: grid;
    gap: 0.45rem;
    padding: 1rem;
}

.ap-service-meta {
    align-items: center;
    display: flex;
    gap: 0.6rem;
    justify-content: space-between;
}

.ap-service-badge {
    background: #e8eef7;
    border: 1px solid var(--ap-border);
    border-radius: 999px;
    color: var(--ap-foreground);
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 0.28rem 0.55rem;
}

.ap-service-meta time {
    color: var(--ap-muted-foreground);
    font-size: 0.8rem;
    font-weight: 650;
    white-space: nowrap;
}

.ap-service-title-text {
    color: var(--ap-foreground);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.3;
}

.ap-service-upload {
    color: var(--ap-muted-foreground);
    font-size: 0.86rem;
    line-height: 1.4;
    margin: 0;
}

.ap-service-upload strong {
    color: var(--ap-foreground);
}

.ap-service-note-text {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--ap-muted-foreground);
    display: -webkit-box;
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0;
    overflow: hidden;
}

.ap-service-attachment {
    align-items: center;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    color: #c2410c;
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 700;
    justify-self: start;
    padding: 0.38rem 0.7rem;
    text-decoration: none;
}

.ap-service-attachment:hover {
    background: #ffedd5;
    border-color: #fdba74;
    color: #9a3412;
}

.ap-machine-card .ap-button {
    margin-top: 1rem;
}

.ap-empty {
    background: var(--ap-muted);
    border: 1px dashed var(--ap-border);
    border-radius: var(--ap-radius-sm);
    color: var(--ap-muted-foreground);
    padding: 1rem;
}

@media (max-width: 1100px) {
    .ap-customer-dashboard {
        padding-top: 32px;
    }

    .ap-machine-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .ap-customer-dashboard {
        padding-top: 24px;
    }

    .ap-card,
    .ap-login-card,
    .ap-profile-card,
    .ap-machine-card,
    .ap-customer-hero {
        padding: 1rem;
    }

    .ap-customer-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .ap-customer-hero-actions {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .ap-customer-hero-actions .ap-button,
    .ap-customer-hero-actions .ap-logout-button {
        min-width: 0;
    }

    .ap-profile-grid,
    .ap-info-grid {
        grid-template-columns: 1fr;
    }

    .ap-info-wide {
        grid-column: auto;
    }

    .ap-section-heading,
    .ap-machine-card-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .ap-machine-card-head h3 {
        font-size: 1.8rem;
    }
}
