/* ========== MÓDULOS ESPECÍFICOS ========== */

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.dashboard-chart {
    background: white;
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
}

.chart-bar {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 200px;
    padding: 20px 0;
}

.chart-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.chart-column-bar {
    width: 100%;
    background: linear-gradient(to top, var(--primary), var(--primary-dark));
    border-radius: 6px 6px 0 0;
    min-height: 4px;
    transition: var(--transition);
    position: relative;
}

.chart-column-bar:hover {
    opacity: 0.8;
}

.chart-column-label {
    font-size: 11px;
    color: var(--gray-500);
    font-weight: 500;
}

.chart-value {
    font-size: 11px;
    color: var(--gray-700);
    font-weight: 600;
}

.recent-activity {
    background: white;
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-content strong {
    display: block;
    font-size: 13px;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.activity-content small {
    font-size: 11px;
    color: var(--gray-500);
}

/* Checklists */
.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--gray-100);
}

.checklist-item:last-child {
    border-bottom: none;
}

.checklist-question {
    flex: 1;
    font-size: 13px;
    color: var(--gray-700);
}

.checklist-options {
    display: flex;
    gap: 8px;
}

.option-btn {
    padding: 4px 12px;
    border: 1px solid var(--gray-200);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition);
}

.option-btn:hover {
    border-color: var(--primary);
}

.option-btn.active.conforme {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.option-btn.active.nao-conforme {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.option-btn.active.nao-aplica {
    background: var(--gray-500);
    color: white;
    border-color: var(--gray-500);
}

.checklist-category {
    background: var(--gray-50);
    padding: 12px 16px;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 13px;
    border-top: 1px solid var(--gray-200);
}

/* Rotulagem */
.rotulo-preview {
    background: white;
    border: 2px solid var(--gray-800);
    padding: 16px;
    font-family: Arial, sans-serif;
    max-width: 400px;
    margin: 0 auto;
}

.rotulo-preview h3 {
    text-align: center;
    font-size: 16px;
    font-weight: 900;
    border-bottom: 4px solid var(--gray-800);
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.rotulo-preview .porcao-info {
    font-size: 11px;
    margin-bottom: 8px;
}

.rotulo-preview table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.rotulo-preview th {
    text-align: left;
    border-bottom: 2px solid var(--gray-800);
    padding: 4px;
    font-weight: 700;
}

.rotulo-preview td {
    border-bottom: 1px solid var(--gray-800);
    padding: 3px 4px;
}

/* Fichas Técnicas */
.ficha-ingredientes {
    background: var(--gray-50);
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
}

.ingrediente-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 40px;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}

.ingrediente-row input {
    padding: 6px 10px;
    font-size: 12px;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
}

.btn-remove {
    background: var(--danger-light);
    color: var(--danger);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.item-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    transition: var(--transition);
    cursor: pointer;
}

.item-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

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

.item-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.item-card-subtitle {
    font-size: 12px;
    color: var(--gray-500);
}

.item-card-body {
    color: var(--gray-600);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.item-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
    font-size: 12px;
    color: var(--gray-500);
}

/* Calendar */
.calendar {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-header h3 {
    font-size: 18px;
    color: var(--gray-900);
}

.calendar-nav {
    display: flex;
    gap: 4px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day-header {
    text-align: center;
    padding: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 6px 8px;
    border: 1px solid var(--gray-100);
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    min-height: 60px;
}

.calendar-day:hover {
    background: var(--gray-50);
    border-color: var(--primary);
}

.calendar-day.today {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 700;
}

.calendar-day.other-month {
    color: var(--gray-300);
}

.calendar-day.has-event::after {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    margin-top: 4px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 20px;
}

.tab {
    padding: 12px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}

.tab:hover {
    color: var(--primary);
}

.tab.active {
    color: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
}

/* Progress */
.progress {
    background: var(--gray-200);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--info));
    transition: width 0.5s ease;
}

/* Info Box */
.info-box {
    background: var(--primary-light);
    border-left: 4px solid var(--primary);
    padding: 12px 16px;
    border-radius: 6px;
    color: var(--gray-700);
    font-size: 13px;
    margin-bottom: 16px;
}

.info-box.warning {
    background: var(--warning-light);
    border-color: var(--warning);
}

.info-box.danger {
    background: var(--danger-light);
    border-color: var(--danger);
}

.info-box.success {
    background: var(--success-light);
    border-color: var(--success);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-200);
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary);
}

.timeline-date {
    font-size: 11px;
    color: var(--gray-500);
    margin-bottom: 4px;
    font-weight: 600;
}

.timeline-title {
    font-size: 13px;
    color: var(--gray-900);
    font-weight: 600;
    margin-bottom: 4px;
}

.timeline-content {
    font-size: 12px;
    color: var(--gray-600);
}

/* POP document */
.pop-document {
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
    font-family: 'Times New Roman', serif;
    line-height: 1.6;
}

.pop-document h1 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 20px;
    border-bottom: 2px solid var(--gray-800);
    padding-bottom: 10px;
}

.pop-document h2 {
    font-size: 15px;
    margin: 20px 0 10px;
    color: var(--primary);
}

.pop-document p {
    margin-bottom: 12px;
    text-align: justify;
    font-size: 13px;
}

/* Search Results */
.search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: var(--transition);
}

.search-result-item:hover {
    background: var(--gray-50);
}

/* Checkbox List */
.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 6px;
    transition: var(--transition);
}

.checkbox-item:hover {
    background: var(--gray-50);
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.checkbox-item label {
    flex: 1;
    cursor: pointer;
    font-size: 13px;
}

/* ========== MÓDULOS RESPONSIVO MOBILE ========== */
@media (max-width: 768px) {
    /* Dashboard grid: 2 colunas → 1 coluna */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    /* Chart menor em mobile */
    .chart-bar {
        height: 140px;
        gap: 6px;
    }

    .chart-column-label {
        font-size: 10px;
    }

    /* Checklist: empilhar opções */
    .checklist-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
    }

    .checklist-options {
        width: 100%;
        justify-content: flex-start;
    }

    .option-btn {
        flex: 1;
        text-align: center;
        padding: 6px 8px;
    }

    /* Rotulagem */
    .rotulo-preview {
        max-width: 100%;
        padding: 12px;
    }

    /* Fichas Técnicas */
    .ingrediente-row {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .ingrediente-row input {
        font-size: 12px;
    }

    /* Cards Grid */
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .item-card {
        padding: 16px;
    }

    /* Calendar */
    .calendar {
        padding: 14px;
    }

    .calendar-header h3 {
        font-size: 15px;
    }

    .calendar-day {
        min-height: 40px;
        padding: 4px;
        font-size: 11px;
    }

    .calendar-day-header {
        font-size: 10px;
        padding: 4px;
    }

    /* Tabs */
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
    }

    .tab {
        padding: 10px 14px;
        font-size: 12px;
        white-space: nowrap;
    }

    /* POP Document */
    .pop-document {
        padding: 20px 16px;
        max-width: 100%;
    }

    .pop-document h1 {
        font-size: 16px;
    }

    .pop-document h2 {
        font-size: 14px;
    }

    .pop-document p {
        font-size: 12px;
    }

    /* Timeline */
    .timeline {
        padding-left: 20px;
    }

    .timeline-item::before {
        width: 10px;
        height: 10px;
        left: -20px;
    }

    /* Info Box */
    .info-box {
        padding: 10px 12px;
        font-size: 12px;
    }

    /* Activity */
    .activity-item {
        gap: 10px;
        padding: 10px 0;
    }

    .activity-content strong {
        font-size: 12px;
    }

    .activity-content small {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .ingrediente-row {
        grid-template-columns: 1fr;
    }

    .calendar-grid {
        gap: 2px;
    }

    .calendar-day {
        min-height: 32px;
        font-size: 10px;
    }

    .checklist-options {
        flex-wrap: wrap;
    }

    .option-btn {
        font-size: 11px;
        padding: 5px 8px;
    }
}

