﻿
/* ============================================================
   Farmácia Tem Valor — Identidade Visual Hypera Pharma
   ============================================================ */

:root {
    --hp-green: #40bc60;
    --hp-green-dark: #107036;
    --hp-green-light: #62cc79;
    --hp-green-super-light: #8bea91;
    --hp-red: #CC0000;
    --hp-red-light: #FDEAEA;
    --hp-orange: #FF8800;
    --hp-orange-light: #FFF3E0;
    --hp-gray-50: #F8F9FA;
    --hp-gray-100: #F1F3F5;
    --hp-gray-200: #E9ECEF;
    --hp-gray-300: #DEE2E6;
    --hp-gray-500: #ADB5BD;
    --hp-gray-600: #6C757D;
    --hp-gray-700: #495057;
    --hp-gray-800: #343A40;
    --hp-gray-900: #212529;
    --sidebar-width: 240px;
    --header-height: 60px;
    --border-radius: 8px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --transition: all 0.2s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--hp-gray-50);
    color: var(--hp-gray-900);
    font-size: 14px;
    line-height: 1.5;
}

/* ── Layout Principal ── */
.app-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #166534 0%, #107036 100%);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: 2px 0 8px rgba(0,0,0,0.15);
    z-index: 100;
}

.sidebar-logo {
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo-icon {
    width: 38px;
    height: 38px;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .sidebar-logo-icon svg {
        color: #fff;
        width: 20px;
        height: 20px;
    }

.sidebar-logo-text {
    min-width: 0;
}

    .sidebar-logo-text h1 {
        font-size: 13px;
        font-weight: 700;
        color: #fff;
        line-height: 1.2;
    }

    .sidebar-logo-text span {
        font-size: 11px;
        color: rgba(255,255,255,0.55);
    }

.sidebar-logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebar-user {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.user-info {
    min-width: 0;
    flex: 1;
}

    .user-info .user-name {
        font-size: 13px;
        font-weight: 600;
        color: #fff;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .user-info .user-email {
        font-size: 11px;
        color: rgba(255,255,255,0.55);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.badge-admin {
    font-size: 10px;
    font-weight: 600;
    background: rgba(0,170,68,0.25);
    color: #4ADE80;
    border: 1px solid rgba(0,170,68,0.4);
    border-radius: 4px;
    padding: 2px 6px;
    margin-top: 3px;
    display: inline-block;
}

.sidebar-nav {
    flex: 1;
    padding: 10px 8px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    margin-bottom: 2px;
}

    .nav-item:hover {
        background: rgba(255,255,255,0.1);
        color: #fff;
    }

    .nav-item.active {
        background: rgba(255,255,255,0.2);
        color: #fff;
        font-weight: 600;
    }

    .nav-item svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }

.sidebar-footer {
    padding: 10px 8px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-footer-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: rgba(255,255,255,0.4);
    font-size: 11px;
}

/* ── Conteúdo Principal ── */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: var(--header-height);
    background: linear-gradient(180deg, #107036 0%, #107036 100%);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    box-shadow: 2px 0 8px rgba(0,0,0,0.15);
}

/* Elementos mobile: ocultos por padrão em desktop */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 199;
    cursor: pointer;
}

    .sidebar-overlay.sidebar-open {
        display: block;
    }

.hamburger-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 6px;
    background: none;
    border: none;
    border-radius: 6px;
}

    .hamburger-btn span {
        display: block;
        width: 20px;
        height: 2px;
        background: #fff;
        border-radius: 2px;
        transition: all 0.3s;
    }

.page-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* ── Cards ── */
.card {
    background: #fff;
    border-radius: var(--border-radius);
    border: 1px solid var(--hp-gray-200);
    box-shadow: var(--shadow-sm);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--hp-gray-200);
    display: flex;
    align-items: center;
    gap: 10px;
}

    .card-header h2 {
        font-size: 15px;
        font-weight: 600;
        color: var(--hp-gray-800);
    }

    .card-header p {
        font-size: 12px;
        color: var(--hp-gray-500);
        margin-top: 1px;
    }

.card-header-icon {
    width: 32px;
    height: 32px;
    background: var(--hp-green-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .card-header-icon svg {
        width: 16px;
        height: 16px;
        color: var(--hp-green-dark);
    }

.card-body {
    padding: 15px;
}

/* ── Formulário ── */
.form-grid {
    display: grid;
    gap: 16px;
}

.form-grid-2 {
    grid-template-columns: 1fr 1fr;
}

.form-grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

    .form-group.full-width {
        grid-column: 1 / -1;
    }

.form-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--hp-gray-700);
}

    .form-label .required {
        color: var(--hp-red);
        margin-left: 2px;
    }

.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--hp-gray-300);
    border-radius: 6px;
    font-size: 13px;
    color: var(--hp-gray-800);
    background: #fff;
    transition: var(--transition);
    outline: none;
    font-family: inherit;
}

    .form-control:focus {
        border-color: var(--hp-green);
        box-shadow: 0 0 0 3px rgba(0,102,204,0.12);
    }

    .form-control::placeholder {
        color: var(--hp-gray-500);
    }

    .form-control:disabled {
        background: var(--hp-gray-100);
        color: var(--hp-gray-500);
        cursor: not-allowed;
    }

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236C757D' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-hint {
    font-size: 11px;
    color: var(--hp-gray-500);
}

.form-error {
    font-size: 11px;
    color: var(--hp-red);
}

/* ── Radio Group ── */
.radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: nowrap;
}

.radio-option {
    white-space: nowrap;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1.5px solid var(--hp-gray-300);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
    font-weight: 500;
    color: var(--hp-gray-700);
}

    .radio-option:hover {
        border-color: var(--hp-green);
        background: var(--hp-green-light);
    }

    .radio-option.selected {
        border-color: var(--hp-green-dark);
        background: var(--hp-green-light);
        color: #2D332D;
    }

    .radio-option input[type="radio"] {
        accent-color: #2D332D;
    }

    .radio-option.selected svg {
        transform: scale(1.05);
        transition: 0.2s ease;
    }

/* ── Upload de Receita ── */
.upload-area {
    border: 2px dashed var(--hp-gray-300);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--hp-gray-50);
}

    .upload-area:hover, .upload-area.dragover {
        border-color: var(--hp-green);
        background: var(--hp-green-super-light);
    }

    .upload-area.has-file {
        border-color: var(--hp-green);
        background: var(--hp-green-light);
        border-style: solid;
    }

.upload-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    color: var(--hp-gray-400);
}

.upload-area.has-file .upload-icon {
    color: var(--hp-green);
}

.upload-text {
    font-size: 13px;
    color: var(--hp-gray-600);
}

    .upload-text strong {
        color: var(--hp-green);
    }

.upload-subtext {
    font-size: 11px;
    color: var(--hp-gray-500);
    margin-top: 4px;
}

.upload-file-info {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

    .upload-file-info svg {
        color: var(--hp-gray-600);
        width: 18px;
        height: 18px;
    }

        .upload-file-info svg:hover {
            color: #ffffff;
            width: 18px;
            height: 18px;
        }

    .upload-file-info span {
        font-size: 13px;
        font-weight: 500;
        color: #131513;
    }

/* ── Botões ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
}

.btn-primary {
    background: var(--hp-green);
    color: #fff;
}

    .btn-primary:hover {
        background: var(--hp-green-dark);
    }

    .btn-primary:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.btn-success {
    background: var(--hp-green);
    color: #fff;
}

    .btn-success:hover {
        background: #009940;
    }

.btn-danger {
    background: var(--hp-red);
    color: #fff;
}

    .btn-danger:hover {
        background: #AA0000;
    }

.btn-outline {
    background: transparent;
    color: var(--hp-green);
    border: 1.5px solid var(--hp-green);
}

    .btn-outline:hover {
        background: var(--hp-green-light);
        color: #ffffff;
    }

.btn-ghost {
    background: transparent;
    color: var(--hp-gray-600);
    border: 1.5px solid var(--hp-gray-300);
}

    .btn-ghost:hover {
        background: var(--hp-gray-100);
    }

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 15px;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn svg {
    width: 15px;
    height: 15px;
}

/* ── Status Badges ── */
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid transparent;
}

.status-recebido {
    background: #EFF6FF;
    color: #1D4ED8;
    border-color: #BFDBFE;
}

.status-separacao {
    background: #FFF7ED;
    color: #C2410C;
    border-color: #FED7AA;
}

.status-retirado {
    background: #F0FDF4;
    color: #15803D;
    border-color: #BBF7D0;
}

.status-concluido {
    background: var(--hp-green-light);
    color: #185430;
    border-color: #86EFAC;
}

.status-cancelado {
    background: var(--hp-red-light);
    color: var(--hp-red);
    border-color: #FECACA;
}

/* ── Tabela ── */
.table-wrapper {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

    .table th {
        padding: 10px 14px;
        text-align: left;
        font-size: 11px;
        font-weight: 600;
        color: var(--hp-gray-500);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        background: var(--hp-gray-50);
        border-bottom: 1px solid var(--hp-gray-200);
    }

    .table td {
        padding: 12px 14px;
        border-bottom: 1px solid var(--hp-gray-100);
        font-size: 13px;
        color: var(--hp-gray-700);
        vertical-align: middle;
    }

    .table tr:hover td {
        background: var(--hp-gray-50);
    }

    .table tr:last-child td {
        border-bottom: none;
    }

/* ── Stats Cards ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--hp-gray-200);
    border-radius: var(--border-radius);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    transition: var(--transition);
}

    .stat-card:hover {
        border-color: var(--hp-green);
        box-shadow: var(--shadow-sm);
    }

    .stat-card.active {
        border-color: var(--hp-green);
        background: var(--hp-green-light);
    }

.stat-card-label {
    font-size: 11px;
    font-weight: 500;
}

.stat-card-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--hp-gray-800);
}

.stat-card-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

/* ── Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(2px);
}

.modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: min(800px, calc(100vw - 48px));
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    animation: modalIn 0.2s ease;
    display: flex;
    flex-direction: column;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(8px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--hp-gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 3;
    flex-shrink: 0;
}

    .modal-header h3 {
        font-size: 15px;
        font-weight: 600;
    }

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--hp-gray-500);
    padding: 4px;
    border-radius: 4px;
}

    .modal-close:hover {
        background: var(--hp-gray-100);
        color: var(--hp-gray-800);
    }

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

    .modal-body::after {
        content: "";
        display: block;
        height: 4px;
    }

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--hp-gray-200);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    position: sticky;
    bottom: 0;
    background: #fff;
    z-index: 3;
    flex-shrink: 0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.04);
}

/* ── Info Row ── */
.info-row {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 13px;
}

.info-label {
    color: var(--hp-gray-500);
    font-weight: 500;
    min-width: 120px;
}

.info-value {
    color: var(--hp-gray-800);
}

/* ── Histórico ── */
.historico-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.historico-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    background: var(--hp-gray-50);
    border-radius: 6px;
    border-left: 3px solid var(--hp-green);
}

    .historico-item.cancelado {
        border-left-color: var(--hp-red);
    }

    .historico-item.concluido {
        border-left-color: var(--hp-green);
    }

/* ── Pesquisa e Filtros ── */
.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.search-input-wrapper {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

    .search-input-wrapper svg {
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--hp-gray-400);
        width: 15px;
        height: 15px;
    }

    .search-input-wrapper input {
        padding-left: 34px;
    }

/* Filtros Admin */
.filtros-em-linha {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.filtros-admin {
    flex-wrap: nowrap;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 4px;
}

    .filtros-admin > * {
        flex-shrink: 0;
        min-height: 38px;
    }

.pesquisar-flex-grow {
    flex: 0 0 220px;
    min-width: 220px;
}

.filtro-fixo {
    width: 145px;
    flex: 0 0 140px;
}

.filtro-data-operador {
    display: flex;
    align-items: stretch;
    gap: 8px;
    flex: 0 0 auto;
    min-width: 0;
}

.filtro-data-operador-select {
    width: 116px;
    flex: 0 0 116px;
}

.filtro-data-operador-input {
    width: 135px;
    flex: 0 0 135px;
}

.btn-limpar-filtros {
    white-space: nowrap;
    flex: 0 0 auto;
    height: 38px;
    margin-left: auto;
}

/* ── Login Page ── */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #003D7A 0%, #0066CC 50%, #0099FF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #003D7A, #0066CC);
    padding: 28px 28px 24px;
    text-align: center;
}

.login-logo {
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.15);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

    .login-logo svg {
        width: 28px;
        height: 28px;
        color: #fff;
    }

.login-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.login-header p {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin-top: 4px;
}

.login-body {
    padding: 24px 28px;
}

.login-test-users {
    margin-top: 20px;
}

    .login-test-users h3 {
        font-size: 12px;
        font-weight: 600;
        color: var(--hp-gray-500);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        gap: 6px;
    }

.test-user-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1.5px solid var(--hp-gray-200);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 8px;
    text-align: left;
    font-family: inherit;
}

    .test-user-btn:hover {
        border-color: var(--hp-green);
        background: var(--hp-green-light);
    }

.test-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--hp-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

    .test-user-avatar.admin {
        background: var(--hp-green);
    }

.test-user-info {
    flex: 1;
    min-width: 0;
}

    .test-user-info .name {
        font-size: 13px;
        font-weight: 600;
        color: var(--hp-gray-800);
    }

    .test-user-info .email {
        font-size: 11px;
        color: var(--hp-gray-500);
    }

.test-user-role {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
}

.role-colaborador {
    background: var(--hp-green-light);
    color: var(--hp-green);
}

.role-admin {
    background: var(--hp-green-light);
    color: var(--hp-green);
}

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

.page-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header-icon {
    width: 36px;
    height: 36px;
    background: var(--hp-green-dark);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .page-header-icon svg {
        width: 18px;
        height: 18px;
        color: #fff;
    }

.page-header h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--hp-gray-800);
}

.page-header p {
    font-size: 13px;
    color: var(--hp-gray-600);
    margin-top: 2px;
}

/* ── Alertas ── */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
}

    .alert svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
        margin-top: 1px;
    }

.alert-success {
    background: var(--hp-green-light);
    color: #166534;
    border: 1px solid #86EFAC;
}

.alert-error {
    background: var(--hp-red-light);
    color: var(--hp-red);
    border: 1px solid #FECACA;
}

.alert-info {
    background: var(--hp-green-light);
    color: #141313;
    border: 1px solid #BFDBFE;
}

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--hp-gray-500);
}

    .empty-state svg {
        width: 48px;
        height: 48px;
        margin: 0 auto 16px;
        opacity: 0.4;
    }

    .empty-state h3 {
        font-size: 15px;
        font-weight: 600;
        color: var(--hp-gray-700);
        margin-bottom: 6px;
    }

    .empty-state p {
        font-size: 13px;
    }

/* ── Pedido Card (mobile) ── */
.pedido-card {
    padding: 14px 16px;
    border-bottom: 1px solid var(--hp-gray-100);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
}

    .pedido-card:hover {
        background: var(--hp-gray-50);
    }

    .pedido-card:last-child {
        border-bottom: none;
    }

.pedido-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--hp-green-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .pedido-card-icon svg {
        width: 18px;
        height: 18px;
        color: var(--hp-green);
    }

.pedido-card-info {
    flex: 1;
    min-width: 0;
}

    .pedido-card-info .nome {
        font-size: 13px;
        font-weight: 600;
        color: var(--hp-gray-800);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .pedido-card-info .meta {
        font-size: 11px;
        color: var(--hp-gray-500);
        margin-top: 2px;
    }

/* ── Divider ── */
.divider {
    height: 1px;
    background: var(--hp-gray-200);
    margin: 16px 0;
}

/* ── Spinner ── */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--hp-gray-200);
    border-top-color: var(--hp-green);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Responsivo ── */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .mobile-header {
        display: flex;
    }

    .page-content {
        padding: 16px;
    }

    .form-grid-2, .form-grid-3 {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .table-wrapper {
        display: none;
    }

    .pedido-card {
        display: flex;
    }

    .modal {
        width: 100vw !important;
        max-width: 100vw !important;
        min-width: 100vw !important;
        margin: 0 !important;
        border-radius: 12px 12px 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 85vh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .modal-overlay {
        align-items: flex-end;
        justify-content: stretch;
        padding: 0 !important;
    }

    .modal-body {
        overflow-y: auto;
        flex: 1 1 auto;
        min-height: 0;
    }

        .modal-body::after {
            content: "";
            display: block;
            height: 4px;
        }

    .modal-footer {
        position: sticky;
        bottom: 0;
        background: #fff;
        z-index: 3;
    }

    .modal-table-wrapper {
        display: block !important;
        overflow-x: auto;
    }

        .modal-table-wrapper .table {
            min-width: 420px;
        }

}

@media (min-width: 769px) {
    .pedido-card {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .radio-group {
        flex-direction: column;
    }
}

/* ============================================================
   HOMEPAGE — Farmácia Tem Valor
   ============================================================ */

/* Reset para páginas públicas */
.hp-navbar, .hp-hero, .hp-stats, .hp-section, .hp-cta, .hp-footer {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Navbar ── */
.hp-navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--hp-gray-200);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.hp-navbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hp-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.hp-brand-icon {
    width: 38px;
    height: 38px;
    background: var(--hp-green);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.hp-brand-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--hp-gray-900);
    display: block;
    line-height: 1.2;
}

.hp-brand-sub {
    font-size: 11px;
    color: var(--hp-gray-500);
    display: block;
}

.hp-nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hp-nav-link {
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--hp-gray-700);
    text-decoration: none;
    border-radius: 6px;
    transition: var(--transition);
}

    .hp-nav-link:hover {
        background: var(--hp-gray-100);
        color: var(--hp-green);
    }

.hp-btn-login {
    padding: 8px 20px;
    background: var(--hp-green);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: var(--transition);
}

    .hp-btn-login:hover {
        background: var(--hp-green-dark);
    }

/* ── Hero ── */
.hp-hero {
    background: #fff;
    padding: 80px 24px 60px;
}

.hp-hero-content {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hp-hero-accent {
    width: 48px;
    height: 3px;
    background: var(--hp-green);
    border-radius: 2px;
    margin-bottom: 20px;
}

.hp-hero-title {
    font-size: 48px;
    font-weight: 800;
    color: var(--hp-green);
    line-height: 1.15;
    margin-bottom: 18px;
}

.hp-hero-desc {
    font-size: 16px;
    color: var(--hp-gray-600);
    line-height: 1.7;
    margin-bottom: 32px;
}

.hp-hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hp-btn-primary {
    padding: 13px 28px;
    background: var(--hp-green);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

    .hp-btn-primary:hover {
        background: var(--hp-green-dark);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0,102,204,0.3);
    }

.hp-btn-outline {
    padding: 13px 28px;
    background: transparent;
    color: var(--hp-green);
    font-size: 15px;
    font-weight: 700;
    border-radius: 8px;
    border: 2px solid var(--hp-green);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

    .hp-btn-outline:hover {
        background: var(--hp-green-light);
        color: #ffffff;
    }

/* Hero visual com blobs */
.hp-hero-visual {
    position: relative;
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .hp-hero-visual img {
        width: 70%;
        height: auto;
    }

.hp-hero-blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.35;
}

.hp-blob-1 {
    width: 260px;
    height: 260px;
    background: #B3C8E8;
    top: 20px;
    right: 40px;
}

.hp-blob-2 {
    width: 200px;
    height: 200px;
    background: #E8B3B3;
    top: 80px;
    right: 100px;
}

.hp-blob-3 {
    width: 220px;
    height: 220px;
    background: #B3D4E8;
    top: 100px;
    right: 10px;
}

/* ── Stats ── */
.hp-stats {
    background: #fff;
    border-top: 1px solid var(--hp-gray-100);
    border-bottom: 1px solid var(--hp-gray-100);
    padding: 32px 24px;
}

.hp-stats-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 80px;
}

.hp-stat-item {
    text-align: center;
}

.hp-stat-number {
    display: block;
    font-size: 40px;
    font-weight: 800;
    color: var(--hp-green);
    line-height: 1;
}

.hp-stat-label {
    display: block;
    font-size: 14px;
    color: var(--hp-gray-500);
    margin-top: 6px;
}

/* ── Seções ── */
.hp-section {
    padding: 80px 24px;
    background: #fff;
}

.hp-section-gray {
    background: var(--hp-gray-50);
}

.hp-section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.hp-section-header {
    text-align: center;
    margin-bottom: 56px;
}

.hp-section-accent {
    width: 48px;
    height: 3px;
    background: var(--hp-green);
    border-radius: 2px;
    margin: 0 auto 20px;
}

.hp-section-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--hp-green);
    margin-bottom: 12px;
}

.hp-section-desc {
    font-size: 16px;
    color: var(--hp-gray-600);
}

/* ── Steps ── */
.hp-steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.hp-step-card {
    background: #fff;
    border: 1px solid var(--hp-gray-200);
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

    .hp-step-card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

.hp-step-number {
    width: 48px;
    height: 48px;
    background: var(--hp-green);
    color: #fff;
    border-radius: 50%;
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.hp-step-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--hp-green);
    margin-bottom: 10px;
}

.hp-step-desc {
    font-size: 13px;
    color: var(--hp-gray-600);
    line-height: 1.6;
}

/* ── Benefícios ── */
.hp-benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.hp-benefit-card {
    background: #fff;
    border: 1px solid var(--hp-gray-200);
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

    .hp-benefit-card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

.hp-benefit-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.hp-icon-red {
    background: #FEE2E2;
    color: #DC2626;
}

.hp-icon-teal {
    background: #CCFBF1;
    color: #0D9488;
}

.hp-icon-blue {
    background: var(--hp-green-light);
    color: var(--hp-green);
}

.hp-icon-orange {
    background: #FEF3C7;
    color: #D97706;
}

.hp-icon-indigo {
    background: #EDE9FE;
    color: #7C3AED;
}

.hp-icon-green {
    background: var(--hp-green-light);
    color: var(--hp-green);
}

.hp-benefit-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--hp-green);
    margin-bottom: 8px;
}

.hp-benefit-desc {
    font-size: 13px;
    color: var(--hp-gray-600);
    line-height: 1.6;
}

/* ── CTA ── */
.hp-cta {
    background: var(--hp-green);
    padding: 80px 24px;
    text-align: center;
}

.hp-cta-inner {
    max-width: 600px;
    margin: 0 auto;
}

.hp-cta-title {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
}

.hp-cta-desc {
    font-size: 16px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 32px;
    line-height: 1.6;
}

.hp-btn-cta {
    padding: 14px 36px;
    background: var(--hp-green);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

    .hp-btn-cta:hover {
        background: #009940;
        transform: translateY(-1px);
        box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    }

/* ── Footer ── */
.hp-footer {
    background: #093d1e;
    padding: 48px 24px 0;
}

.hp-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.hp-footer-brand {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.hp-footer-tagline {
    font-size: 13px;
    color: rgba(255,255,255,0.55);
    line-height: 1.6;
}

.hp-footer-heading {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 14px;
}

.hp-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .hp-footer-links li {
        margin-bottom: 8px;
    }

    .hp-footer-links a {
        font-size: 13px;
        color: rgba(255,255,255,0.55);
        text-decoration: none;
        transition: var(--transition);
    }

        .hp-footer-links a:hover {
            color: #fff;
        }

.hp-footer-contact {
    font-size: 13px;
    color: rgba(255,255,255,0.55);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

    .hp-footer-contact svg {
        flex-shrink: 0;
        opacity: 0.7;
    }

.hp-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 16px 0;
    text-align: center;
    max-width: 1100px;
    margin: 0 auto;
}

    .hp-footer-bottom p {
        font-size: 12px;
        color: rgba(255,255,255,0.4);
    }

/* ── Responsivo Homepage ── */
@media (max-width: 900px) {
    .hp-hero-content {
        grid-template-columns: 1fr;
    }

    .hp-hero-visual {
        display: none;
    }

    .hp-hero-title {
        font-size: 36px;
    }

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

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

    .hp-stats-inner {
        gap: 40px;
    }

    .hp-footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .hp-hero {
        padding: 48px 16px 40px;
    }

    .hp-hero-title {
        font-size: 28px;
    }

    .hp-steps-grid {
        grid-template-columns: 1fr;
    }

    .hp-benefits-grid {
        grid-template-columns: 1fr;
    }

    .hp-stats-inner {
        flex-direction: column;
        gap: 24px;
    }

    .hp-section-title {
        font-size: 26px;
    }

    .hp-cta-title {
        font-size: 26px;
    }

    .hp-footer-inner {
        grid-template-columns: 1fr;
    }

    .hp-nav-links .hp-nav-link {
        display: none;
    }
}

/* ============================================================
   LOGIN — Novo Design (baseado no Farmacinha)
   ============================================================ */

.lp-page {
    min-height: 100vh;
    background: rgb(255, 255, 255);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.lp-card {
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.lp-logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.lp-logo-icon {
    width: 56px;
    height: 56px;
    background: #4ECDC4;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 800;
    color: #fff;
}

.lp-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--hp-green);
    text-align: center;
    margin-bottom: 4px;
}

.lp-subtitle {
    font-size: 13px;
    color: var(--hp-gray-500);
    text-align: center;
    margin-bottom: 24px;
}

.lp-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--hp-red-light);
    color: var(--hp-red);
    border: 1px solid #FECACA;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
}

.lp-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.lp-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.lp-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--hp-gray-700);
}

.lp-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--hp-gray-300);
    border-radius: 8px;
    font-size: 14px;
    color: var(--hp-gray-800);
    background: #fff;
    outline: none;
    transition: var(--transition);
    font-family: inherit;
}

    .lp-input:focus {
        border-color: #4ECDC4;
        box-shadow: 0 0 0 3px rgba(78,205,196,0.15);
    }

    .lp-input::placeholder {
        color: var(--hp-gray-400);
    }

.lp-btn-entrar {
    width: 100%;
    padding: 13px;
    background: var(--hp-green);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    margin-top: 4px;
}

    .lp-btn-entrar:hover {
        background: var(--hp-green-dark);
    }

    .lp-btn-entrar:disabled {
        opacity: 0.7;
        cursor: not-allowed;
    }

/* Caixa de usuários de teste */
.lp-test-box {
    background: var(--hp-gray-50);
    border: 1px solid var(--hp-gray-200);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 16px;
}

.lp-test-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--hp-gray-600);
    margin-bottom: 10px;
}

.lp-test-user {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid var(--hp-gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 6px;
    text-align: left;
    font-family: inherit;
}

    .lp-test-user:last-child {
        margin-bottom: 0;
    }

    .lp-test-user:hover {
        border-color: #4ECDC4;
        background: #F0FFFE;
    }

.lp-test-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--hp-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.lp-avatar-admin {
    background: var(--hp-green);
}

.lp-test-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.lp-test-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--hp-gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lp-test-email {
    font-size: 11px;
    color: var(--hp-gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lp-test-role {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    flex-shrink: 0;
}

.lp-role-colab {
    background: var(--hp-green-light);
    color: var(--hp-green);
}

.lp-role-admin {
    background: var(--hp-green-light);
    color: var(--hp-green);
}

.lp-back-link {
    display: block;
    text-align: center;
    font-size: 13px;
    color: var(--hp-green);
    text-decoration: none;
    transition: var(--transition);
}

    .lp-back-link:hover {
        text-decoration: underline;
    }

@media (max-width: 480px) {
    .lp-card {
        padding: 28px 20px;
    }

    .lp-title {
        font-size: 18px;
    }
}

/* ============================================================
   RESPONSIVIDADE MOBILE
   Regras adicionadas para suporte a celular.
   Nenhuma linha do CSS original foi alterada.
   ============================================================ */

@media (max-width: 768px) {
    /* Cards mobile para substituir a tabela oculta */
    .mobile-card {
        display: block;
        background: #fff;
        border: 1px solid var(--hp-gray-200);
        border-radius: 8px;
        padding: 16px;
        margin-bottom: 12px;
        box-shadow: var(--shadow-sm);
    }

    .mobile-card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 10px;
        gap: 8px;
        flex-wrap: wrap;
    }

    .mobile-card-protocol {
        font-size: 12px;
        color: var(--hp-gray-500);
        font-weight: 500;
    }

    .mobile-card-title {
        font-size: 15px;
        font-weight: 600;
        color: var(--hp-gray-800);
        margin-bottom: 6px;
    }

    .mobile-card-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 10px;
        font-size: 13px;
        color: var(--hp-gray-600);
    }

    .mobile-card-actions {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }

    /* Page header em coluna */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .page-header-actions {
        width: 100%;
    }

        .page-header-actions .btn {
            width: 100%;
            justify-content: center;
        }

    /* Filtros em coluna */
    .filters-bar {
        flex-direction: column;
        gap: 10px;
    }

    .filter-group {
        width: 100%;
    }

        .filter-group select, .filter-group input {
            width: 100%;
        }

    /* Stats grid 2 colunas */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 14px 12px;
    }

    .stat-card-value {
        font-size: 20px;
    }

    /* Modal footer em coluna */
    .modal-footer {
        flex-direction: column;
        gap: 8px;
    }

        .modal-footer .btn {
            width: 100%;
            justify-content: center;
        }

    /* Paginacao compacta */
    .pagination {
        flex-wrap: wrap;
        gap: 4px;
        justify-content: center;
    }

    .pagination-info {
        width: 100%;
        text-align: center;
        margin-bottom: 8px;
    }

    /* Sidebar como drawer deslizante */
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: var(--sidebar-width);
        z-index: 200;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    }

        .sidebar.sidebar-open {
            display: flex;
            transform: translateX(0);
        }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 199;
        cursor: pointer;
    }

        .sidebar-overlay.sidebar-open {
            display: block;
        }

    .hamburger-btn {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        padding: 6px;
        background: none;
        border: none;
        border-radius: 6px;
    }

        .hamburger-btn span {
            display: block;
            width: 20px;
            height: 2px;
            background: #fff;
            border-radius: 2px;
            transition: all 0.3s;
        }

    .main-content {
        width: 100%;
        min-height: calc(100vh - 56px);
    }

    /* Login card no mobile */
    .login-card {
        max-width: 100%;
        border-radius: 12px;
    }

    .login-body {
        padding: 20px;
    }

    .login-header {
        padding: 22px 20px 18px;
    }
}

@media (max-width: 480px) {
    .page-content {
        padding: 12px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat-card {
        padding: 12px 10px;
    }

    .stat-card-value {
        font-size: 18px;
    }

    .stat-card-label {
        font-size: 11px;
    }

    .status-badge {
        font-size: 10px;
        padding: 2px 7px;
    }

    .btn {
        font-size: 13px;
        padding: 8px 14px;
    }

    .btn-lg {
        padding: 12px 20px;
        font-size: 14px;
    }

    .card-body {
        padding: 14px;
    }

    .card-header {
        padding: 12px 14px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .info-row {
        flex-direction: column;
        gap: 2px;
    }

    .info-label {
        min-width: unset;
    }

    .upload-area {
        padding: 16px;
    }

    .radio-group {
        flex-direction: column;
    }

    .search-bar:not(.filtros-admin) {
        flex-direction: column;
    }

    .modal-header {
        padding: 14px 16px;
    }

    .modal-body {
        padding: 14px 16px;
    }

    .modal-footer {
        padding: 12px 16px;
    }
}

@media (max-width: 768px) {
    .modal {
        width: 100vw !important;
        max-width: 100vw !important;
        min-width: 100vw !important;
        margin: 0 !important;
        border-radius: 12px 12px 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 85vh;
    }

    .modal-overlay {
        align-items: flex-end;
        justify-content: stretch;
        padding: 0 !important;
    }
}

/* Paginacao */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-top: 1px solid var(--hp-gray-200);
    background: var(--hp-gray-50);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.pagination-info {
    font-size: 12px;
    color: var(--hp-gray-600);
}

.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--hp-gray-300);
    border-radius: 6px;
    background: #fff;
    color: var(--hp-gray-700);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

    .pagination-btn:hover:not(:disabled) {
        background: var(--hp-green-light);
        border-color: var(--hp-green);
        color: #ffffff;
    }

    .pagination-btn.active {
        background: var(--hp-green);
        border-color: var(--hp-green);
        color: #fff;
    }

    .pagination-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--hp-gray-500);
    font-size: 13px;
}

.app-loading {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    font-family: 'Inter', sans-serif;
}

.app-loading-content {
    text-align: center;
    color: var(--hp-green-dark);
}

.app-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    display: block;
    animation: spin 1s linear infinite;
}

/*****************/
/* ADMIN */
/*****************/

.admin-page-full {
    height: calc(100vh - 50px);
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
}

.admin-card-full {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.admin-content-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.admin-state-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 16px;
}

    .admin-state-center > div {
        width: 100%;
    }

.admin-pagination-wrap {
    margin-top: auto;
    flex-shrink: 0;
}

    .admin-pagination-wrap nav,
    .admin-pagination-wrap .pagination-container {
        margin-bottom: 0;
    }

.admin-table-area {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.admin-table-scroll {
    flex: 1;
    min-height: 0;
    overflow-x: auto;
    overflow-y: auto;
}

    .admin-table-scroll table {
        width: 100%;
        min-width: 1100px;
        border-collapse: separate;
    }

    .admin-table-scroll thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        background: #fff;
    }

.admin-desktop-table {
    display: block;
}

.admin-mobile-list {
    display: none;
}

.admin-acoes-cell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    white-space: nowrap;
}

.acoes-coluna {
    width: 110px;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.page-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1 1 320px;
}

.page-header-text {
    min-width: 0;
}

.page-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    margin-left: auto;
}

.page-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--hp-gray-800);
    line-height: 1.2;
}

.page-subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--hp-gray-500);
    line-height: 1.3;
}

.btn-atualizar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.admin-status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 4px;
}

.admin-status-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1.5px solid var(--hp-gray-300);
    border-radius: 6px;
    cursor: pointer;
    background: #fff;
    transition: var(--transition);
}

    .admin-status-option.selected {
        border-color: var(--hp-green);
        background: var(--hp-green-light);
    }

    .admin-status-option input[type="radio"] {
        accent-color: var(--hp-green);
    }

/* Responsivo admin */
@media (max-width: 992px) {
    .pesquisar-flex-grow {
        flex: 0 0 180px;
        min-width: 180px;
    }

    .filtro-fixo {
        width: 120px;
        flex: 0 0 120px;
    }

    .filtro-data-operador-select {
        width: 95px;
        flex: 0 0 95px;
    }

    .filtro-data-operador-input {
        width: 115px;
        flex: 0 0 115px;
    }
}

@media (max-width: 768px) {
    .admin-page-full {
        height: auto;
        min-height: 0;
        overflow: visible;
    }

    .admin-header {
        align-items: stretch;
    }

    .page-header-left {
        flex: 1 1 100%;
    }

    .page-header-actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-end;
    }

    .admin-card-full,
    .admin-content-body,
    .admin-table-scroll {
        overflow: visible;
    }

    .admin-desktop-table {
        display: none;
    }

    .admin-mobile-list {
        display: block;
        padding: 12px;
    }

    .filtros-admin {
        flex-wrap: nowrap;
        flex-direction: row;
        align-items: stretch;
    }

    .pesquisar-flex-grow {
        flex: 0 0 180px;
        min-width: 180px;
    }

    .filtro-fixo {
        width: 115px;
        flex: 0 0 115px;
    }

    .filtro-data-operador-select {
        width: 90px;
        flex: 0 0 90px;
    }

    .filtro-data-operador-input {
        width: 115px;
        flex: 0 0 115px;
    }

    .page-header-actions .btn-atualizar {
        width: 100%;
        justify-content: center;
    }

    .admin-status-grid {
        grid-template-columns: 1fr;
    }

    .admin-pagination-wrap {
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .filtros-em-linha {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .filtros-admin {
        flex-wrap: nowrap;
        overflow-x: visible;
        overflow-y: visible;
        padding-bottom: 0;
    }

        .filtros-admin > * {
            width: 100%;
            flex: 0 0 auto;
            min-height: auto;
        }

    .pesquisar-flex-grow,
    .filtro-fixo,
    .filtro-data-operador,
    .btn-limpar-filtros {
        width: 100% !important;
        min-width: 100% !important;
        flex: 0 0 auto !important;
        margin-left: 0;
    }

    .filtro-data-operador {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .filtro-data-operador-select,
    .filtro-data-operador-input {
        width: 100% !important;
        min-width: 100% !important;
        flex: 0 0 auto !important;
        display: block;
        box-sizing: border-box;
        height: 38px;
    }

    .btn-limpar-filtros {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .page-header-left {
        align-items: flex-start;
    }

    .page-header-actions {
        width: 100%;
    }

    .btn-atualizar {
        width: 100%;
        justify-content: center;
    }

    .mobile-card-actions {
        flex-direction: column;
    }

        .mobile-card-actions .btn {
            width: 100%;
            justify-content: center;
        }

    .mobile-card-meta {
        flex-direction: column;
        gap: 8px;
    }

    .pesquisar-flex-grow {
        flex: 0 0 ;
        min-width: 160px;
    }

    .filtro-fixo {
        width: 105px;
        flex: 0 0 105px;
    }

    .filtro-data-operador-select {
        width: 85px;
        flex: 0 0 85px;
    }

    .filtro-data-operador-input {
        width: 110px;
        flex: 0 0 110px;
    }
}

.arquivo-download-item {
    width: 100%;
    border: 1px solid var(--hp-gray-200);
    background: white;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    text-align: left;
}

    .arquivo-download-item:hover {
        background: var(--hp-gray-50);
        border-color: var(--hp-green);
    }

.historico-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--hp-gray-500);
    margin-bottom: 12px;
}

/* container */
.historico-horizontal {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
}

/* step */
.historico-step {
    flex: 1;
    position: relative;
    text-align: center;
}

    /* linha padrão */
    .historico-step:not(:last-child) .historico-line {
        position: absolute;
        top: 6px;
        left: 50%;
        width: 100%;
        height: 2px;
        background: var(--hp-gray-200);
        z-index: 0;
    }

    /* linha "ativa" (progressão) */
    .historico-step.atual ~ .historico-step .historico-line {
        background: var(--hp-gray-200);
    }

    .historico-step:not(.atual) .historico-line {
        background: var(--hp-green-light);
    }

/* bolinha */
.historico-dot {
    width: 10px;
    height: 10px;
    background: var(--hp-green-light);
    border-radius: 50%;
    margin: 0 auto 6px;
    position: relative;
    z-index: 1;
}

/* bolinha concluída */
.historico-step:not(.atual) .historico-dot {
    background: var(--hp-green);
}

/* bolinha atual */
.historico-step.atual .historico-dot {
    background: var(--hp-green-dark);
    transform: scale(1.3);
    box-shadow: 0 0 0 3px rgba(64, 188, 96, 0.2);
}

/* conteúdo */
.historico-content {
    font-size: 11px;
}

/* status */
.historico-status {
    margin-bottom: 2px;
}

/* destaque do atual */
.historico-step.atual .historico-status {
    font-weight: 600;
}

/* data */
.historico-date {
    color: var(--hp-gray-500);
    font-size: 10px;
}


.produto-item-linha {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(90px, 0.6fr) minmax(90px, 0.6fr) minmax(140px, 0.9fr) 70px;
    gap: 12px;
    align-items: end;
}

    .produto-item-linha .form-control,
    .produto-item-linha input.form-control,
    .produto-item-linha select.form-control,
    .produto-item-linha .searchable-select-input,
    .produto-item-linha .search-input-wrapper input {
        height: 38px;
        min-height: 38px;
        max-height: 38px;
        box-sizing: border-box;
    }

    .produto-item-linha .searchable-select,
    .produto-item-linha .search-input-wrapper {
        height: 38px;
    }

    .produto-item-linha .form-group {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
    }

    .produto-item-linha .form-group {
        margin-bottom: 0;
        min-width: 0;
        width: 100%;
    }

    .produto-item-linha .form-control,
    .produto-item-linha .searchable-select {
        width: 100%;
    }

.btn-ok-produto {
    width: 70px;
    height: 38px;
    font-size: 14px;
    font-weight: 600;
    justify-self: stretch;
}

@media (max-width: 768px) {
    .produto-item-linha {
        grid-template-columns: 1fr !important;
    }

    .btn-ok-produto {
        width: 100%;
    }
}


.btn-ok-produto {
    width: 70px;
    height: 38px;
    font-size: 14px;
    font-weight: 600;
    justify-self: stretch;
}



.input-quantidade {
    padding: 6px 6px;
    font-size: 13px;
    text-align: center;
    width: 100%;
}


.input-small {
    padding: 6px 8px;
    font-size: 13px;
    text-align: center;
}

.btn-ok-produto {
    width: 100%;
    height: 38px;
    font-size: 14px;
    font-weight: 600;
}

.btn-delete {
    color: #dc2626 !important;
    border-color: #dc2626 !important;
}

    .btn-delete:hover {
        background-color: #fee2e2 !important;
        color: #b91c1c !important;
        border-color: #b91c1c !important;
    }


.section-title-simple {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding-bottom: 6px;
}

.section-title-simple__text {
    font-size: 13px;
    font-weight: 700;
    color: var(--hp-gray-800);
}

.section-title-simple__error {
    font-size: 12px;
    font-weight: 600;
    color: var(--hp-red);
}

@media (max-width: 768px) {
    .section-title-simple {
        align-items: flex-start;
    }

    .receita-grid-top,
    .receita-grid-bottom {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
}

/*.receita-grid-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}*/

.receita-grid-bottom {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 1fr) 100px;
    gap: 12px;
    align-items: end;
}

.receita-grid-top {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px;
    gap: 12px;
    align-items: end;
}

.receita-grid-top--notificacao {
    grid-template-columns: minmax(220px, 1fr) 180px 240px;
}

@media (max-width: 768px) {
    .receita-grid-top,
    .receita-grid-top--notificacao {
        grid-template-columns: 1fr;
    }
}
