/* ========================================
   ANIMO RETAIL - FINAL ERP THEME (COMPLETE)
   Brand aligned + fully covered UI states
======================================== */

/* ===============================
   ROOT VARIABLES
================================ */
:root {
    --animo-primary: #3B82F6;
    --animo-primary-hover: #2563EB;
    --animo-accent: #14B8A6;
    --animo-bg: #F1F5F9;
    --animo-card: #FFFFFF;
    --animo-border: #E2E8F0;
    --animo-text: #111827;
    --animo-text-light: #475569;
    --animo-text-muted: #6B7280;
    --animo-header-bg: linear-gradient(90deg, #e0ecff, #f8fafc);
    --animo-hover: #F1F5F9;
    --animo-focus: rgba(59, 130, 246, 0.2);
}

/* ===============================
   GLOBAL
================================ */
body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 13px;
    background-color: var(--animo-bg);
    color: var(--animo-text);
}

/* ===============================
   GRID
================================ */
.row {
    --bs-gutter-x: 10px;
    --bs-gutter-y: 6px;
}

/* ===============================
   CARD
================================ */
.card {
    background: var(--animo-card);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid var(--animo-border);
    transition: box-shadow 0.2s ease;
}

    .card:hover {
        box-shadow: 0 4px 10px rgba(0,0,0,0.04);
    }

/* ===============================
   LABELS
================================ */
label,
.form-label {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 2px;
    color: var(--animo-text-light);
}

/* ===============================
   INPUTS
================================ */
input,
select,
textarea,
.form-control,
.form-select {
    width: 100%;
    height: 28px;
    padding: 3px 6px;
    font-size: 12px;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    background: #FFFFFF;
    transition: all 0.15s ease;
}

    /* Focus */
    input:focus,
    select:focus,
    textarea:focus {
        border-color: var(--animo-primary);
        outline: none;
        box-shadow: 0 0 0 1px var(--animo-focus);
    }

    /* Disabled */
    input:disabled,
    select:disabled,
    textarea:disabled {
        background: #F8FAFC;
        cursor: not-allowed;
    }

/* ===============================
   BUTTONS
================================ */
.btn {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.15s ease;
}

/* Primary */
.btn-primary {
    background: var(--animo-primary);
    color: #fff;
    border: none;
}

    .btn-primary:hover {
        background: var(--animo-primary-hover);
    }

/* Light button */
.btn-light {
    background: #F1F5F9;
    border: 1px solid var(--animo-border);
}

    .btn-light:hover {
        background: #E2E8F0;
    }

/* ===============================
   TABLE
================================ */
.table {
    width: 100%;
    border-collapse: collapse;
    background: #FFFFFF;
}

    .table th {
        font-size: 12px;
        padding: 8px;
        background: #F8FAFC;
        border-bottom: 1px solid var(--animo-border);
        color: var(--animo-text-light);
    }

    .table td {
        font-size: 12px;
        padding: 8px;
        border-bottom: 1px solid var(--animo-border);
    }

    .table tr:hover {
        background: var(--animo-hover);
    }

/* ===============================
   BADGES
================================ */
.badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
}

.badge-light-success {
    background: #D1FAE5;
    color: #065F46;
}

.badge-light-danger {
    background: #FEE2E2;
    color: #991B1B;
}

/* ===============================
   DOCUMENT HEADER
================================ */
.doc-header {
    background: var(--animo-header-bg);
    border-bottom: 1px solid #DBEAFE;
    border-radius: 10px 10px 0 0;
    padding: 8px 12px;
}

    .doc-header .animo-title {
        font-weight: 600;
        color: #1E293B;
        font-size: 14px;
    }

    /* Header button */
    .doc-header .btn {
        background: transparent;
        border: none;
        color: #64748B;
    }

        .doc-header .btn:hover {
            background: #E0ECFF;
        }

/* ===============================
   DROPDOWN (ANIMO SELECT)
================================ */
.animo-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 220px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--animo-border);
    border-radius: 6px;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.animo-select-item {
    padding: 6px 10px;
    cursor: pointer;
    font-size: 13px;
}

    .animo-select-item:hover {
        background: var(--animo-hover);
    }

.animo-select-empty {
    padding: 8px;
    font-size: 12px;
    color: var(--animo-text-muted);
}

/* ===============================
   GRID UTIL
================================ */
.animo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px 12px;
}

.animo-grid-dense {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 6px;
}

/* ===============================
   NUMERIC ALIGNMENT
================================ */
.text-end {
    text-align: right;
}

.erp-number {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ===============================
   INPUT FIXES
================================ */
input[type=number]::-webkit-inner-spin-button {
    display: none;
}

input[type="date"] {
    min-width: 140px;
}

/* ===============================
   SMALL UTILITIES
================================ */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

/* ===============================
   BACKOFFICE SCOPED FIXES
================================ */
.backoffice-theme .card-body {
    padding: 6px 10px;
}

.backoffice-theme .border-top {
    padding: 6px 8px;
}

.backoffice-theme .mb-2 {
    margin-bottom: 4px !important;
}

.backoffice-theme .col-12 {
    margin-bottom: 4px;
}
