* {
    box-sizing: border-box;
}

:root {
    --laytik-bg: #f4f7fc;
    --laytik-primary: #8cc9ff; /* azul bebê principal */
    --laytik-primary-dark: #0b63b5;
    --laytik-primary-soft: #e3f2ff;
    --laytik-text-main: #1f2933;
    --laytik-text-muted: #6b7280;
    --laytik-border: #d2d8e6;
    --laytik-radius-card: 14px;
    --laytik-radius-pill: 999px;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: var(--laytik-bg);
    color: var(--laytik-text-main);
    /* Prevenir zoom indesejado em iOS */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* Melhorar renderização de fontes em mobile */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* HEADER / NAV */

header {
    background: linear-gradient(90deg, #d9ecff, #f3f7ff);
    padding: 10px 15px 8px;
    border-bottom: 1px solid #d9e2ef;
    position: sticky;
    top: 0;
    z-index: 1000;
    /* Melhorar performance de scroll em mobile */
    will-change: transform;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--laytik-primary-dark);
    /* Por padrão, alinha à esquerda */
    justify-content: flex-start;
    flex: 1;
}

/* Quando há logo, centralizar o brand */
.brand.has-logo {
    justify-content: center;
}

/* Link da logo */
.brand-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
}

.brand-badge {
    width: 24px;
    height: 24px;
    border-radius: 10px;
    background: radial-gradient(circle at 30% 30%, #ffffff, #8cc9ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #0b63b5;
}

/* Logo do site */
.site-logo {
    max-height: 50px;
    max-width: 200px;
    height: auto;
    width: auto;
    object-fit: contain;
    /* Aplicar fundo transparente */
    background: transparent;
    display: block;
    /* Remover qualquer borda padrão */
    border: none;
    padding: 0;
}

/* Imagens responsivas */
img {
    max-width: 100%;
    height: auto;
}

header nav {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

header nav a {
    text-decoration: none;
    color: var(--laytik-primary-dark);
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 999px;
    background-color: #ffffffcc;
    /* Tamanho mínimo de toque para mobile */
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    /* Melhorar área de toque */
    -webkit-tap-highlight-color: rgba(11, 99, 181, 0.1);
    gap: 6px;
}

header nav a svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

header nav a:hover,
header nav a:active {
    background-color: #ffffff;
}

/* Botão Menu Mobile Hambúrguer */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    gap: 6px;
    margin-right: 8px;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--laytik-primary-dark);
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Navegação Mobile */
.main-nav {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Prevenir scroll quando menu está aberto */
body.nav-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Menu Mobile - Comportamento em telas pequenas */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        max-width: 85vw;
        height: 100vh;
        height: 100dvh;
        background: #ffffff;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
        transform: translateX(-100%);
        opacity: 0;
        pointer-events: none;
        z-index: 10000;
        overflow-y: auto;
        padding: 80px 16px 20px;
        flex-direction: column;
        gap: 8px;
        -webkit-overflow-scrolling: touch;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    
    .main-nav.nav-open {
        transform: translateX(0);
        opacity: 1;
        pointer-events: all;
    }
    
    .main-nav a {
        width: 100%;
        padding: 14px 16px;
        border-radius: 12px;
        font-size: 1rem;
        justify-content: flex-start;
        background: rgba(255, 255, 255, 0.8);
        border: 1px solid #e5e7eb;
        transition: all 0.2s ease;
    }
    
    .main-nav a:active {
        background: var(--laytik-primary-soft);
        transform: scale(0.98);
    }
    
    .main-nav a svg {
        width: 20px;
        height: 20px;
        margin-right: 12px;
    }
    
    /* Overlay escuro quando menu está aberto */
    body.nav-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        height: 100dvh;
        background: rgba(0, 0, 0, 0.1);
        z-index: 9999;
        animation: fadeIn 0.3s ease;
        pointer-events: none;
    }
    
    @keyframes fadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }
    
    /* Ajustar header controls em mobile */
    .header-controls {
        order: 3;
        width: 100%;
        margin-top: 8px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        align-items: start;
    }
    
    .header-controls form {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .header-controls label {
        font-size: 0.75rem;
        font-weight: 500;
        color: var(--laytik-text-muted);
    }
    
    .header-controls select {
        width: 100%;
        font-size: 0.9rem;
        padding: 10px 12px;
        min-height: 44px;
    }
    
    .header-user-greeting {
        grid-column: 1 / -1;
        width: 100%;
        margin: 0 0 8px 0;
        font-size: 0.9rem;
        text-align: left;
    }
    
    .header-logout-btn {
        grid-column: 1 / -1;
        width: 100%;
        margin: 0;
        justify-content: center;
    }
    
    /* Brand com menu hambúrguer */
    .brand {
        flex: 0 0 auto;
        min-width: 0;
    }
    
    .brand.has-logo {
        justify-content: flex-start;
    }
    
    .brand-logo-link {
        margin-left: 8px;
    }
}

/* Desktop: esconder menu hambúrguer e manter nav normal */
@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .main-nav {
        position: static;
        transform: none;
        opacity: 1;
        pointer-events: all;
        width: auto;
        height: auto;
        padding: 0;
        box-shadow: none;
        background: transparent;
        flex-direction: row;
    }
    
    body.nav-open::before {
        display: none;
    }
}

/* LANGUAGE / CURRENCY SELECTORS */

.header-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.header-controls form {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.header-controls label {
    font-size: 0.75rem;
    color: var(--laytik-text-muted);
}

.header-controls select {
    border-radius: 14px;
    border: 1px solid #cbd2e3;
    padding: 8px 12px;
    font-size: 0.9rem;
    background-color: #ffffff;
    /* Tamanho mínimo de toque */
    min-height: 44px;
    /* Melhorar aparência em mobile */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-controls select:focus {
    border-color: var(--laytik-primary-dark);
    outline: none;
    box-shadow: 0 0 0 2px rgba(11, 99, 181, 0.1);
}

.header-user-greeting {
    margin-right: 10px;
}

.header-logout-btn {
    margin-left: 10px;
}

/* LAYOUT */

main {
    padding: 10px 15px 16px;
    /* Prevenir overflow horizontal */
    overflow-x: hidden;
}

.container {
    max-width: 1024px;
    margin: 0 auto;
    width: 100%;
    padding: 0 4px;
}

/* CARDS E BLOCOS */

.card {
    background-color: #fff;
    border-radius: var(--laytik-radius-card);
    padding: 16px 18px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
    margin-bottom: 16px;
    transition: box-shadow 0.2s ease;
    /* Prevenir overflow */
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.admin-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 4px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 16px 0;
}

.page-header h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--laytik-text-main);
    letter-spacing: -0.02em;
}

.page-header .actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(90deg, var(--laytik-primary), var(--laytik-primary-dark));
    color: #fff;
    padding: 12px 18px;
    border-radius: var(--laytik-radius-pill);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    transition: all 0.2s ease;
    cursor: pointer;
    /* Tamanho mínimo de toque */
    min-height: 44px;
    min-width: 44px;
    /* Melhorar área de toque */
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2);
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    white-space: nowrap;
    position: relative;
}

/* Ícones para botões - sempre presentes */
.pill-btn .btn-icon-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* Texto do botão - sempre visível no desktop */
.pill-btn .btn-text-content {
    display: inline;
}

@media (max-width: 768px) {
    /* No mobile: mostrar apenas o ícone, esconder o texto */
    .pill-btn.has-long-text .btn-text-content {
        display: none !important;
    }
    
    /* Garantir que o ícone apareça centralizado no mobile */
    .pill-btn.has-long-text {
        gap: 0;
        padding: 12px;
        min-width: 48px;
        justify-content: center;
    }
}

/* Desktop: mostrar ícone + texto */
@media (min-width: 769px) {
    .pill-btn.has-long-text {
        gap: 8px;
    }
}

.pill-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(11, 99, 181, 0.25);
}

.pill-btn.secondary {
    background: #fff;
    color: var(--laytik-primary-dark);
    border: 1.5px solid var(--laytik-border);
}

.pill-btn.secondary:hover {
    background: var(--laytik-primary-soft);
    border-color: var(--laytik-primary);
    box-shadow: 0 2px 8px rgba(11, 99, 181, 0.15);
}

.pill-btn.danger {
    background: linear-gradient(90deg, #f87171, #c53030);
    color: #fff;
    border: none;
}

.pill-btn.danger:hover {
    box-shadow: 0 4px 12px rgba(197, 48, 48, 0.25);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.kpi {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border-left: 4px solid var(--laytik-primary);
}

.kpi h2 {
    margin: 8px 0 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--laytik-primary-dark);
    letter-spacing: -0.02em;
}

.kpi .label {
    color: var(--laytik-text-muted);
    margin: 0;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.progress {
    width: 100%;
    height: 10px;
    border-radius: 10px;
    background: #eef2ff;
    overflow: hidden;
}

.progress .progress-bar {
    height: 100%;
    background: var(--laytik-primary-dark);
}

/* Container para tabelas responsivas */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* scrollbar-width não suportado no Safari */
    -ms-overflow-style: -ms-autohiding-scrollbar;
}

.table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: var(--laytik-primary);
    border-radius: 4px;
}

.table-wrapper {
    scrollbar-width: thin;
    scrollbar-color: var(--laytik-primary) #f1f1f1;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    min-width: 600px; /* Largura mínima para manter legibilidade */
}

.table th {
    padding: 12px 14px;
    border-bottom: 2px solid var(--laytik-border);
    text-align: left;
    font-weight: 600;
    color: var(--laytik-text-main);
    background-color: #f8fbff;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.table td {
    padding: 12px 14px;
    border-bottom: 1px solid #eef2f7;
    text-align: left;
    word-wrap: break-word;
}

.table tbody tr {
    transition: background-color 0.15s ease;
}

.table tbody tr:hover {
    background-color: #f8fbff;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.grid-two {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}

.grid-two .full {
    grid-column: 1 / -1;
}

.list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
}

.muted {
    color: var(--laytik-text-muted);
}

.link {
    background: none;
    border: none;
    color: var(--laytik-primary-dark);
    cursor: pointer;
    text-decoration: underline;
}

.link.danger {
    color: #c04343;
}

/* FORMULÁRIOS */

form label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="tel"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--laytik-border);
    font-size: 16px; /* Prevenir zoom automático no iOS */
    outline: none;
    background-color: #fff;
    /* Tamanho mínimo de toque */
    min-height: 44px;
    box-sizing: border-box;
    /* Melhorar renderização em mobile */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: all 0.2s ease;
}

/* Evitar zoom em iOS para inputs menores que 16px */
@media screen and (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="number"],
    input[type="password"],
    input[type="tel"],
    input[type="url"],
    select,
    textarea {
        font-size: 16px;
    }
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--laytik-primary-dark);
    box-shadow: 0 0 0 1px #c4defd;
}

button {
    padding: 12px 18px;
    border-radius: var(--laytik-radius-pill);
    border: none;
    background: linear-gradient(90deg, var(--laytik-primary), var(--laytik-primary-dark));
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    /* Tamanho mínimo de toque */
    min-height: 44px;
    min-width: 44px;
    /* Melhorar área de toque */
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2);
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    transition: all 0.2s ease;
}

button:hover {
    filter: brightness(1.03);
}

button:disabled {
    opacity: 0.6;
    cursor: default;
}

/* GRID PRODUTOS */

.product-type-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.product-type-card {
    flex: 1 1 100%;
}

@media (min-width: 640px) {
    .product-type-card {
        flex: 1 1 calc(50% - 10px);
    }
}

@media (min-width: 1024px) {
    .product-type-card {
        flex: 1 1 calc(33.33% - 10px);
    }
}

/* RESUMO DE PREÇO */

.price-summary {
    background-color: #fff;
    border-radius: var(--laytik-radius-card);
    padding: 10px 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.07);
    margin-top: 10px;
    font-size: 0.9rem;
}

/* STEPPER (passos do pedido) */

.stepper {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    padding: 6px 2px 8px;
    margin-bottom: 8px;
}

.step-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--laytik-radius-pill);
    border: 1px solid #d0d8ec;
    font-size: 0.8rem;
    color: var(--laytik-text-muted);
    background-color: #ffffffcc;
    white-space: nowrap;
}

.step-pill span.step-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    font-size: 0.7rem;
    background-color: #e5efff;
    color: var(--laytik-primary-dark);
}

.step-pill.active {
    border-color: var(--laytik-primary-dark);
    background: linear-gradient(90deg, #f0f6ff, #ffffff);
    color: var(--laytik-primary-dark);
}

.step-pill.active span.step-index {
    background-color: var(--laytik-primary-dark);
    color: #fff;
}

.step-pill.done {
    border-color: var(--laytik-primary);
    background-color: #e2f4ff;
    color: var(--laytik-primary-dark);
}

/* TIMELINE (já usada em rastreio/admin) */

.timeline {
    position: relative;
    margin: 10px 0;
    padding-left: 18px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #d0d7e5;
}

.timeline-item {
    position: relative;
    margin-bottom: 12px;
}

.timeline-dot {
    position: absolute;
    left: -2px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #c0c7d5;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #d0d7e5;
}

.timeline-dot.reached {
    background-color: var(--laytik-primary-dark);
}

.timeline-dot.current {
    background-color: #17b06b;
    box-shadow: 0 0 0 2px #b6ebcf;
}

.timeline-content {
    margin-left: 18px;
    background-color: #fff;
    border-radius: 10px;
    padding: 8px 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* FOOTER */

footer {
    border-top: 1px solid #d9e2ef;
    background-color: #f8fbff;
    padding: 12px 15px;
    font-size: 0.8rem;
    color: var(--laytik-text-muted);
    text-align: center;
    margin-top: 20px;
}

@media (max-width: 768px) {
    footer {
        padding: 10px 12px;
        font-size: 0.75rem;
    }
}

/* ADMIN SPECIFIC STYLES */

.card-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 16px;
    margin-top: 0;
    color: var(--laytik-text-main);
    padding-bottom: 12px;
    border-bottom: 2px solid #eef2f7;
}

/* Melhorias de espaçamento e legibilidade */
.admin-page .card {
    margin-bottom: 20px;
}

.admin-page input[type="text"],
.admin-page input[type="email"],
.admin-page input[type="number"],
.admin-page input[type="password"],
.admin-page select,
.admin-page textarea {
    transition: all 0.2s ease;
}

.admin-page input:focus,
.admin-page select:focus,
.admin-page textarea:focus {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(11, 99, 181, 0.15);
}

/* Status badges melhorados */
.status-badge {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
    background: #e3f0ff;
    color: #0b63b5;
}

/* ============================================
   RESPONSIVIDADE MOBILE-FIRST
   ============================================ */

/* Mobile Small (até 480px) */
@media (max-width: 480px) {
    header {
        padding: 8px 12px 6px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .brand {
        font-size: 0.95rem;
    }
    
    .site-logo {
        max-height: 40px;
        max-width: 150px;
    }
    
    .header-controls {
        width: 100%;
        margin-top: 8px;
        justify-content: flex-start;
    }
    
    .header-controls form {
        flex: 1;
        min-width: 0;
    }
    
    .header-controls select {
        width: 100%;
        font-size: 0.85rem;
    }
    
    .header-user-greeting {
        width: 100%;
        margin-right: 0;
        margin-bottom: 4px;
        font-size: 0.85rem;
    }
    
    .header-logout-btn {
        width: 100%;
        margin-left: 0;
        margin-top: 4px;
        justify-content: center;
    }
    
    header nav {
        margin-top: 8px;
        gap: 4px;
    }
    
    header nav a {
        font-size: 0.85rem;
        padding: 6px 10px;
        flex: 1;
        min-width: 0;
        text-align: center;
    }
    
    header nav a svg {
        width: 16px;
        height: 16px;
    }
    
    main {
        padding: 8px 12px 12px;
    }
    
    .container {
        padding: 0;
    }
    
    .card {
        padding: 12px 14px;
        margin-bottom: 12px;
        border-radius: 12px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 0;
        margin-bottom: 16px;
    }
    
    .page-header h1 {
        font-size: 1.4rem;
        width: 100%;
    }
    
    .page-header .actions {
        width: 100%;
    }
    
    .page-header .actions .pill-btn {
        flex: 1;
        min-width: 0;
    }
    
    .pill-btn {
        font-size: 0.85rem;
        padding: 10px 16px;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .grid-two {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .kpi h2 {
        font-size: 1.5rem;
    }
    
    .table-wrapper {
        margin: 0 -12px;
        padding: 0 12px;
    }
    
    .table {
        font-size: 0.8rem;
        min-width: 500px;
    }
    
    .table th,
    .table td {
        padding: 8px 10px;
    }
    
    form label {
        font-size: 0.85rem;
    }
    
    .stepper {
        margin: 0 -12px;
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .step-pill {
        font-size: 0.75rem;
        padding: 6px 10px;
        min-width: 100px;
    }
    
    .product-type-card {
        margin-bottom: 12px;
    }
    
    .price-summary {
        font-size: 0.85rem;
        padding: 12px;
    }
}

/* Mobile Medium (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    header {
        padding: 10px 14px 8px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .header-controls {
        flex-wrap: wrap;
    }
    
    .header-controls form {
        flex: 0 0 auto;
    }
    
    header nav a {
        font-size: 0.88rem;
    }
    
    .page-header h1 {
        font-size: 1.6rem;
    }
    
    .card-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 14px;
    }
    
    .grid-two {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .table {
        font-size: 0.88rem;
    }
}

/* Tablet e Desktop (769px+) */
@media (min-width: 769px) {
    .header-controls {
        flex-wrap: nowrap;
    }
    
    header nav a:hover {
        transform: translateY(-1px);
    }
    
    .card:hover {
        transform: translateY(-2px);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
}

/* Melhorias de responsividade para Admin */
@media (max-width: 768px) {
    .admin-page {
        padding: 0 8px;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .table-wrapper {
        margin: 0 -8px;
        padding: 0 8px;
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    .table th,
    .table td {
        padding: 8px 10px;
    }
    
    /* Cards para tabelas em mobile */
    .table-mobile-card {
        display: block;
        background: #fff;
        border-radius: 12px;
        padding: 12px;
        margin-bottom: 12px;
        box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
    }
    
    .table-mobile-card-row {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 8px 0;
        border-bottom: 1px solid #eef2f7;
    }
    
    .table-mobile-card-row:last-child {
        border-bottom: none;
    }
    
    .table-mobile-card-label {
        font-weight: 600;
        color: var(--laytik-text-muted);
        font-size: 0.85rem;
        margin-right: 12px;
        min-width: 100px;
    }
    
    .table-mobile-card-value {
        flex: 1;
        text-align: right;
        word-wrap: break-word;
    }
}

/* ANIMAÇÕES E MELHORIAS PARA PRODUCT REQUEST */

/* Animação de entrada para cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translate3d(30px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes shake {
    0%, 100% { transform: translate3d(0, 0, 0); }
    10%, 30%, 50%, 70%, 90% { transform: translate3d(-5px, 0, 0); }
    20%, 40%, 60%, 80% { transform: translate3d(5px, 0, 0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Animações para as etapas */
.product-type-card,
.field-container {
    animation: fadeInUp 0.5s ease-out;
    transition: all 0.3s ease;
    will-change: transform, opacity;
}

.product-type-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.15);
}

/* Stepper com animação */
.stepper {
    animation: slideInRight 0.4s ease-out;
    will-change: transform, opacity;
}

.step-pill {
    transition: all 0.3s ease;
}

.step-pill.active {
    animation: pulse 2s infinite;
}

/* Campos com erro */
.field-error {
    border-left: 4px solid #f87171 !important;
    background-color: #fef2f2 !important;
    animation: shake 0.5s;
    will-change: transform;
}

.input-error {
    border-color: #f87171 !important;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.1) !important;
}

/* Animações para cards de produto */
.product-type-card {
    position: relative;
    overflow: hidden;
}

.product-type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.product-type-card:hover::before {
    left: 100%;
}

/* Melhorias no stepper */
.step-pill.done {
    position: relative;
}

.step-pill.done::after {
    content: '✓';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: var(--laytik-primary-dark);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.step-pill.done:hover::after {
    opacity: 1;
}

/* Animação para o resumo de preço */
.price-summary {
    animation: fadeInUp 0.6s ease-out;
    transition: all 0.3s ease;
    will-change: transform, opacity;
}

.price-summary:hover {
    box-shadow: 0 4px 12px rgba(11, 99, 181, 0.15);
}

/* Transições suaves para inputs */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
select,
textarea {
    transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(11, 99, 181, 0.2);
}

/* Animação para botões */
button,
.pill-btn {
    position: relative;
    overflow: hidden;
}

button::before,
.pill-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover::before,
.pill-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Animações escalonadas para campos */
.field-container:nth-child(1) { animation-delay: 0.1s; }
.field-container:nth-child(2) { animation-delay: 0.2s; }
.field-container:nth-child(3) { animation-delay: 0.3s; }
.field-container:nth-child(4) { animation-delay: 0.4s; }
.field-container:nth-child(5) { animation-delay: 0.5s; }
.field-container:nth-child(n+6) { animation-delay: 0.6s; }

/* Melhorias visuais para cards de produto */
.product-type-card button {
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.product-type-card button:hover {
    transform: scale(1.02);
}

/* Loading state para botões */
button:disabled,
.pill-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
}

/* Spinner apenas para botões em estado de loading (não apenas desabilitados) */
button.loading:disabled::after,
.pill-btn.loading:disabled::after,
button[data-loading="true"]:disabled::after,
.pill-btn[data-loading="true"]:disabled::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    will-change: transform;
}

@keyframes spin {
    to { transform: rotate3d(0, 0, 1, 360deg); }
}

/* Melhorias para o stepper em mobile */
@media (max-width: 768px) {
    .stepper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        /* scrollbar-width não suportado no Safari, usar -webkit-scrollbar */
        -ms-overflow-style: none; /* IE e Edge */
        scrollbar-width: none; /* Firefox */
        padding-bottom: 12px;
        margin-bottom: 12px;
    }
    
    .stepper::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .step-pill {
        min-width: 120px;
        font-size: 0.75rem;
    }
    
    .step-pill span.step-index {
        width: 20px;
        height: 20px;
        font-size: 0.75rem;
    }
}

/* Estilos movidos de inline para CSS externo */

/* Footer */
footer p.footer-document {
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
}

/* Cupons Sidebar */
#coupons-sidebar {
    display: none;
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    transition: all 0.3s ease;
}

#coupons-sidebar-content {
    background: linear-gradient(135deg, #0b63b5 0%, #0a5aa0 100%);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(11, 99, 181, 0.3);
    cursor: pointer;
    min-width: 120px;
    text-align: center;
    animation: pulse 2s infinite;
}

#coupons-sidebar-content .icon {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

#coupons-sidebar-content .title {
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

#coupons-sidebar-content .subtitle {
    color: #fff;
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Botão Fixo do Carrinho */
#cart-fixed-button {
    display: none;
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9998;
    transition: all 0.3s ease;
}

#cart-fixed-button-link {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    padding: 14px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

#cart-fixed-button-link svg {
    flex-shrink: 0;
}

#cart-fixed-button-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    min-width: 28px;
    text-align: center;
}

/* Modal de Cupons */
#coupons-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

#coupons-modal .modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

#coupons-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

#coupons-modal-close:hover {
    background: #f0f0f0;
}

#coupons-modal-content {
    padding: 24px;
}

/* Estilos para conteúdo dinâmico do modal de cupons */
#coupons-modal-content h2 {
    margin-top: 0;
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 16px;
}

.coupon-item {
    margin-bottom: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    overflow: hidden;
}

.coupon-item-image {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
}

.coupon-item-header {
    margin-bottom: 12px;
}

.coupon-item-title {
    margin: 0 0 4px 0;
    font-size: 1.2rem;
    color: #0b63b5;
    font-weight: 700;
}

.coupon-item-discount {
    margin: 0;
    color: #10b981;
    font-size: 0.95rem;
    font-weight: 600;
}

.coupon-item-description {
    margin: 0 0 12px 0;
    color: #6b7280;
    font-size: 0.95rem;
}

.coupon-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f0f7ff;
    border-radius: 6px;
    margin-bottom: 12px;
}

.coupon-item-info-left {
    flex: 1;
}

.coupon-item-code-label {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.coupon-item-code {
    font-size: 1.2rem;
    color: #0b63b5;
    letter-spacing: 1px;
}

.coupon-item-info-right {
    text-align: right;
}

.coupon-item-discount-label {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.coupon-item-discount-value {
    color: #10b981;
    font-weight: 700;
    font-size: 1.1rem;
}

.coupon-modal-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.coupon-modal-footer-text {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
    text-align: center;
}

/* Responsivo para elementos fixos */
@media (max-width: 768px) {
    #coupons-sidebar {
        right: 10px !important;
        top: auto !important;
        bottom: 80px !important;
        transform: none !important;
    }
    
    #coupons-sidebar-content {
        min-width: 100px !important;
        padding: 12px !important;
        font-size: 0.8rem !important;
    }
    
    #coupons-sidebar-content .icon {
        font-size: 1rem !important;
    }
    
    #coupons-sidebar-content .title {
        font-size: 0.8rem !important;
    }
    
    #coupons-sidebar-content .subtitle {
        font-size: 0.7rem !important;
    }
    
    #cart-fixed-button {
        right: 10px !important;
        bottom: 10px !important;
    }
    
    #cart-fixed-button-link {
        padding: 12px 16px !important;
        font-size: 0.85rem !important;
        min-height: 48px;
    }
    
    #cart-fixed-button-text {
        display: none;
    }
    
    /* Modal otimizado para mobile */
    #coupons-modal {
        padding: 10px;
    }
    
    #coupons-modal .modal-content {
        max-height: 95vh;
        border-radius: 16px 16px 0 0;
    }
    
    #coupons-modal-content {
        padding: 20px 16px;
    }
    
    #coupons-modal-content h2 {
        font-size: 1.3rem;
    }
    
    .coupon-item {
        padding: 12px;
        margin-bottom: 16px;
    }
    
    .coupon-item-title {
        font-size: 1.1rem;
    }
    
    .coupon-item-info {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .coupon-item-info-right {
        text-align: left;
    }
}

/* Melhorias de toque e interação */
@media (hover: none) and (pointer: coarse) {
    /* Dispositivos touch */
    button:hover,
    .pill-btn:hover,
    header nav a:hover {
        transform: none;
    }
    
    button:active,
    .pill-btn:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    .card:hover {
        transform: none;
        box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
    }
    
    .product-type-card:hover {
        transform: none;
    }
    
    input:focus,
    select:focus,
    textarea:focus {
        transform: none;
    }
}

/* Prevenir animações em dispositivos com preferência reduzida */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   EXPERIÊNCIA APP-LIKE PARA MOBILE
   ============================================ */

/* Melhorias adicionais para mobile */
@media (max-width: 768px) {
    /* Melhorar legibilidade */
    body {
        font-size: 15px;
        line-height: 1.6;
        /* Prevenir seleção de texto acidental */
        -webkit-user-select: none;
        user-select: none;
    }
    
    /* Permitir seleção em inputs e textos */
    input, textarea, select, p, span, div, label {
        -webkit-user-select: text;
        user-select: text;
    }
    
    /* Aparência mais limpa e app-like */
    .card {
        border-radius: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }
    
    /* Melhor espaçamento entre cards */
    .card + .card {
        margin-top: 16px;
    }
    
    /* Header mais compacto e app-like */
    header {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        padding: 12px 16px 10px;
    }
    
    /* Navegação mais app-like */
    header nav {
        margin-top: 10px;
        gap: 6px;
    }
    
    header nav a {
        padding: 10px 14px;
        font-size: 0.9rem;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.9);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
    
    /* Main com padding mais generoso */
    main {
        padding: 16px 12px 20px;
    }
    
    /* Cards com padding otimizado */
    .card {
        padding: 16px;
    }
    
    /* Botões principais mais destacados */
    .pill-btn {
        font-size: 0.95rem;
        padding: 14px 20px;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(11, 99, 181, 0.2);
    }
    
    /* Melhor feedback visual em toque */
    .pill-btn:active {
        transform: scale(0.97);
        box-shadow: 0 1px 4px rgba(11, 99, 181, 0.15);
    }
    
    /* Inputs com aparência mais moderna */
    input[type="text"],
    input[type="email"],
    input[type="number"],
    input[type="password"],
    input[type="tel"],
    select,
    textarea {
        border-radius: 12px;
        padding: 14px 16px;
        font-size: 16px;
        border: 2px solid var(--laytik-border);
        transition: all 0.2s ease;
    }
    
    input:focus,
    select:focus,
    textarea:focus {
        border-color: var(--laytik-primary-dark);
        box-shadow: 0 0 0 4px rgba(11, 99, 181, 0.1);
        transform: none;
    }
    
    /* Labels mais destacados */
    form label {
        font-weight: 600;
        font-size: 0.9rem;
        margin-bottom: 6px;
        color: var(--laytik-text-main);
    }
    
    /* Page header mais compacto */
    .page-header {
        padding: 12px 0;
        margin-bottom: 16px;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
        font-weight: 700;
    }
    
    /* Card title mais destacado */
    .card-title {
        font-size: 1.1rem;
        font-weight: 700;
        padding-bottom: 14px;
        margin-bottom: 16px;
        border-bottom: 2px solid #eef2f7;
    }
    
    /* Melhor espaçamento em grids */
    .grid-two {
        gap: 12px;
    }
    
    /* Footer mais discreto */
    footer {
        margin-top: 32px;
        padding: 16px 12px;
        font-size: 0.75rem;
    }
    
    /* Scroll suave e app-like */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Melhorar área de toque em todos os elementos interativos */
    a, button, input[type="submit"], input[type="button"] {
        -webkit-tap-highlight-color: rgba(11, 99, 181, 0.15);
    }
    
    /* Animações mais suaves */
    * {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Melhor feedback em cards */
    .card {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    
    .card:active {
        transform: scale(0.98);
    }
    
    /* Inputs com melhor feedback */
    input:invalid {
        border-color: #f87171;
    }
    
    input:valid:not(:placeholder-shown) {
        border-color: #10b981;
    }
    
    /* Melhor espaçamento entre seções */
    .card + .card {
        margin-top: 16px;
    }
    
    /* Lista de endereços com melhor espaçamento */
    .address-card + .address-card {
        margin-top: 12px;
    }
}
    
    /* Espaçamento adequado entre elementos */
    .card-title {
        font-size: 1rem;
        margin-bottom: 12px;
        padding-bottom: 10px;
    }
    
    /* Melhorar área de toque para links */
    a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        -webkit-tap-highlight-color: rgba(11, 99, 181, 0.1);
    }
    
    /* Ajustar espaçamentos em listas */
    .list li {
        padding: 8px 0;
        min-height: 44px;
    }
    
    /* Melhorar visualização de progresso */
    .progress {
        height: 12px;
    }
    
    /* Ajustar badges de status */
    .status-badge {
        padding: 8px 12px;
        font-size: 0.8rem;
        min-height: 32px;
        display: inline-flex;
        align-items: center;
    }
    
    /* Melhorar timeline em mobile */
    .timeline {
        padding-left: 16px;
    }
    
    .timeline-content {
        margin-left: 16px;
        padding: 10px 12px;
    }
    
    /* Ajustar grid de produtos */
    .product-type-grid {
        gap: 12px;
    }
    
    /* Melhorar visualização de preços */
    .price-summary {
        font-size: 0.9rem;
    }
}

/* ============================================
   ESTILOS PARA CARDS DE ENDEREÇO
   ============================================ */

.address-card {
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    position: relative;
    background: #fff;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.address-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.address-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
    flex-wrap: wrap;
}

.address-card-title {
    flex: 1;
    min-width: 0;
}

.address-card-title strong {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 1rem;
}

.address-badge-default {
    background: #10b981;
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.address-card-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    align-items: center;
}

.address-action-form {
    display: inline-block;
    margin: 0;
}

.address-card-body {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
}

.address-line {
    margin-bottom: 4px;
}

.address-line:last-child {
    margin-bottom: 0;
}

/* Botões com ícones */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    min-width: 44px;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

.btn-icon svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.btn-icon-text {
    white-space: nowrap;
}

/* Botão definir como padrão */
.btn-icon-default {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
}

.btn-icon-default:hover,
.btn-icon-default:active {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    transform: scale(1.05);
}

/* Botão editar */
.btn-icon-edit {
    background: linear-gradient(135deg, var(--laytik-primary), var(--laytik-primary-dark));
    color: #fff;
}

.btn-icon-edit:hover,
.btn-icon-edit:active {
    background: linear-gradient(135deg, var(--laytik-primary-dark), #0a5490);
    transform: scale(1.05);
}

/* Botão excluir */
.btn-icon-delete {
    background: linear-gradient(135deg, #f87171, #c53030);
    color: #fff;
}

.btn-icon-delete:hover,
.btn-icon-delete:active {
    background: linear-gradient(135deg, #c53030, #991b1b);
    transform: scale(1.05);
}

/* Botão salvar */
.btn-icon-save {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}

.btn-icon-save:hover,
.btn-icon-save:active {
    background: linear-gradient(135deg, #059669, #047857);
    transform: scale(1.05);
}

/* Botão cancelar */
.btn-icon-cancel {
    background: #fff;
    color: var(--laytik-text-main);
    border: 1.5px solid var(--laytik-border);
}

.btn-icon-cancel:hover,
.btn-icon-cancel:active {
    background: var(--laytik-primary-soft);
    border-color: var(--laytik-primary);
    transform: scale(1.05);
}

/* Ações do formulário de endereço */
.address-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.address-form-actions .btn-icon {
    flex: 1;
    min-width: 120px;
}

/* Responsivo para cards de endereço */
@media (max-width: 768px) {
    .address-card {
        padding: 14px;
        border-radius: 12px;
    }
    
    .address-card-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .address-card-title {
        width: 100%;
    }
    
    .address-card-actions {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
    }
    
    .address-card-actions .btn-icon {
        flex: 0 0 auto;
        min-width: 48px;
        padding: 12px;
    }
    
    .btn-icon-text {
        display: none;
    }
    
    .address-form-actions {
        flex-direction: column;
    }
    
    .address-form-actions .btn-icon {
        width: 100%;
        min-width: 0;
    }
    
    .address-form-actions .btn-icon-text {
        display: inline;
    }
    
    .address-card-body {
        font-size: 0.85rem;
    }
    
    .btn-add-address-text {
        display: none;
    }
    
    .btn-add-address {
        min-width: 48px;
        padding: 12px;
    }
}

/* Card title com ação */
.card-title-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-add-address {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.btn-add-address svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

/* Container de formulário de endereço */
.address-form-container {
    display: none;
    margin-top: 16px;
    padding: 16px;
    background: #f8fbff;
    border-radius: 12px;
    border: 1px solid #e0e7ff;
}

/* Formulário de registro */
.register-form {
    max-width: 600px;
    margin: 0 auto;
}

.register-form h3 {
    color: var(--laytik-text-main);
    font-weight: 700;
    border-bottom: 2px solid #eef2f7;
    padding-bottom: 8px;
}

@media (max-width: 768px) {
    .register-form {
        max-width: 100%;
    }
    
    .register-form h3 {
        font-size: 1rem;
    }
}

.address-form-title {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--laytik-text-main);
}

@media (max-width: 768px) {
    .card-title-with-action {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .btn-add-address {
        width: 100%;
        justify-content: center;
    }
    
    .btn-add-address-text {
        display: inline;
    }
    
    .address-form-container {
        margin-top: 12px;
        padding: 14px;
    }
    
    .address-form-title {
        font-size: 1rem;
    }
}

/* Otimizações para telas muito pequenas */
@media (max-width: 360px) {
    header {
        padding: 6px 10px 4px;
    }
    
    .brand {
        font-size: 0.9rem;
    }
    
    .site-logo {
        max-height: 35px;
        max-width: 120px;
    }
    
    main {
        padding: 6px 10px 10px;
    }
    
    .card {
        padding: 10px 12px;
    }
    
    .page-header h1 {
        font-size: 1.3rem;
    }
    
    .pill-btn {
        font-size: 0.8rem;
        padding: 10px 14px;
    }
    
    .address-card {
        padding: 12px;
    }
    
    .address-card-actions .btn-icon {
        min-width: 44px;
        padding: 10px;
    }
}

/* ============================================
   ANIMAÇÕES E EXPERIÊNCIA FLUIDA PARA ADMIN
   ============================================ */

/* Animação de entrada suave para páginas admin */
.admin-page {
    animation: fadeInUp 0.4s ease-out;
}

/* Cards administrativos com animação escalonada */
.admin-page .card {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.admin-page .card:nth-child(1) { animation-delay: 0.05s; }
.admin-page .card:nth-child(2) { animation-delay: 0.1s; }
.admin-page .card:nth-child(3) { animation-delay: 0.15s; }
.admin-page .card:nth-child(4) { animation-delay: 0.2s; }
.admin-page .card:nth-child(5) { animation-delay: 0.25s; }
.admin-page .card:nth-child(n+6) { animation-delay: 0.3s; }

/* Grid de cards com animação suave */
.admin-page .card-grid .card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-page .card-grid .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
}

/* Tabelas administrativas com hover suave */
.admin-page .table tbody tr {
    transition: all 0.2s ease;
}

.admin-page .table tbody tr:hover {
    background-color: #f8fbff;
    transform: scale(1.01);
}

/* Botões administrativos com animação de ripple */
.admin-page .pill-btn,
.admin-page button[type="submit"],
.admin-page button[type="button"] {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-page .pill-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.admin-page .pill-btn:active::before {
    width: 300px;
    height: 300px;
}

/* Page header com animação */
.admin-page .page-header {
    animation: fadeInDown 0.4s ease-out;
}

/* Inputs com animação de foco */
.admin-page input[type="text"],
.admin-page input[type="email"],
.admin-page input[type="number"],
.admin-page input[type="password"],
.admin-page input[type="tel"],
.admin-page input[type="url"],
.admin-page select,
.admin-page textarea {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-page input:focus,
.admin-page select:focus,
.admin-page textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(11, 99, 181, 0.2);
}

/* Status badges com animação */
.admin-page .status-badge {
    transition: all 0.3s ease;
    display: inline-block;
}

.admin-page .status-badge:hover {
    transform: scale(1.05);
}

/* List items com animação */
.admin-page .list li {
    transition: all 0.2s ease;
    padding: 6px 0;
    border-radius: 6px;
}

.admin-page .list li:hover {
    background-color: #f8fbff;
    padding-left: 8px;
}

/* KPI cards com animação de pulso suave */
.admin-page .kpi {
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.admin-page .kpi::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.admin-page .kpi:hover::before {
    left: 100%;
}

/* Animações keyframes para admin */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Botões de ação com ícones */
.admin-page .admin-icon-btn,
.admin-page .admin-action-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-page .admin-icon-btn:hover,
.admin-page .admin-action-btn:hover {
    transform: scale(1.1);
}

.admin-page .admin-icon-btn:active,
.admin-page .admin-action-btn:active {
    transform: scale(0.95);
}

/* Formulários com animação de validação */
.admin-page input:invalid:not(:placeholder-shown) {
    border-color: #f87171;
    animation: shake 0.5s;
}

.admin-page input:valid:not(:placeholder-shown) {
    border-color: #10b981;
}

/* Cards de produtos/tipos com animação de entrada */
.admin-page .product-type-card,
.admin-page .card-grid .card {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

/* Mobile: otimizações para admin */
@media (max-width: 768px) {
    /* Reduzir animações em mobile para melhor performance */
    .admin-page .card {
        animation-duration: 0.3s;
    }
    
    .admin-page .card-grid .card:hover {
        transform: none;
    }
    
    .admin-page .table tbody tr:hover {
        transform: none;
    }
    
    /* Cards em lista no mobile */
    .admin-page .card-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Page header mais compacto */
    .admin-page .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 0;
    }
    
    .admin-page .page-header .actions {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .admin-page .page-header .actions .pill-btn {
        flex: 1;
        min-width: calc(50% - 4px);
        font-size: 0.85rem;
        padding: 10px 14px;
    }
    
    /* Tabelas responsivas em mobile */
    .admin-page .table-wrapper {
        margin: 0 -8px;
        padding: 0 8px;
    }
    
    /* Formulários mais espaçados */
    .admin-page .grid-two {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    /* Inputs maiores para toque fácil */
    .admin-page input[type="text"],
    .admin-page input[type="email"],
    .admin-page input[type="number"],
    .admin-page input[type="password"],
    .admin-page select,
    .admin-page textarea {
        font-size: 16px;
        padding: 14px 16px;
        min-height: 48px;
    }
    
    /* Botões maiores e mais fáceis de tocar */
    .admin-page .pill-btn {
        min-height: 48px;
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    /* List items mais espaçados */
    .admin-page .list li {
        padding: 10px 0;
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    
    /* KPI cards em coluna única */
    .admin-page .kpi {
        margin-bottom: 12px;
    }
    
    /* Cards de produto/tipo em coluna única */
    .admin-page .product-type-grid {
        grid-template-columns: 1fr;
    }
    
    /* Ações em coluna no mobile */
    .admin-page .card-title-with-action {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    /* Botões de ação em linha no mobile */
    .admin-page td .pill-btn,
    .admin-page .actions .pill-btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    /* Esconder animações complexas em mobile */
    .admin-page .pill-btn::before {
        display: none;
    }
}

/* Tablet: ajustes intermediários */
@media (min-width: 769px) and (max-width: 1024px) {
    .admin-page .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .admin-page .page-header .actions .pill-btn {
        font-size: 0.9rem;
        padding: 11px 16px;
    }
}

/* Reduzir animações para usuários que preferem menos movimento */
@media (prefers-reduced-motion: reduce) {
    .admin-page *,
    .admin-page *::before,
    .admin-page *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   ESTILOS ESPECÍFICOS PARA MATERIALS
   ============================================ */

/* Grid de materiais */
.materials-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

/* Cards de material */
.material-card {
    padding: 24px;
    border-left: 4px solid var(--laytik-primary);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.material-card:nth-child(1) { animation-delay: 0.05s; }
.material-card:nth-child(2) { animation-delay: 0.1s; }
.material-card:nth-child(3) { animation-delay: 0.15s; }
.material-card:nth-child(4) { animation-delay: 0.2s; }
.material-card:nth-child(5) { animation-delay: 0.25s; }
.material-card:nth-child(6) { animation-delay: 0.3s; }

.material-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.material-card:hover::before {
    left: 100%;
}

.material-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(11, 99, 181, 0.15);
    border-left-width: 6px;
}

/* Header do card */
.material-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 12px;
}

.material-card-title-section {
    flex: 1;
    min-width: 0;
}

.material-card-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.material-card-code {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
    font-family: monospace;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

/* Body do card */
.material-card-body {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e5e7eb;
}

.material-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.material-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.material-info-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.material-info-value {
    font-size: 0.95rem;
    color: #1f2937;
    font-weight: 500;
}

/* Seção de estoque */
.material-stock-section {
    margin-bottom: 20px;
    padding: 16px;
    background: linear-gradient(135deg, #f0f7ff, #ffffff);
    border-radius: 10px;
    border: 1px solid #e0e7ff;
}

.stock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stock-label {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
}

.stock-value {
    color: var(--laytik-primary-dark);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
}

.stock-value.stock-low {
    color: #ef4444;
}

.stock-bar-container {
    margin-top: 12px;
}

.stock-bar {
    width: 100%;
    height: 10px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 8px;
}

.stock-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 999px;
    transition: width 0.3s ease, background 0.3s ease;
}

.stock-bar-fill.stock-bar-low {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.stock-min-label {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Seção de custo */
.material-cost-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fef3c7, #ffffff);
    border-radius: 10px;
    border: 1px solid #fde68a;
    margin-bottom: 16px;
}

.cost-label {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
}

.cost-value {
    color: #92400e;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Seção de incrementos de preço por moeda */
.material-pricing-section {
    padding: 16px;
    background: linear-gradient(135deg, #f0fdf4, #ffffff);
    border-radius: 10px;
    border: 1px solid #bbf7d0;
}

.pricing-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    display: block;
}

.pricing-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pricing-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #d1fae5;
}

.pricing-currency {
    font-size: 0.85rem;
    font-weight: 600;
    color: #065f46;
    font-family: monospace;
}

.pricing-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #059669;
}

/* Estilos para incrementos por moeda em opções */
.currency-pricings-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.currency-pricing-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f0fdf4;
    border-radius: 6px;
    border: 1px solid #bbf7d0;
}

.currency-code {
    font-size: 0.85rem;
    font-weight: 600;
    color: #065f46;
    font-family: monospace;
}

.currency-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #059669;
}

/* Ações do card */
.material-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid #e5e7eb;
}

.material-card-actions .action-btn {
    flex: 1;
    min-width: 0;
    font-size: 0.85rem;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.material-card-actions .delete-form {
    flex: 0 0 auto;
    margin: 0;
}

.material-card-actions .action-btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    min-width: 44px;
    flex-shrink: 0;
}

.material-card-actions .action-btn-icon svg {
    margin: 0;
    width: 20px;
    height: 20px;
}

.material-card-actions .action-btn-icon:hover {
    transform: scale(1.1);
}

.material-card-actions .action-btn-icon:active {
    transform: scale(0.95);
}

/* Empty state */
.empty-state-card {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.empty-state-content {
    max-width: 400px;
    margin: 0 auto;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-card h3 {
    margin: 0 0 8px 0;
    color: #374151;
    font-size: 1.25rem;
}

.empty-state-text {
    margin: 0 0 24px;
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.6;
}

/* Formulários de materials */
.materials-form-page {
    max-width: 1000px;
}

.material-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Seção de incrementos de preço por moeda */
.section-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
    display: block;
}

.section-description {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0 0 20px 0;
    line-height: 1.6;
}

.currency-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.currency-pricing-card {
    background: linear-gradient(135deg, #f0f7ff, #ffffff);
    border: 2px solid #e0e7ff;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.currency-pricing-card:hover {
    border-color: var(--laytik-primary);
    box-shadow: 0 4px 12px rgba(11, 99, 181, 0.1);
}

.currency-pricing-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0e7ff;
}

.currency-pricing-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--laytik-primary-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.currency-pricing-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.material-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.material-form .form-group label {
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

.material-form .form-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 2px solid var(--laytik-border);
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
}

.material-form .form-input:focus {
    border-color: var(--laytik-primary-dark);
    box-shadow: 0 0 0 4px rgba(11, 99, 181, 0.1);
    transform: translateY(-1px);
}

.material-form .form-input:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
    color: #6b7280;
}

.material-form .form-hint {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 4px;
}

.material-form .checkbox-group {
    padding: 16px;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.material-form .checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
}

.material-form .checkbox-input {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--laytik-primary-dark);
}

.material-form .checkbox-text {
    user-select: none;
}

.material-form .form-actions {
    display: flex;
    gap: 12px;
    padding-top: 20px;
    border-top: 2px solid #e5e7eb;
    flex-wrap: wrap;
}

.material-form .form-actions .pill-btn {
    flex: 1;
    min-width: 150px;
}

/* Error message card para materials */
.error-message-card {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #f87171;
    border-left: 4px solid #ef4444;
}

.error-message-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #991b1b;
    font-weight: 500;
}

/* Mobile: Otimizações para materials */
@media (max-width: 768px) {
    .materials-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .material-card {
        padding: 20px;
    }
    
    .material-card-title {
        font-size: 1.1rem;
    }
    
    .material-info-grid {
        grid-template-columns: 1fr;
    }
    
    .material-card-actions {
        flex-direction: column;
    }
    
    .material-card-actions .action-btn {
        width: 100%;
    }
    
    .material-card-actions .delete-form {
        width: 100%;
    }
    
    .material-card-actions .action-btn-icon {
        width: 100%;
        min-width: auto;
    }
    
    .material-form .form-actions {
        flex-direction: column;
    }
    
    .material-form .form-actions .pill-btn {
        width: 100%;
    }
}

/* ============================================
   ESTILOS ESPECÍFICOS PARA PRODUCT TYPES
   ============================================ */

/* Grid de tipos de produto */
.product-types-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

/* Cards de tipo de produto */
.product-type-card {
    padding: 24px;
    border-left: 4px solid var(--laytik-primary);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.product-type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.product-type-card:hover::before {
    left: 100%;
}

.product-type-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(11, 99, 181, 0.15);
    border-left-width: 6px;
}

/* Header do card */
.product-type-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 12px;
}

.product-type-card-title-section {
    flex: 1;
    min-width: 0;
}

.product-type-card-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.product-type-card-id {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
}

.product-type-card-status {
    flex-shrink: 0;
}

/* Status badges melhorados */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.status-active {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.status-inactive {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

/* Body do card */
.product-type-card-body {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e5e7eb;
}

.product-type-price-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f0f7ff, #ffffff);
    border-radius: 10px;
    border: 1px solid #e0e7ff;
}

.price-label {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
}

.price-value {
    color: var(--laytik-primary-dark);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Ações do card */
.product-type-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.product-type-card-actions .action-btn {
    flex: 1;
    min-width: 0;
    font-size: 0.85rem;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.product-type-card-actions .delete-form {
    flex: 0 0 auto;
    margin: 0;
}

.product-type-card-actions .action-btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    min-width: 44px;
    flex-shrink: 0;
    position: relative;
}

.product-type-card-actions .action-btn-icon svg {
    margin: 0;
    width: 20px;
    height: 20px;
}

.product-type-card-actions .action-btn-icon:hover {
    transform: scale(1.1);
}

.product-type-card-actions .action-btn-icon:active {
    transform: scale(0.95);
}

/* Empty state */
.empty-state-card {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.empty-state-content {
    max-width: 400px;
    margin: 0 auto;
}

.empty-state-text {
    margin: 0 0 24px;
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.6;
}

/* Formulários */
.product-types-form-page {
    max-width: 800px;
}

.product-type-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 2px solid var(--laytik-border);
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
}

.form-input:focus {
    border-color: var(--laytik-primary-dark);
    box-shadow: 0 0 0 4px rgba(11, 99, 181, 0.1);
    transform: translateY(-1px);
}

.form-hint {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 4px;
}

/* Checkbox group */
.checkbox-group {
    padding: 16px;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-input {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--laytik-primary-dark);
}

.checkbox-text {
    user-select: none;
}

/* Form actions */
.form-actions {
    display: flex;
    gap: 12px;
    padding-top: 20px;
    border-top: 2px solid #e5e7eb;
    flex-wrap: wrap;
}

.form-actions .pill-btn {
    flex: 1;
    min-width: 150px;
}

/* Error message card */
.error-message-card {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #f87171;
    border-left: 4px solid #ef4444;
}

.error-message-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #991b1b;
    font-weight: 500;
}

/* AI Assistant Card */
.ai-assistant-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 28px;
    border: none;
    margin-top: 24px;
}

.ai-assistant-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.ai-assistant-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

.ai-assistant-title {
    margin: 0 0 8px 0;
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
}

.ai-assistant-description {
    margin: 0;
    opacity: 0.95;
    font-size: 0.95rem;
    line-height: 1.6;
}

.ai-assistant-form {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.ai-input {
    flex: 1;
    padding: 14px 18px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: #1f2937;
    transition: all 0.3s ease;
}

.ai-input:focus {
    outline: none;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
}

.ai-btn {
    background: white;
    color: #667eea;
    border: none;
    white-space: nowrap;
}

.ai-btn:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ai-result {
    display: none;
    margin-top: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ai-result-loading {
    color: white;
    text-align: center;
    padding: 8px;
}

.ai-result-success {
    color: white;
}

.ai-result-success pre {
    margin: 0;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.ai-result-error {
    color: #fee2e2;
    background: rgba(239, 68, 68, 0.2);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Mobile: Otimizações para product types */
@media (max-width: 768px) {
    .product-types-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .product-type-card {
        padding: 20px;
    }
    
    .product-type-card-title {
        font-size: 1.1rem;
    }
    
    .product-type-card-actions {
        flex-direction: column;
    }
    
    .product-type-card-actions .action-btn {
        width: 100%;
    }
    
    .product-type-card-actions .delete-form {
        width: 100%;
    }
    
    .ai-assistant-form {
        flex-direction: column;
    }
    
    .ai-btn {
        width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .pill-btn {
        width: 100%;
    }
}

/* ============================================
   MELHORIAS FINAIS PARA MOBILE
   ============================================ */

@media (max-width: 768px) {
    /* Melhorar formulários em mobile */
    form {
        width: 100%;
    }
    
    form .grid-two {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    
    /* Melhorar área de toque para todos os botões */
    button,
    .pill-btn,
    input[type="submit"],
    input[type="button"],
    a.button {
        min-height: 48px;
        min-width: 48px;
        font-size: 1rem;
        padding: 14px 20px;
    }
    
    /* Melhorar inputs em mobile */
    input[type="text"],
    input[type="email"],
    input[type="number"],
    input[type="password"],
    input[type="tel"],
    input[type="url"],
    input[type="date"],
    input[type="time"],
    select,
    textarea {
        font-size: 16px !important;
        min-height: 48px;
        padding: 14px 16px;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Melhorar tabelas - converter para cards em mobile quando possível */
    .table-wrapper {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Melhorar modais em mobile */
    .modal,
    [role="dialog"] {
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 16px 16px 0 0 !important;
        max-height: 90vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Melhorar elementos fixos */
    #cart-fixed-button,
    #coupons-sidebar {
        position: fixed;
        z-index: 9997;
    }
    
    /* Melhorar espaçamento geral */
    h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.25rem;
        line-height: 1.4;
    }
    
    /* Melhorar listas */
    ul, ol {
        padding-left: 20px;
    }
    
    li {
        margin-bottom: 8px;
        line-height: 1.6;
    }
    
    /* Melhorar espaçamento entre elementos */
    .card + .card,
    .card + form,
    form + .card {
        margin-top: 16px;
    }
    
    /* Melhorar grid de produtos */
    .product-type-grid,
    .materials-grid,
    .product-types-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    
    /* Melhorar cards de produto */
    .product-type-card {
        width: 100%;
        margin-bottom: 0;
    }
    
    /* Melhorar footer em mobile */
    footer {
        padding: 16px 12px;
        font-size: 0.8rem;
        line-height: 1.6;
    }
    
    footer p {
        margin: 8px 0;
    }
    
    /* Melhorar área de scroll */
    html {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Melhorar performance de scroll */
    * {
        -webkit-tap-highlight-color: rgba(11, 99, 181, 0.1);
    }
    
    /* Melhorar contraste e legibilidade */
    .muted {
        opacity: 0.8;
    }
    
    /* Melhorar links */
    a {
        word-break: break-word;
        -webkit-tap-highlight-color: rgba(11, 99, 181, 0.15);
    }
    
    /* Melhorar áreas clicáveis */
    [onclick],
    [role="button"] {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(11, 99, 181, 0.15);
    }
}

/* Otimizações para telas muito pequenas */
@media (max-width: 360px) {
    header {
        padding: 6px 10px 4px;
    }
    
    .brand {
        font-size: 0.85rem;
    }
    
    .site-logo {
        max-height: 35px;
        max-width: 120px;
    }
    
    main {
        padding: 8px 10px 12px;
    }
    
    .card {
        padding: 12px;
        border-radius: 12px;
    }
    
    .pill-btn {
        font-size: 0.85rem;
        padding: 12px 16px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    h3 {
        font-size: 1.1rem;
    }
}