/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* Utilidades */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
}

.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.card-3d:hover {
    transform: rotateX(5deg) rotateY(5deg) translateY(-10px);
}

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.btn2 {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: white;
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.3);
}

.btn-new-client,
.btn-new-order {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-new-client:hover,
.btn-new-order:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.4);
}

.btn-filter {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(37, 99, 235, 0.42);
}

.btn-reset {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.3);
}

.btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(156, 163, 175, 0.35);
}

.btn-edit {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.3);
}

.btn-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(217, 119, 6, 0.45);
}

.btn-delete {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.32);
}

.btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(239, 68, 68, 0.45);
}

.btn-submit {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.32);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(34, 197, 94, 0.45);
}

.btn-cancel {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.3);
}

.btn-cancel:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(100, 116, 139, 0.42);
}

/* Formulários */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.form-control-login {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    backdrop-filter: blur(10px);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.form-control::placeholder {
    color: #a0aec0;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
}

/* Layout Principal */
.main-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #1f2937, #111827);
    color: white;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-logo {
    width: 123px;
    height: 53px;
    background-size: cover;
    background-position: center;
    background-image: url(https://i.imgur.com/mJHSJfm.png);
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
}

.sidebar-subtitle {
    font-size: 12px;
    opacity: 0.7;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: rgba(102, 126, 234, 0.1);
}

.nav-link:hover::before,
.nav-link.active::before {
    transform: scaleY(1);
}

.main-content {
    flex: 1;
    margin-left: 280px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 20px 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.navbar-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.content-area {
    padding: 30px;
}

/* Cards de Produto */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.product-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.product-code {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.stock-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.stock-disponivel {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.stock-sob-encomenda {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.product-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1f2937;
}

.product-description {
    color: #6b7280;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-segment {
    background: rgba(107, 114, 128, 0.1);
    color: #4b5563;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    display: inline-block;
    margin-bottom: 15px;
}

.price-table {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.price-row:last-child {
    border-bottom: none;
}

.quantity-range {
    font-size: 14px;
    color: #6b7280;
}

.price {
    font-weight: 700;
    color: #059669;
    font-size: 16px;
}

/* Carrinho */
.cart-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.cart-items {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.loading-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #6b7280;
}

.empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    align-items: flex-start;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 5px;
    word-wrap: break-word;
}

.cart-item-code {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 10px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.cart-item-price {
    text-align: right;
    flex-shrink: 0;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.quantity-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.quantity-btn:hover {
    background: #f3f4f6;
}

.quantity-display {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    box-shadow: 0 -6px 16px rgba(15, 23, 42, 0.12);
}

.cart-footer .btn {
    height: 54px;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-checkout:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .cart-footer {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 20px 20px 0 0;
        padding: 18px 20px 24px;
        z-index: 1200;
    }

    .main-content,
    .content-area {
        padding-bottom: 220px;
    }
}

/* Login */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: #0a0a0a;
}

.login-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px 20px 0 0;
}

.login-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%, rgba(102, 126, 234, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: inherit;
}

.login-card:hover {
    transform: translateY(-10px) rotateX(8deg) rotateY(4deg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
}

.login-card:hover::after {
    opacity: 1;
}

.login-logo {
    width: 154px;
    height: 80px;
    background-image: url(https://i.imgur.com/mJHSJfm.png);
    background-size: cover;
    background-position: center;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

.login-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: #6b7280;
    margin-bottom: 30px;
}

.btn-login {
    position: relative;
    overflow: hidden;
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

/* Tabelas */
.table {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.table thead {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.table thead th {
    color: white;
    font-weight: 600;
    padding: 15px;
    text-align: left;
    white-space: nowrap;
}

.table tbody td {
    padding: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}

.table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90%;
    overflow-y: auto;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #166534;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #1f2937;
    display: block;
}

.stat-label {
    color: #6b7280;
    margin-top: 5px;
}

/* Responsivo */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

/* Filtros */
.filters-card {
    margin-bottom: 30px;
    padding: 25px;
}

.filters-form {
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
}

.filters-form .form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

.filters-actions {
    display: flex;
    gap: 10px;
}

/* Cards de Cliente */
.client-card {
    margin-bottom: 20px;
    padding: 20px;
}

.client-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.client-info strong {
    display: block;
    margin-bottom: 5px;
}

.client-email {
    color: #6b7280;
    font-size: 14px;
}

.document-info {
    text-align: right;
    word-break: break-word;
}

.document-type {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 5px;
}

.client-card-body {
    margin-bottom: 15px;
}

.client-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.client-detail:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #374151;
    min-width: 100px;
}

.client-card-actions {
    display: flex;
    gap: 10px;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

/* Cards de Pedido */
.orders-table-wrapper {
    overflow-x: auto;
}

.orders-table-wrapper .table {
    min-width: 720px;
}

.orders-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.order-card {
    margin-bottom: 20px;
    padding: 20px;
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.order-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-total {
    font-weight: 700;
    font-size: 18px;
    color: #059669;
}

.order-card-body {
    margin-bottom: 15px;
}

.order-detail {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.order-detail:last-child {
    border-bottom: none;
}

.order-card-actions {
    display: flex;
    gap: 10px;
}

.checkout-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: flex-start;
}

.checkout-summary {
    position: sticky;
    top: 100px;
}

.checkout-card {
    padding: 25px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.checkout-card + .checkout-card {
    margin-top: 25px;
}

.checkout-card h2 {
    font-size: 18px;
    margin-bottom: 15px;
}

.checkout-items-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.checkout-item {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    padding-bottom: 18px;
}

.checkout-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.checkout-item-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.checkout-item-info h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.checkout-item-info p {
    font-size: 13px;
    color: #6b7280;
}

.checkout-item-price {
    text-align: right;
    font-weight: 600;
}

.checkout-item-price span {
    display: block;
    font-size: 13px;
    color: #6b7280;
}

.checkout-summary .btn {
    height: 56px;
    font-size: 16px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.checkout-summary form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.checkout-summary .form-group {
    margin-bottom: 0;
}

.checkout-summary-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 25px;
    position: sticky;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    padding-top: 15px;
    padding-bottom: 5px;
    box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.08);
}

.checkout-summary-actions .btn {
    width: 100%;
}

/* Página Pedido */
.pedido-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.pedido-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 6px;
}

.pedido-subtitle {
    color: #6b7280;
    font-size: 14px;
}

.pedido-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.pedido-actions-bottom {
    margin-top: 25px;
    justify-content: center;
}

.pedido-actions-bottom {
    margin-top: 25px;
}

.pedido-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.pedido-card {
    overflow: hidden;
}

.pedido-card-header {
    padding: 25px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    gap: 15px;
    align-items: center;
}

.pedido-card-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.pedido-card-header p {
    color: #6b7280;
    font-size: 13px;
}

.pedido-total {
    text-align: right;
}

.pedido-total span {
    display: block;
    color: #6b7280;
    font-size: 13px;
}

.pedido-total strong {
    font-size: 22px;
    color: #0f172a;
}

.pedido-items-list {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pedido-item {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.pedido-item:last-child {
    border-bottom: none;
}

.pedido-item-info h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.pedido-item-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: #6b7280;
    flex-wrap: wrap;
}

.pedido-item-unit {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 6px;
    display: inline-block;
}

.pedido-item-total {
    text-align: right;
    min-width: 140px;
}

.pedido-item-total span {
    display: block;
    font-size: 12px;
    color: #94a3b8;
}

.pedido-item-total strong {
    font-size: 18px;
    color: #0f172a;
}

.pedido-info-list {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.pedido-info-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.pedido-info-row .label {
    font-weight: 600;
    color: #374151;
}

.pedido-info-row .value {
    color: #0f172a;
    text-align: right;
}

.pedido-info-row small {
    color: #6b7280;
    font-size: 12px;
}

.pedido-info-observacoes {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 15px;
}

.pedido-info-observacoes label {
    font-weight: 600;
    color: #374151;
    display: block;
    margin-bottom: 6px;
}

.pedido-info-observacoes p {
    background: rgba(15, 23, 42, 0.05);
    padding: 15px;
    border-radius: 10px;
    font-size: 14px;
    color: #0f172a;
}

.pedido-status-form {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
/* Página Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
}

/* Empty State */
.empty-state {
    padding: 60px;
    text-align: center;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin-bottom: 15px;
    color: #374151;
}

.empty-state p {
    color: #6b7280;
    margin-bottom: 30px;
}

/* Form Rows */
.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

/* Modal Actions */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.modal-actions .btn {
    flex: 1;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 100%;
        z-index: 1001;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .navbar {
        padding: 15px 20px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .navbar-title {
        font-size: 18px;
    }

    .navbar-user {
        gap: 10px;
    }

    .user-info {
        display: none;
    }

    .content-area {
        padding: 20px;
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .login-title {
        font-size: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .table {
        font-size: 14px;
    }

    .table thead th,
    .table tbody td {
        padding: 10px 8px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .btn-sm {
        padding: 6px 12px;
        font-size: 12px;
    }

    .btn-text {
        display: inline-block;
        font-size: 12px;
        line-height: 1.2;
    }

    .modal-content {
        padding: 20px;
        margin: 10px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .product-card {
        padding: 20px;
    }

    .product-title {
        font-size: 16px;
    }

    .filters-form {
        gap: 15px;
    }

    .filters-form .form-group {
        min-width: auto;
    }

    .filters-actions {
        width: 100%;
    }

    .filters-actions .btn {
        flex: 1;
    }

    .page-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .page-header .btn {
        width: 100%;
        justify-content: center;
    }

    .checkout-layout {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .checkout-summary {
        position: static;
    }

    .checkout-summary form {
        padding-bottom: 180px;
    }

    .checkout-summary-actions {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        margin-top: 0;
        border-radius: 20px 20px 0 0;
        padding: 16px 20px 24px;
        background: rgba(248, 250, 252, 0.96);
        box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.15);
        z-index: 20;
    }

    .checkout-summary .btn {
        height: 52px;
        font-size: 15px;
    }

    body {
        padding-bottom: 120px;
    }

    .page-title {
        font-size: 24px;
    }

    .form-row {
        flex-direction: column;
        gap: 15px;
    }

    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }

    .action-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .client-card-actions,
    .order-card-actions {
        flex-direction: column;
        gap: 8px;
    }

    .pedido-header {
        flex-direction: column;
    }

    .pedido-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .pedido-layout {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .pedido-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .pedido-total {
        text-align: left;
    }

    .pedido-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .pedido-item-total {
        text-align: left;
        width: 100%;
    }

    .pedido-info-row {
        flex-direction: column;
    }

    .pedido-info-row .value {
        text-align: left;
    }

    .document-info {
        text-align: left;
        margin-top: 8px;
    }

    .document-type {
        font-size: 12px;
    }

    .document-info div {
        font-size: 13px;
    }

}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Loading */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(102, 126, 234, 0.1);
    border-left: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

