/* =============================================
   Costarrear - Google Cloud Design System
   Clean, professional Material Design
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&family=Roboto:wght@300;400;500;700&display=swap');

/* ========== CSS Variables - Google Cloud Palette ========== */
:root {
    --google-blue: #1a73e8;
    --google-blue-hover: #1765cc;
    --google-blue-light: #e8f0fe;
    --google-blue-bg: #d2e3fc;
    --google-blue-text: #174ea6;

    --google-green: #34a853;
    --google-green-light: #e6f4ea;
    --google-green-text: #137333;

    --google-yellow: #fbbc04;
    --google-yellow-light: #fef7e0;
    --google-yellow-text: #b05a00;

    --google-red: #ea4335;
    --google-red-light: #fce8e6;
    --google-red-text: #c5221f;

    --google-cyan: #12b5cb;
    --google-purple: #9334e6;

    --bg-page: #f8f9fa;
    --bg-white: #ffffff;
    --bg-hover: #f1f3f4;
    --bg-active: #e8eaed;
    --bg-input: #ffffff;
    --bg-topbar: #ffffff;

    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-disabled: #9aa0a6;
    --text-link: #1a73e8;
    --text-on-primary: #ffffff;

    --border-color: #dadce0;
    --border-light: #e8eaed;
    --border-focus: #1a73e8;

    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 100px;

    --shadow-1: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    --shadow-2: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
    --shadow-3: 0 4px 8px 3px rgba(60, 64, 67, 0.15), 0 1px 3px rgba(60, 64, 67, 0.3);
    --shadow-focus: 0 0 0 2px #e8f0fe;

    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);

    --topbar-height: 64px;
}

/* ========== Reset ========== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
.app-logo h1,
.modal-title,
.card-title {
    font-family: 'Google Sans', 'Roboto', sans-serif;
}

/* ========== App Container ========== */
.app-container {
    max-width: 560px;
    margin: 0 auto;
    padding: 0 16px 24px;
}

.app-container.admin {
    max-width: 960px;
}

/* ========== Header / Top Bar ========== */
.app-header {
    background: var(--bg-topbar);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    margin: 0 -16px 16px;
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
}

.app-logo-icon {
    width: 36px;
    height: 36px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.app-logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-logo h1 {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: 0;
}

.app-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.1px;
}

/* ========== Cards (Google Cloud style) ========== */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    margin-bottom: 16px;
    transition: var(--transition);
    position: relative;
}

.card::before {
    display: none;
}

.card:hover {
    box-shadow: var(--shadow-1);
    border-color: var(--border-color);
    transform: none;
}

/* ========== Business Hours / Voltamos Logo ========== */
body.business-hours-paused {
    background:
        radial-gradient(circle at top right, rgba(26, 115, 232, 0.16), transparent 34%),
        linear-gradient(180deg, #f8fbff 0%, #f4f7fb 52%, #eef3fd 100%);
}

#step-login.closed-state {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: calc(100vh - 150px);
}

.business-hours-card {
    width: 100%;
    max-width: 460px;
    margin: 28px auto 0;
    padding: 28px 24px 24px;
    text-align: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #ffffff 100%);
    border: 1px solid rgba(26, 115, 232, 0.14);
    border-radius: var(--radius-xl);
    box-shadow: 0 18px 40px rgba(26, 115, 232, 0.12);
    position: relative;
    overflow: hidden;
}

.business-hours-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--google-blue), var(--google-cyan), var(--google-green));
}

.business-hours-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    background: var(--google-blue-light);
    color: var(--google-blue-text);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.business-hours-visual {
    width: 132px;
    height: 132px;
    margin: 18px auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, rgba(26, 115, 232, 0.20), transparent 42%),
        radial-gradient(circle at bottom right, rgba(251, 188, 4, 0.18), transparent 38%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(232, 240, 254, 0.95));
    border: 1px solid rgba(26, 115, 232, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 12px 28px rgba(26, 115, 232, 0.10);
}

.business-hours-illustration {
    width: 96px;
    height: auto;
    display: block;
    filter: drop-shadow(0 10px 18px rgba(26, 115, 232, 0.18));
}

.business-hours-title {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.business-hours-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
    margin: 0 auto 18px;
    max-width: 340px;
}

.business-hours-schedule {
    background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
    border: 1px solid rgba(26, 115, 232, 0.14);
    border-radius: 18px;
    padding: 14px 16px;
    margin-bottom: 18px;
}

.business-hours-schedule-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--google-blue-text);
}

.business-hours-schedule strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.96rem;
    line-height: 1.6;
}

.business-hours-actions {
    display: flex;
    justify-content: center;
}

.business-hours-actions .btn {
    min-width: 190px;
}

@media (max-width: 520px) {
    .business-hours-card {
        padding: 24px 18px 20px;
        margin-top: 20px;
    }

    .business-hours-title {
        font-size: 1.45rem;
    }

    .business-hours-actions .btn {
        width: 100%;
    }
}

.card-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Google Sans', 'Roboto', sans-serif;
}

.card-title .icon {
    font-size: 1.15rem;
}

/* ========== Form Elements ========== */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: 0.1px;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    color: var(--text-primary);
    font-family: 'Roboto', sans-serif;
    font-size: 0.93rem;
    font-weight: 400;
    transition: var(--transition);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.form-input::placeholder {
    color: var(--text-disabled);
}

.form-input:focus {
    border-color: var(--border-focus);
    box-shadow: var(--shadow-focus);
}

.form-input:disabled {
    background: var(--bg-hover);
    color: var(--text-disabled);
    cursor: not-allowed;
}

.form-input-icon {
    position: relative;
}

.form-input-icon .icon-left {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1rem;
    pointer-events: none;
}

.form-input-icon .form-input {
    padding-left: 40px;
}

select.form-input {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%235f6368' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

/* ========== Buttons (Google Cloud style) ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-xs);
    font-family: 'Google Sans', 'Roboto', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    white-space: nowrap;
    width: 100%;
    letter-spacing: 0.25px;
    line-height: 1.4;
}

.btn::after {
    display: none;
}

.btn:active {
    transform: none;
    opacity: 0.85;
}

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

.btn-primary {
    background: var(--google-blue);
    color: var(--text-on-primary);
}

.btn-primary:hover:not(:disabled) {
    background: var(--google-blue-hover);
    box-shadow: var(--shadow-1);
}

.btn-success {
    background: var(--google-green);
    color: var(--text-on-primary);
}

.btn-success:hover:not(:disabled) {
    background: #2e9a4a;
    box-shadow: var(--shadow-1);
}

.btn-delivery-attention {
    min-height: 92px;
    padding: 16px 12px;
    border-radius: 16px;
    box-shadow: 0 8px 18px rgba(52, 168, 83, 0.28);
    animation: deliveryPulse 1.8s ease-in-out infinite;
}

.btn-delivery-attention .delivery-cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: normal;
    text-align: center;
}

.btn-delivery-attention .delivery-cta-main {
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0.8px;
}

.btn-delivery-attention .delivery-cta-hint {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.btn-delivery-attention .delivery-cta-bounce {
    font-size: 1.2rem;
    line-height: 1;
    animation: deliveryBounce 1s ease-in-out infinite;
}

@keyframes deliveryPulse {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 0 8px 18px rgba(52, 168, 83, 0.28);
    }
    50% {
        transform: translateY(-2px);
        box-shadow: 0 14px 26px rgba(52, 168, 83, 0.38);
    }
}

@keyframes deliveryBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(4px);
    }
}

.btn-warning {
    background: var(--google-yellow);
    color: var(--text-primary);
}

.btn-warning:hover:not(:disabled) {
    background: #e8ab00;
    box-shadow: var(--shadow-1);
}

.btn-danger {
    background: var(--google-red);
    color: var(--text-on-primary);
}

.btn-danger:hover:not(:disabled) {
    background: #d33828;
    box-shadow: var(--shadow-1);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--google-blue);
}

.btn-outline:hover:not(:disabled) {
    background: var(--google-blue-light);
    border-color: var(--google-blue-bg);
}

.btn-sm {
    padding: 6px 16px;
    font-size: 0.82rem;
    width: auto;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    min-width: 36px;
}

/* ========== Status Badge ========== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1px;
}

.badge-pendente {
    background: var(--google-yellow-light);
    color: var(--google-yellow-text);
}

.badge-aceito {
    background: var(--google-blue-light);
    color: var(--google-blue-text);
}

.badge-retirado {
    background: #f3e8fd;
    color: #7627bb;
}

.badge-entregue {
    background: var(--google-green-light);
    color: var(--google-green-text);
}

.badge-cancelado {
    background: var(--google-red-light);
    color: var(--google-red-text);
}

.badge-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.badge-highlight {
    font-size: 0.95rem;
    padding: 6px 16px;
    font-weight: 700;
    box-shadow: var(--shadow-1);
    border: 1px solid var(--google-blue);
}

.badge-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 8px;
}

/* ========== Valor Display ========== */
.valor-display {
    text-align: center;
    padding: 24px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin: 16px 0;
}

.valor-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    font-weight: 500;
}

.valor-numero {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--google-green);
    line-height: 1.2;
    font-family: 'Google Sans', 'Roboto', sans-serif;
}

.valor-info {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ========== Blinking Alert ========== */
.alert-blink {
    text-align: center;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
    animation: blink-soft 2s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.alert-blink.warning {
    background: var(--google-yellow-light);
    color: var(--google-yellow-text);
    border: 1px solid #fde293;
}

.alert-blink.info {
    background: var(--google-blue-light);
    color: var(--google-blue-text);
    border: 1px solid var(--google-blue-bg);
}

.alert-blink.success {
    background: var(--google-green-light);
    color: var(--google-green-text);
    border: 1px solid #a8dab5;
}

@keyframes blink-soft {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.55;
    }
}

/* ========== Order List (Motoboy) ========== */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-item {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.order-item-agendado {
    background-color: #d93025 !important;
    /* Vermelho Google */
    color: #fff !important;
    border: 2px solid #b71c1c !important;
}

.order-item-agendado .address-name,
.order-item-agendado .address-text,
.order-item-agendado .order-meta,
.order-item-agendado .order-meta span,
.order-item-agendado .order-meta .order-value {
    color: #fff !important;
}

.order-item-agendado .order-meta {
    border-top: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.order-item-agendado .order-value {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
}

.order-item-agendado .dot.from {
    background: #fff !important;
    box-shadow: 0 0 0 2px #4caf50;
}

.order-item-agendado .dot.to {
    background: #fff !important;
    box-shadow: 0 0 0 2px #d32f2f;
}

.order-item-agendado .badge-outline {
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: #fff !important;
}

.order-item-agendado::before {
    background: #fff !important;
    opacity: 1 !important;
}

.order-item-agendado .btn-primary {
    background: #fff !important;
    color: #d93025 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.order-item-agendado .btn-outline {
    border-color: #fff !important;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.order-item-agendado .btn-outline:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

.order-item-agendado .badge-aceito {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.order-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    background: var(--google-blue);
    opacity: 0;
    transition: var(--transition);
}

.order-item:hover::before {
    opacity: 1;
}

.order-item.new {
    animation: highlight-new 3s ease-in-out infinite;
}

.order-item:hover {
    background: var(--bg-hover);
    box-shadow: var(--shadow-1);
}

.order-item .order-from-to {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.order-address {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
    /* Add some spacing between form/to blocks */
}

.address-details {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.address-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
    font-weight: 500;
}

.address-text {
    font-size: 1.3rem;
    /* Larger than before */
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    word-wrap: break-word;
    /* Allow wrapping */
}

.order-address .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 6px;
    /* Align with top of name or slightly lower */
    flex-shrink: 0;
}

.order-address .dot.from {
    background: var(--google-green);
}

.order-address .dot.to {
    background: var(--google-red);
}

.order-item .order-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--text-secondary);
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
}

.order-item .order-value {
    font-weight: 700;
    color: var(--google-green);
    font-size: 1rem;
    font-family: 'Google Sans', 'Roboto', sans-serif;
}

@keyframes highlight-new {

    0%,
    100% {
        border-color: var(--border-color);
    }

    50% {
        border-color: var(--google-blue);
        box-shadow: 0 0 0 1px var(--google-blue-bg);
    }
}

/* ========== Status Stepper ========== */
.status-stepper {
    display: flex;
    justify-content: space-between;
    padding: 20px 0 12px;
    position: relative;
}

.status-stepper::before {
    content: '';
    position: absolute;
    top: 32px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--border-light);
}

.status-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.status-step .step-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-step.active .step-dot {
    background: var(--google-blue);
    border-color: var(--google-blue);
}

.status-step.active .step-dot::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.status-step.completed .step-dot {
    background: var(--google-green);
    border-color: var(--google-green);
}

.status-step.completed .step-dot::after {
    content: '✓';
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
}

.status-step .step-label {
    font-size: 0.7rem;
    color: var(--text-disabled);
    text-align: center;
    max-width: 65px;
    font-weight: 500;
}

.status-step.active .step-label {
    color: var(--google-blue);
    font-weight: 500;
}

.status-step.completed .step-label {
    color: var(--google-green-text);
}

/* ========== Navigation Tabs ========== */
.nav-tabs {
    display: flex;
    gap: 0;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    margin: 0 -16px 16px;
    padding: 0 12px;
    border-radius: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
    position: relative;
    z-index: 1;
}

.nav-tabs::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.nav-tab {
    flex-shrink: 0;
    padding: 12px 14px;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--text-secondary);
    font-family: 'Google Sans', 'Roboto', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
    text-align: center;
    white-space: nowrap;
}

.nav-tab.active {
    color: var(--google-blue);
    border-bottom-color: var(--google-blue);
    background: transparent;
    box-shadow: none;
}

.nav-tab:hover:not(.active) {
    color: var(--text-primary);
    background: var(--bg-hover);
}

/* ========== Table ========== */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th {
    background: var(--bg-page);
    padding: 10px 16px;
    text-align: left;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.82rem;
    white-space: nowrap;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    white-space: nowrap;
}

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

.data-table tr:hover td {
    background: var(--bg-hover);
}

/* ========== Modal ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.32);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 24px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-3);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-handle {
    width: 32px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin: 0 auto 20px;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-family: 'Google Sans', 'Roboto', sans-serif;
}

/* ========== Loading Spinner ========== */
.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border-light);
    border-top-color: var(--google-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}

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

/* ========== Empty State ========== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-secondary);
}

.empty-state .icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.6;
}

.empty-state p {
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ========== Toast Notification ========== */
.toast {
    position: fixed;
    bottom: 42px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 400;
    z-index: 2000;
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease;
    max-width: 90%;
    text-align: center;
    box-shadow: var(--shadow-2);
    color: white;
    opacity: 0;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background: #323232;
}

.toast.error {
    background: var(--google-red);
}

.toast.info {
    background: #323232;
}

/* ========== Online Indicator ========== */
.online-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--google-green);
    font-weight: 500;
}

.online-indicator .pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--google-green);
    border-radius: 50%;
    animation: pulse-online 2s ease-in-out infinite;
}

@keyframes pulse-online {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(52, 168, 83, 0.4);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(52, 168, 83, 0);
    }
}

/* ========== Stat Cards ========== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    font-family: 'Google Sans', 'Roboto', sans-serif;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
    font-weight: 500;
}

.stat-card.highlight {
    background: var(--google-blue-light);
    border-color: var(--google-blue-bg);
}

.stat-card.highlight .stat-value {
    color: var(--google-blue);
}

/* ========== Login ========== */
.login-container {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 24px;
    background: var(--bg-white);
}

.login-box {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
}

.login-box .card {
    box-shadow: var(--shadow-2);
    border: none;
    padding: 32px;
    border-radius: var(--radius-sm);
}

/* ========== Action Bar ========== */
.action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    z-index: 50;
}

.action-bar .btn {
    max-width: 560px;
    margin: 0 auto;
}

/* ========== Sugestões de Endereço ========== */
.sugestoes-list {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-xs) var(--radius-xs);
    max-height: 200px;
    overflow-y: auto;
    box-shadow: var(--shadow-2);
}

.sugestao-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition-fast);
}

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

.sugestao-item:hover {
    background: var(--google-blue-light);
}

.sugestao-item .sugestao-icon {
    flex-shrink: 0;
    margin-top: 1px;
}

/* ========== Map Button ========== */
.btn-map {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(180deg, #ff9800 0%, #f57c00 100%);
    color: #ffffff;
    border: 2px solid #e46f00;
    border-radius: 12px;
    font-family: 'Google Sans', 'Roboto', sans-serif;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: 0 6px 14px rgba(245, 124, 0, 0.28);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.btn-map:hover {
    background: linear-gradient(180deg, #ffa726 0%, #fb8c00 100%);
    border-color: #d96500;
    box-shadow: 0 8px 18px rgba(245, 124, 0, 0.35);
}

/* ========== Outdoor High-Visibility Theme (Motoboy Tabs) ========== */
#motoboy-painel {
    color-scheme: light;
}

#motoboy-painel .app-header {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, #f6f9ff 100%);
    border: 1px solid #d7e2ee;
    border-radius: 18px;
    margin: 0 0 16px;
    padding: 14px 16px;
    box-shadow: 0 10px 24px rgba(26, 115, 232, 0.10);
}

#motoboy-painel .nav-tabs {
    gap: 2px;
    background: linear-gradient(180deg, #ffffff 0%, #f4f8fd 100%);
    border: 1px solid #d7e2ee;
    border-radius: 16px;
    padding: 4px;
    margin: 0 0 18px;
    box-shadow: 0 8px 18px rgba(32, 33, 36, 0.08);
}

#motoboy-painel .nav-tab {
    min-height: 42px;
    padding: 8px 9px;
    border-radius: 10px;
    border: 1px solid transparent;
    border-bottom: none;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
}

#motoboy-painel .nav-tab.active {
    color: #ffffff;
    background: linear-gradient(180deg, #1a73e8 0%, #1259c3 100%);
    border-color: #0f4ea6;
    box-shadow: 0 6px 16px rgba(26, 115, 232, 0.30);
}

#motoboy-painel .nav-tab:hover:not(.active) {
    background: #eaf2ff;
    color: #173a67;
    border-color: #c9daf8;
}

#motoboy-painel .order-list {
    gap: 14px;
}

#motoboy-painel .order-item {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 2px solid #d7e1ec;
    border-radius: 18px;
    padding: 18px 16px;
    box-shadow: 0 8px 18px rgba(32, 33, 36, 0.08);
}

#motoboy-painel .order-item::before {
    opacity: 1;
    width: 6px;
    background: linear-gradient(180deg, #1a73e8 0%, #34a853 100%);
}

#motoboy-painel .order-item:hover {
    background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
    border-color: #b9ccdf;
    box-shadow: 0 12px 24px rgba(32, 33, 36, 0.12);
}

#motoboy-painel .address-name {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #4a5a6a;
}

#motoboy-painel .address-text {
    font-size: 1.18rem;
    font-weight: 900;
    line-height: 1.34;
    color: #111827;
}

#motoboy-painel .order-address .dot {
    width: 14px;
    height: 14px;
    margin-top: 5px;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.92), 0 0 0 5px rgba(26, 115, 232, 0.08);
}

#motoboy-painel .order-item .order-meta {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #e6edf5;
    font-size: 0.92rem;
    font-weight: 700;
    color: #415161;
}

#motoboy-painel .order-item .order-value {
    font-size: 1.18rem;
    font-weight: 900;
    color: #0b8043;
}

#motoboy-painel .badge {
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08) !important;
}

#motoboy-painel .badge-pendente {
    background: #fff3c4 !important;
    color: #7a5200 !important;
    border-color: #e8bf2a !important;
}

#motoboy-painel .badge-aceito {
    background: #dcebff !important;
    color: #0f4ea6 !important;
    border-color: #8cb8ff !important;
}

#motoboy-painel .badge-retirado {
    background: #f2e3ff !important;
    color: #6c2ca7 !important;
    border-color: #c99cf2 !important;
}

#motoboy-painel .badge-outline {
    border-width: 2px !important;
    color: #415161 !important;
}

#motoboy-painel .btn,
#motoboy-painel .btn-map,
#motoboy-painel .order-item a.btn {
    min-height: 52px !important;
    border-radius: 14px !important;
    font-size: 0.96rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.35px !important;
    box-shadow: 0 8px 18px rgba(32, 33, 36, 0.16) !important;
}

#motoboy-painel .btn-primary {
    background: linear-gradient(180deg, #1a73e8 0%, #1359c2 100%) !important;
    border: 2px solid #104a9c !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}

#motoboy-painel .btn-success {
    background: linear-gradient(180deg, #1e9f4d 0%, #137d39 100%) !important;
    border: 2px solid #0f6a30 !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}

#motoboy-painel .btn-outline {
    border-width: 2px !important;
    box-shadow: 0 4px 12px rgba(32, 33, 36, 0.08) !important;
}

#motoboy-painel .btn-map {
    background: linear-gradient(180deg, #ff9f1a 0%, #e56d00 100%) !important;
    border: 2px solid #bb5600 !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.20);
    box-shadow: 0 10px 22px rgba(229, 109, 0, 0.30) !important;
    margin-bottom: 20px !important;
}

#motoboy-painel .btn-delivery-attention {
    min-height: 94px !important;
    box-shadow: 0 12px 26px rgba(30, 159, 77, 0.34) !important;
}

#motoboy-painel .btn:focus-visible,
#motoboy-painel .btn-map:focus-visible,
#motoboy-painel .nav-tab:focus-visible {
    outline: 3px solid rgba(26, 115, 232, 0.35);
    outline-offset: 2px;
}

#motoboy-painel .empty-state {
    padding: 40px 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 2px dashed #d3deea;
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.80);
}

#motoboy-painel .empty-state .icon {
    opacity: 0.9;
    filter: drop-shadow(0 4px 10px rgba(26, 115, 232, 0.12));
}

#motoboy-painel .fixed-footer {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #f8fbff 100%);
    border-top: 2px solid #d7e1ec;
    box-shadow: 0 -8px 20px rgba(32, 33, 36, 0.10);
    backdrop-filter: blur(8px);
}

#motoboy-painel .modal-content {
    border-top: 4px solid #1a73e8;
    box-shadow: 0 -12px 30px rgba(32, 33, 36, 0.18);
}

#motoboy-painel .modal-title {
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: 0;
}

#motoboy-painel .toast {
    font-weight: 700;
}

@media (max-width: 520px) {
    #motoboy-painel .nav-tab {
        font-size: 0.74rem;
        padding: 8px 8px;
    }

    #motoboy-painel .address-text {
        font-size: 1.08rem;
    }

    #motoboy-painel .btn,
    #motoboy-painel .btn-map {
        min-height: 50px !important;
    }
}

/* ========== Row Actions ========== */
.row-actions {
    display: flex;
    gap: 4px;
}

/* ========== Utilities ========== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-success {
    color: var(--google-green-text) !important;
}

.text-warning {
    color: var(--google-yellow-text) !important;
}

.text-danger {
    color: var(--google-red-text) !important;
}

.text-muted {
    color: #5f6368 !important; /* WCAG AA: ratio 4.6:1 contra fundo branco */
}

.font-bold {
    font-weight: 700;
}

.mt-8 {
    margin-top: 8px;
}

.mt-16 {
    margin-top: 16px;
}

.mt-24 {
    margin-top: 24px;
}

.mb-8 {
    margin-bottom: 8px;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-24 {
    margin-bottom: 24px;
}

.gap-8 {
    gap: 8px;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.hidden {
    display: none !important;
}

.w-full {
    width: 100%;
}

/* ========== Fade In ========== */
.fade-in {
    animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

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

/* ========== Date Input ========== */
input[type="date"].form-input {
    color-scheme: light;
}

/* ========== Scrollbar ========== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-disabled);
}

/* ========== Media Queries ========== */
@media (min-width: 768px) {
    .app-container.admin {
        padding: 0 24px 24px;
    }

    .stat-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    html {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .app-header {
        padding: 10px 12px;
    }

    .card {
        padding: 16px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
        font-size: 0.82rem;
    }
}

/* Estilos para o Autocomplete de Endereços */
.autocomplete-suggestions {
    border: 1px solid #ddd;
    background: #fff;
    max-height: 200px;
    overflow-y: auto;
    position: absolute;
    z-index: 1000;
    width: calc(100% - 2px);
    /* Ajuste para bordas */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 8px 8px;
    margin-top: -1px;
    display: none;
    /* Oculto por padrão */
}

.autocomplete-suggestion {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.autocomplete-suggestion:last-child {
    border-bottom: none;
}

.autocomplete-suggestion:hover {
    background-color: #f5f7fa;
    color: var(--primary-color);
}

.autocomplete-suggestion strong {
    color: var(--primary-color);
}

.autocomplete-suggestion small {
    color: #666;
    margin-left: auto;
    font-size: 12px;
}

.input-container {
    position: relative;
    /* Para posicionar o dropdown relativo ao input */
}

/* ========== Premium Autocomplete & Form Enhancements ========== */
.input-container {
    position: relative;
    width: 100%;
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: #ffffff !important;
    border: 2px solid var(--google-blue) !important;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 100000 !important;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    margin-top: -8px;
}

.autocomplete-suggestion {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.15s ease;
    line-height: 1.3;
}

.autocomplete-suggestion:last-child {
    border-bottom: none;
}

.autocomplete-suggestion:hover {
    background-color: #e8f0fe;
    /* Google Blue Light Hover */
    border-left: 3px solid var(--google-blue);
}

.autocomplete-suggestion strong {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
}

.autocomplete-suggestion small {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 2px;
}

/* Loading Select State */
select.loading {
    color: var(--text-secondary);
    opacity: 0.7;
    cursor: wait;
}

/* Loading State */
select.loading,
input.loading {
    opacity: 0.7;
    background-color: #fcfcfc;
    cursor: wait;
    border-color: #ccc;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-loader'%3E%3Cline x1='12' y1='2' x2='12' y2='6'%3E%3C/line%3E%3Cline x1='12' y1='18' x2='12' y2='22'%3E%3C/line%3E%3Cline x1='4.93' y1='4.93' x2='7.76' y2='7.76'%3E%3C/line%3E%3Cline x1='16.24' y1='16.24' x2='19.07' y2='19.07'%3E%3C/line%3E%3Cline x1='2' y1='12' x2='6' y2='12'%3E%3C/line%3E%3Cline x1='18' y1='12' x2='22' y2='12'%3E%3C/line%3E%3Cline x1='4.93' y1='19.07' x2='7.76' y2='16.24'%3E%3C/line%3E%3Cline x1='16.24' y1='7.76' x2='19.07' y2='4.93'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    animation: pulse 1.2s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 0.6;
    }
}

.slide-up {
    animation: slideUp 0.4s ease-out forwards;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

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

/* ========== Admin Sidebar Layout ========== */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-page);
}

.admin-sidebar {
    width: 260px;
    background: var(--bg-topbar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    transition: var(--transition);
    z-index: 1000;
}

.sidebar-header {
    padding: 24px 16px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}

.sidebar-nav .nav-tab {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 24px;
    background: transparent;
    border: none !important;
    border-left: 4px solid transparent !important;
    color: var(--text-secondary);
    font-family: 'Google Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: left;
    border-radius: 0 !important;
    margin: 0 !important;
}

.sidebar-nav .nav-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-nav .nav-tab.active {
    background: var(--google-blue-light) !important;
    color: var(--google-blue) !important;
    border-left-color: var(--google-blue) !important;
    box-shadow: none !important;
    border-bottom: none !important;
}

.sidebar-nav .nav-tab .icon {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-light);
}

.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-topbar {
    display: none;
    background: var(--bg-topbar);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 900;
}

.admin-content {
    padding: 24px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.sidebar-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.sidebar-toggle-btn:hover {
    background: var(--bg-hover);
}

@media (max-width: 900px) {
    .admin-sidebar {
        position: fixed;
        left: -260px;
        height: 100%;
    }

    .admin-sidebar.open {
        left: 0;
        box-shadow: var(--shadow-3);
    }

    .admin-topbar {
        display: flex;
    }

    .admin-layout.sidebar-open::after {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .admin-content {
        padding: 16px;
    }
}

/* ========== Address Type Grid (C2-3) ========== */
.address-type-grid {
    margin-bottom: 8px;
}

.address-type-grid select.form-input {
    padding-left: 8px;
    padding-right: 24px;
    border-radius: 12px 0 0 12px;
    border-right: none;
    font-size: 0.9rem;
}

.address-type-grid .input-wrapper input.form-input {
    border-radius: 0 12px 12px 0;
}

#status-verificacao-rua {
    animation: fadeIn 0.3s ease;
}

.address-type-grid .form-input:focus {
    z-index: 2;
}

/* ========== Mobile UX Enhancements ========== */

/* Touch targets mínimos de 44px (WCAG 2.5.5) */
@media (max-width: 768px) {
    .btn {
        min-height: 44px;
        padding: 12px 24px;
        font-size: 0.95rem;
    }

    .btn-sm {
        min-height: 40px;
        padding: 8px 16px;
        font-size: 0.88rem;
    }

    .btn-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }

    .form-input {
        min-height: 44px;
        padding: 12px;
        font-size: 16px; /* Evita zoom automático no iOS */
    }

    select.form-input {
        font-size: 16px;
    }

    .form-label {
        font-size: 0.9rem;
    }

    .badge {
        font-size: 0.8rem;
        padding: 4px 10px;
    }

    /* Melhora scroll em modais mobile */
    .modal-content {
        max-height: 90vh;
        max-height: 90dvh;
        -webkit-overflow-scrolling: touch;
    }

    /* Melhora legibilidade de tabelas */
    .data-table {
        font-size: 0.85rem;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }

    /* Sidebar: overlay touch-friendly */
    .sidebar-toggle-btn {
        width: 44px;
        height: 44px;
    }

    /* Autocomplete touch targets */
    .autocomplete-suggestion {
        padding: 12px 14px;
        min-height: 44px;
    }
}

/* Acessibilidade: Focus visible para navegação por teclado */
:focus-visible {
    outline: 2px solid var(--google-blue);
    outline-offset: 2px;
}

.btn:focus-visible {
    box-shadow: 0 0 0 3px var(--google-blue-bg);
}

.form-input:focus-visible {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--google-blue-bg);
}

/* Reduced motion para acessibilidade */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Toast mobile: posição melhor para não sobrepor navigation bar */
@media (max-width: 768px) {
    .toast {
        bottom: calc(108px + env(safe-area-inset-bottom, 0px));
        left: 16px;
        right: 16px;
        max-width: none;
        transform: translateX(0) translateY(200px);
    }
    .toast.show {
        transform: translateX(0) translateY(0);
    }
}