:root {
    --tafirol-blue-dark: #00276b;
    /* Deep blue from header */
    --tafirol-blue-light: #003591;
    /* Lighter blue for gradients */
    --tafirol-cyan: #00b5e2;
    /* "Donde comprar" button color */
    --tafirol-red: #d1232a;
    /* Accent red */
    --tafirol-blue-title: #003c71;
    --tafirol-red-highlight: #ff030e;
    --light-bg: #f4f6f8;
    --text-color: #333;
}

body {
    background-color: var(--light-bg);
    background: #15448C;
    background: linear-gradient(95deg,rgba(21, 68, 140, 1) 0%, rgba(58, 193, 207, 1) 100%);
    font-family: 'Google Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 0.9rem;
    color: var(--text-color);
}
/* Header / Navbar */
.bg-tafirol {
    background: linear-gradient(90deg, var(--tafirol-blue-dark) 0%, var(--tafirol-blue-light) 100%) !important;
    color: white;
}

.text-tafirol {
    color: var(--tafirol-blue-dark) !important;
}

.text-tafirol-title {
    color: var(--tafirol-blue-title) !important;
}

.text-tafirol-highlight {
    color: var(--tafirol-red-highlight) !important;
}

/* Action buttons */
.btn-tafirol-action {
    background-color: var(--tafirol-red);
    color: #fff;
    font-size: 0.7rem!important;
    white-space: nowrap;
}

.btn-tafirol-action:hover {
    background-color: #a81216;
    color: #fff;
}

/* Buttons */
.btn-tafirol {
    background-color: var(--tafirol-cyan);
    color: black;
    border: none;
    font-weight: 600;
    border-radius: 20px;
    /* Rounded pill shape like reference */
    padding: 8px 24px;
    transition: all 0.3s ease;
}

.btn-tafirol:hover {
    background-color: #00c2ff;
    /* Darker cyan */
    color: black;
    transform: translateY(-1px);
}

.btn-tafirol-red {
    background-color: var(--tafirol-red);
    color: white;
    border: none;
    border-radius: 20px;
}

.btn-tafirol-red:hover {
    background-color: #a81216;
    color: white;
}

/* PDV status progress */
.progress.progress-status {
    height: 6px;
    background-color: #e9ecef;
    border-radius: 999px;
}

.progress.progress-status .progress-bar {
    border-radius: 999px;
}
/* Photo upload dropzone */
.dropzone {
    border: 2px dashed #cbd3da;
    border-radius: 12px;
    padding: 22px;
    min-height: 150px;
    display: block;
    background: #fff;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.dropzone input {
    opacity: 0;
    position: absolute;
    z-index: -1;
}

.dropzone.is-dragover {
    border-color: var(--tafirol-blue-title);
    background: #f6f8fb;
}

.dropzone-text {
    display: block;
    color: var(--text-color);
    font-size: 0.8rem;
}

.dropzone-text::before {
    content: "\f093";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    display: block;
    font-size: 1.4rem;
    color: var(--tafirol-blue-title);
    margin-bottom: 6px;
}

.dropzone-preview {
    display: none;
    margin: 10px auto 0;
    max-width: 100%;
    max-height: 140px;
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: contain;
}

.dropzone.has-preview .dropzone-preview {
    display: block;
}

.dropzone.has-preview .dropzone-text {
    display: none;
}

/* Photo history layout */
.photo-pair-card .card-body {
    padding: 1rem;
}

.photo-pair-block {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.photo-pair-label {
    align-self: flex-start;
}

.photo-preview {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 0;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-pair-notes {
    min-height: 32px;
}

/* Login specific */
.login-container {
    max-width: 400px;
    margin: 80px auto;
    padding: 40px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.login-body {
    background: linear-gradient(135deg, var(--tafirol-blue-dark) 0%, var(--tafirol-blue-light) 100%);
    background-image: none;
    min-height: 100vh;
}

.logo-login {
    max-width: 180px;
    display: block;
    margin: 0 auto 25px;
}

/* Cards and Tables */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.card-header {
    padding-top: 20px!important;
    border-radius: 10px 10px 0 0 !important;
    font-weight: 600;
}

.nav-link.active {
    color: var(--tafirol-blue-dark) !important;
    border-bottom: 2px solid var(--tafirol-blue-dark);
}

/* Tabs navigation */
.nav-tabs .nav-link {
    color: var(--tafirol-blue-dark);
    border: 1px solid transparent;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
    cursor: pointer;
    text-decoration: none;
}

.nav-tabs .nav-link:hover {
    border-color: #e9ecef #e9ecef #dee2e6;
    isolation: isolate;
    color: var(--tafirol-blue-dark);
}

.nav-tabs .nav-link.active {
    color: var(--tafirol-blue-dark) !important;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
    border-bottom: 2px solid var(--tafirol-blue-dark);
}

#promotorTab .nav-link.active,
#pdvListTabs .nav-link.active {
    color: var(--tafirol-red) !important;
    border-bottom-color: var(--tafirol-red);
}

.nav-tabs .nav-link:focus,
.nav-tabs .nav-link:focus-visible {
    border-color: #e9ecef #e9ecef #dee2e6;
    isolation: isolate;
    outline: none;
    box-shadow: none;
}

#myTab {
    gap: 0.5rem;
    border-bottom: none;
}

#myTab .nav-link {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    font-weight: 600;
    color: var(--tafirol-blue-title);
}

#myTab .nav-link:hover {
    background: #f6f8fb;
    border-color: #e2e6ea;
    color: var(--tafirol-blue-title);
}

#myTab .nav-link.active {
    background: var(--tafirol-blue-dark);
    border-color: var(--tafirol-blue-dark);
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* Typography refinements */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--tafirol-blue-dark);
    font-weight: 700;
}

/* Lists and forms */
.table,
.list-group,
label,
input,
select,
textarea,
.form-control,
.form-select,
.btn {
    font-size: 0.85rem;
}

label {
    margin-bottom: 0;
}

.form-control,
.form-select {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

.table th,
.table td {
    font-size: 0.75rem;
}

small,
.small {
    font-size: 0.75rem;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    /*padding: 6px 10px 0 10px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    background: #fff;*/
}

.radio-group .form-check {
    margin: 0;
}

.radio-group .form-check-input {
    margin-top: 0.2rem;
    accent-color: var(--tafirol-blue-dark);
}

/* Bigger, cleaner radios/checkboxes */
.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.15rem;
    border-width: 2px;
}

.form-check-label {
    padding-left: 0.1rem;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 39, 107, 0.15);
}

.form-check-input:checked {
    background-color: var(--tafirol-red);
    border-color: var(--tafirol-red);
}

.radio-group .form-check-input {
    accent-color: var(--tafirol-red);
}

#survey .form-check {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
}

.material-detail-title .form-check {
    padding-left: 0;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.material-detail-title .form-check .form-check-input {
    margin-left: 0;
    margin-right: 0;
}

#survey .form-check-label {
    font-size: 0.85rem;
}

#survey .card {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.material-detail-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.material-detail-item {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 12px;
    background: #fff;
}

.material-detail-title {
    font-weight: 600;
    color: var(--tafirol-blue-title);
    margin-bottom: 6px;
}

.material-detail-label {
    color: var(--tafirol-blue-title);
    font-size: 0.9rem !important;
    font-weight: 600;
}

.material-detail-title .form-check-input {
    margin-top: 0;
}

@media (max-width: 768px) {
    .brand-text {
        display: none;
    }

    .btn-tafirol-action {
        display: inline-flex;
        width: 100%;
        justify-content: center;
    }

    .btn-tafirol-upload {
        width: 100%;
        display: inline-flex;
        justify-content: center;
    }

    #myTab {
        flex-wrap: nowrap;
        gap: 0.25rem;
        overflow: hidden;
    }

    #myTab .nav-link {
        padding: 0.25rem 0.4rem;
        font-size: 0.68rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
    }

    #myTab .nav-item {
        flex: 1 1 0;
        min-width: 0;
    }

    .table.table-mobile,
    .table.table-mobile thead,
    .table.table-mobile tbody,
    .table.table-mobile th,
    .table.table-mobile td,
    .table.table-mobile tr {
        display: block;
        width: 100%;
    }

    .table.table-mobile thead {
        display: none;
    }

    .table.table-mobile tr {
        border: 1px solid #e9ecef;
        border-radius: 8px;
        padding: 8px 10px;
        margin-bottom: 10px;
        background: #fff;
    }

    .table.table-mobile td {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 8px;
        border: none;
        padding: 6px 0;
        font-size: 0.7rem;
    }

    .table.table-mobile-single td {
        display: block;
    }

    .table.table-mobile td::before {
        display: none;
    }

    .progress.progress-status {
        width: 100%;
        margin-bottom: 4px;
    }
}

.welcome-title {
    font-size: 0.8rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    .welcome-title {
        font-size: 0.75rem;
    }
}

.back-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    opacity: 0.85;
}

.back-link:hover {
    opacity: 1;
}

/* Controler metrics */
.metric-card {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.8);
    text-align: center;
}

.metric-card .card-header,
.metric-card .card-body,
.metric-card .text-tafirol-title {
    color: #fff !important;
}

.metric-card .card-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.8);
}

/* Compact filter bar */
.filters-line {
    flex-wrap: nowrap;
    overflow-x: auto;
}

.filters-line .form-select,
.filters-line .form-control {
    min-width: 120px;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    height: auto;
}

.filters-line .form-label {
    font-size: 0.7rem;
    margin-bottom: 0.15rem;
}

.filters-line .btn {
    padding: 0.25rem 0.65rem;
    font-size: 0.7rem;
}
#myTabContent{
    margin: 30px 0;
}
.mb-3{
    margin: 5px 0
}

/* Search bar layout */
.search-bar {
    width: 100%;
}

.search-bar-input {
    min-width: 0;
}

.search-bar-input .form-control {
    width: 100%;
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    height: auto;
}

.search-bar-action {
    min-width: 120px;
}

.search-bar-action .btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    height: auto;
}

@media (max-width: 768px) {
    .search-bar {
        flex-direction: column;
    }

    .search-bar-action {
        width: 100%;
        min-width: 0;
    }
}

/* Survey checkbox styling */
#survey .form-check {
    margin-bottom: 0.55rem;
    padding-left: 1.75rem;
}

#survey .form-check-input {
    width: 1.05rem;
    height: 1.05rem;
    margin-top: 0.2rem;
    border: 1px solid #cbd3da;
    box-shadow: none;
}

#survey .form-check-input:checked {
    background-color: var(--tafirol-red);
    border-color: var(--tafirol-red);
}

#survey .form-check-input:focus {
    border-color: var(--tafirol-red);
    box-shadow: 0 0 0 0.15rem rgba(209, 35, 42, 0.2);
}

#survey .form-check-label {
    font-size: 0.8rem;
    color: var(--text-color);
}
.material-detail-item{
    margin: 20px 0 0 0;
}

/* Approved PDV highlight */
.pdv-approved {
    background-color: #f2fff6;
}

.pdv-approved td:first-child {
    border-left: 3px solid #2eaf5d;
}

/* Relevado PDV highlight */
.pdv-relevado {
    background-color: #fff9f0;
}

.pdv-relevado td:first-child {
    border-left: 3px solid #ff9800;
}