/* Backup & Export */
        .backup-bar {
            margin-top: 16px;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
        }

        .btn-aux {
            padding: 10px;
            background: var(--border);
            border: none;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 600;
            color: var(--text-main);
            cursor: pointer;
            text-align: center;
        }

        /* Rodapé / marca */
        .app-footer {
            display: flex;
            align-items: center;
            justify-content: center;
            margin-top: 24px;
            padding: 16px 0 8px;
        }

        .footer-logo-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 10px 20px;
            border-radius: 14px;
            background: var(--header-bg);
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
        }

        .footer-logo {
            max-width: 130px;
            height: auto;
            object-fit: contain;
        }

        /* Toast Notifications */
        #toast-container {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 1000;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .toast {
            background: #0f172a;
            color: #fff;
            padding: 10px 16px;
            border-radius: 20px;
            font-size: 12px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            animation: fadeIn 0.3s, fadeOut 0.3s 2.7s forwards;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

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

        @keyframes fadeOut {
            to {
                opacity: 0;
                transform: translateY(10px);
            }
        }



        /* Autenticação Supabase */
        #auth-screen {
            position: fixed;
            inset: 0;
            background: var(--bg);
            z-index: 3000;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .auth-card {
            width: 100%;
            max-width: 380px;
            background: var(--card-bg);
            border: 1px solid var(--border);
            border-radius: 20px;
            padding: 28px 22px;
            box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
        }

        .auth-brand {
            text-align: center;
            margin-bottom: 22px;
        }

        .auth-logo {
            max-width: 120px;
            height: auto;
            margin-bottom: 12px;
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
        }

        .auth-brand h1 {
            font-size: 21px;
            margin-bottom: 6px;
        }

        .auth-brand p {
            color: var(--text-muted);
            font-size: 13px;
        }

        .auth-field {
            margin-bottom: 14px;
        }

        .auth-field label {
            display: block;
            font-size: 12px;
            font-weight: 700;
            color: var(--text-muted);
            margin-bottom: 5px;
        }

        .auth-field input {
            width: 100%;
            padding: 12px 14px;
            border: 1px solid var(--border);
            border-radius: 10px;
            background: var(--card-bg);
            color: var(--text-main);
            font-size: 14px;
            outline: none;
        }

        .auth-field input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.10);
        }

        .auth-submit {
            width: 100%;
            padding: 12px;
            border: 0;
            border-radius: 10px;
            background: var(--primary);
            color: white;
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
        }

        .auth-submit:disabled {
            opacity: 0.65;
            cursor: wait;
        }

        .auth-message {
            min-height: 18px;
            margin-top: 12px;
            text-align: center;
            font-size: 12px;
            color: var(--danger);
        }

        .auth-switch {
            margin-top: 6px;
            text-align: center;
            font-size: 13px;
            color: var(--text-muted);
        }

        .auth-switch button {
            background: none;
            border: 0;
            padding: 0;
            margin-left: 4px;
            color: var(--primary);
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
            text-decoration: underline;
        }

        .session-info {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            font-size: 11px;
            color: var(--text-muted);
        }

        .session-email {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .realtime-status {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            margin-left: auto;
            padding: 3px 8px;
            border-radius: 999px;
            border: 1px solid var(--border);
            background: var(--card-bg);
            font-size: 10px;
            font-weight: 700;
            white-space: nowrap;
        }

        .realtime-status.online {
            color: #047857;
            border-color: #6ee7b7;
            background: #ecfdf5;
        }

        .realtime-status.connecting {
            color: #92400e;
            border-color: #fcd34d;
            background: #fffbeb;
        }

        .realtime-status.offline {
            color: #991b1b;
            border-color: #fca5a5;
            background: #fef2f2;
        }

        body.dark-mode .realtime-status.online {
            color: #6ee7b7;
            background: #064e3b;
        }

        body.dark-mode .realtime-status.connecting {
            color: #fde68a;
            background: #78350f;
        }

        body.dark-mode .realtime-status.offline {
            color: #fecaca;
            background: #7f1d1d;
        }

        /* Lock Screen Overlay */
        #lock-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--bg);
            z-index: 2000;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 16px;
        }
