/* ============================================
   Axiom Caixa — Cash Register Module CSS
   Shared across all products (Shop, DPP, DPAA)
   ============================================ */

/* Register Cards */
.acx-registers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.acx-register-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    transition: box-shadow 0.2s;
}

.acx-register-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.acx-register-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.acx-register-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--text, #1a1a2e);
}

.acx-register-location {
    font-size: 13px;
    color: var(--text-secondary, #6b7280);
    margin-top: 2px;
}

/* Status Badge */
.acx-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.acx-badge-open {
    background: #dcfce7;
    color: #166534;
}

.acx-badge-closed {
    background: #f3f4f6;
    color: #6b7280;
}

.acx-badge-suspended {
    background: #fef3c7;
    color: #92400e;
}

.acx-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.acx-badge-open .acx-badge-dot { background: #16a34a; }
.acx-badge-closed .acx-badge-dot { background: #9ca3af; }
.acx-badge-suspended .acx-badge-dot { background: #f59e0b; }

/* Shift Info */
.acx-shift-info {
    font-size: 13px;
    color: var(--text-secondary, #6b7280);
    margin-bottom: 12px;
    line-height: 1.6;
}

.acx-shift-info strong {
    color: var(--text, #1a1a2e);
}

/* Action Buttons Row */
.acx-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.acx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border, #e5e7eb);
    background: var(--card-bg, #fff);
    color: var(--text, #1a1a2e);
    cursor: pointer;
    transition: all 0.15s;
}

.acx-btn:hover {
    background: var(--bg-hover, #f9fafb);
}

.acx-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.acx-btn-open {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
}

.acx-btn-open:hover {
    background: #15803d;
}

.acx-btn-close {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.acx-btn-close:hover {
    background: #b91c1c;
}

.acx-btn-sangria {
    background: #f59e0b;
    color: #fff;
    border-color: #f59e0b;
}

.acx-btn-sangria:hover {
    background: #d97706;
}

.acx-btn-suprimento {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.acx-btn-suprimento:hover {
    background: #2563eb;
}

/* Totals Summary */
.acx-totals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin: 16px 0;
    padding: 16px;
    background: var(--bg-subtle, #f9fafb);
    border-radius: 10px;
}

.acx-total-item {
    text-align: center;
}

.acx-total-label {
    font-size: 11px;
    color: var(--text-secondary, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.acx-total-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text, #1a1a2e);
}

.acx-total-value.positive { color: #16a34a; }
.acx-total-value.negative { color: #dc2626; }

/* History Table */
.acx-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.acx-history-table th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid var(--border, #e5e7eb);
    color: var(--text-secondary, #6b7280);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.acx-history-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border, #e5e7eb);
    color: var(--text, #1a1a2e);
}

.acx-history-table tr:hover td {
    background: var(--bg-subtle, #f9fafb);
}

/* Movements List */
.acx-movements {
    max-height: 300px;
    overflow-y: auto;
}

.acx-movement {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border, #e5e7eb);
    font-size: 13px;
}

.acx-movement:last-child {
    border-bottom: none;
}

.acx-movement-type {
    font-weight: 600;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
}

.acx-movement-type-sale { background: #dcfce7; color: #166534; }
.acx-movement-type-refund { background: #fee2e2; color: #991b1b; }
.acx-movement-type-sangria { background: #fef3c7; color: #92400e; }
.acx-movement-type-suprimento { background: #dbeafe; color: #1e40af; }
.acx-movement-type-start { background: #f3f4f6; color: #6b7280; }

.acx-movement-amount {
    font-weight: 700;
    font-family: 'Inter', monospace;
}

.acx-movement-amount.income { color: #16a34a; }
.acx-movement-amount.expense { color: #dc2626; }

/* Empty State */
.acx-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary, #6b7280);
}

.acx-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.acx-empty-text {
    font-size: 14px;
    margin-bottom: 16px;
}

/* Section Title */
.acx-section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text, #1a1a2e);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Close Modal — Difference */
.acx-difference {
    text-align: center;
    padding: 16px;
    border-radius: 10px;
    margin-top: 12px;
}

.acx-difference.ok {
    background: #dcfce7;
}

.acx-difference.over {
    background: #dbeafe;
}

.acx-difference.short {
    background: #fee2e2;
}

.acx-difference-label {
    font-size: 13px;
    color: var(--text-secondary, #6b7280);
    margin-bottom: 4px;
}

.acx-difference-value {
    font-size: 24px;
    font-weight: 800;
}

.acx-difference.ok .acx-difference-value { color: #16a34a; }
.acx-difference.over .acx-difference-value { color: #3b82f6; }
.acx-difference.short .acx-difference-value { color: #dc2626; }

/* Page Header */
.acx-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

/* Responsive */
@media (max-width: 640px) {
    .acx-registers-grid {
        grid-template-columns: 1fr;
    }

    .acx-totals {
        grid-template-columns: repeat(2, 1fr);
    }

    .acx-actions {
        flex-direction: column;
    }

    .acx-btn {
        width: 100%;
    }

    .acx-history-table {
        font-size: 12px;
    }

    .acx-history-table th,
    .acx-history-table td {
        padding: 8px 6px;
    }
}
